Clearing input buffer before capturing new data
- Ngôn ngữ chính
- Jupyter Notebook
- Star
- 15.1k
- Fork
- 1.8k
- Chỉ số merge pull request
- Không có pull request nào được merge trong 30 ngày
Mô tả
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
Hướng dẫn đóng góp
Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này
Đánh giá
Issue này chưa được đánh giá.