Run Vosk in a separate thread
- 主要言語
- Jupyter Notebook
- スター
- 15.1k
- フォーク
- 1.8k
- PR マージ指標
- 30日以内にマージされた PR はありません
説明
Excuse me,
I'm trying to construct a gui, so Vosk starts when pushing a button
Unfortunatly I'm not been able to run the recognition if I embbed all the code within a function, and call the function from a push button
I'm not findind the reason... the models loads, the queue is launched but it seems the data from the microphone is not stored
I've tried to addapt " https://github.com/alphacep/vosk-api/blob/master/python/example/test_microphone.py "and I think that the problem comes frome the while True loop, when <> is called, but I'm failing at maiking it work.
Is it possible to find this methods explained to try to go on?
with sd.RawInputStream(samplerate=args.samplerate, blocksize = 8000, device=args.device,
dtype="int16", channels=1, callback=callback) **_// I guess this is the method to store thought a callback the micro sounds._**
rec = KaldiRecognizer(model, args.samplerate) **_// I guess it is the class instance for the recognizer._**
data = q.get() **_// I Guess data is stored on the queue_**
rec.AcceptWaveform(data) **_// dont know_**
What is the difference between rec.PartialResult()) and rec.Result()?
Kind regards
コントリビューションガイド
このリポジトリのコントリビューションガイドは索引されていません
評価
この issue はまだ評価されていません。