alphacep / alphacep/vosk-api

Run Vosk in a separate thread

Offen
#1,285 9 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

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

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.