android-docs-samples icon indicating copy to clipboard operation
android-docs-samples copied to clipboard

Speech Service reset for every 30 sec

Open dj-4war opened this issue 7 years ago • 1 comments

We have an application where we want to be in continuous listen for voice/speech. But as per the sample voice recorder has tor set for every 30 seconds. Is there a limitation on VoiceRecorder that it has to reset on certain time?, we want to have continuous voice recorder without reset? As a work around we we are reseting the resetting the service but we are getting lag in recognition.

dj-4war avatar Sep 29 '17 13:09 dj-4war

mRequestObserver.onNext(StreamingRecognizeRequest.newBuilder() .setStreamingConfig(StreamingRecognitionConfig.newBuilder() .setConfig(RecognitionConfig.newBuilder() .setLanguageCode(getDefaultLanguageCode()) .setEncoding(RecognitionConfig.AudioEncoding.LINEAR16) .setSampleRateHertz(sampleRate) .build()) .setInterimResults(true) .setSingleUtterance(false) // set this to false. .build()) .build());

On the startRecognizing function. The key is setSingleUtterance to false

SzasznikaJanos avatar Jun 21 '18 07:06 SzasznikaJanos