alphacep / alphacep/vosk-api

feature request: voice activity detection

Abierto
#184 3 comentarios 0 reacciones 0 asignados Ver en GitHub
Lenguaje dominante
Jupyter Notebook
Estrellas
15.1k
Forks
1.8k
Métricas de merge de PR
Sin PR fusionados en 30 d

Descripción

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.

Guía de contribución

No hay ninguna guía de contribución indexada para este repositorio

Evaluación

Este issue todavía no se ha evaluado.

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.