alphacep / alphacep/vosk-api

Clearing input buffer before capturing new data

Offen
#1,399 10 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen
Vorherrschende Sprache
Jupyter Notebook
Sterne
15.1k
Forks
1.8k
PR-Merge-Kennzahlen
Keine gemergten PRs in 30 T.

Beschreibung

Hi,

I am working on a project that uses ALSA to capture words and phrases from a microphone which is then passed onto Vosk-Api (in c) to convert into text. This is working very well and I am impressed on the accuracy of the conversion. I then take the result of the conversion and output appropriate message via a speech synthesiser.

I assumed that any new spoken phrases would not be captured until I issued the next snd_pcm_readi(handle, buffer, frames); call. But what seems to be happening is while the first phrase is being processed and the message spoken, ALSA is still capturing spoken data via the microphone. This means that some of the spoken speech from the synthesiser is being captured via the mic and causing a feedback loop!

Is there a way of flushing / deleting unprocessed data in the input buffer before start a new phrase capture?

Thanks you for any help you can give.

Ernie

Beitragsleitfaden

Für dieses Repository ist kein Beitragsleitfaden indexiert

Bewertung

Dieses Issue wurde noch nicht bewertet.

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.