feature request: voice activity detection
- Langage dominant
- Jupyter Notebook
- Étoiles
- 15.1k
- Forks
- 1.8k
- Métriques de merge des PR
- Aucune PR mergée en 30 j
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()](https://github.com/bambocher/pocketsphinx-python/blob/master/pocketsphinx/__init__.py#L218) 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](https://github.com/alphacep/vosk-api/blob/master/src/kaldi_recognizer.h#L56), I don't know if it's related to voice activity detection.
Guide de contribution
Aucun guide de contribution indexé pour ce dépôt
Évaluation
Cette issue n'a pas encore été évaluée.