public AbsoluteEuclideanDistBelowThresholdForPtcOfWordsIsAMatch(double distanceThreshold, double wordsPctThreshold) { calculator = new EuclideanDistanceCalculator(); voiceDetector = new AutocorrellatedVoiceActivityDetector(); this.distanceThreshold = distanceThreshold; this.wordsPctThreshold = wordsPctThreshold; featureExtractor = new PreprocessorAndFeatureExtractor(sampleRate); }
/** * Default constructor * @param sampleRate the sample rate, at least 8000.0 Hz (preferably higher) */ public Recognito(float sampleRate = 16000) { if (sampleRate < MIN_SAMPLE_RATE) { throw new ArgumentException("Sample rate should be at least 8000 Hz"); } this.sampleRate = sampleRate; audioProcessor = new PreprocessorAndFeatureExtractor(this.sampleRate); }
public AbsoluteEuclideanDistBelowThresholdIsAMatch(double distanceThreshold) { calculator = new EuclideanDistanceCalculator(); this.distanceThreshold = distanceThreshold; featureExtractor = new PreprocessorAndFeatureExtractor(frameRate); }