-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Open
Description
I want to end speech recognition and call FinalResult() when silence last longer than a timeout parameter.
The pocketsphinx-python lib has a get_in_speech() function which seems to be doing the VAD thing, maybe we can implement similar function.
[python psudo code]:
def fun(recognizer, stream, timeout):
no_speech_count = 0
while True:
if recognizer.AcceptWaveform(stream.read(4000)):
return recognizer.Result()
elif not recognizer.get_in_speech():
no_speech_count += 4000 / samplerate / channels
if no_speech_count > timeout:
return recognizer.FinalResult()
I notice there is a private function UpdateSilenceWeights, I don't know if it's related to voice activity detection.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels