alphacep / alphacep/vosk-api

Python binding: strange effect when reusing KaldiRecognizer (Reset not working properly?)

Offen
#1,372 1 Kommentar 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 noticed a strange effect when I checked a set of transcriptions created by running through a number of WAV files in different folders. Sometimes I get slightly different results for the same WAV files with the exact same settings, depending on the order of processing the files 🤨.

Since I was reusing the `KaldiRecognizer` in a loop (`for wav in wav_files ...`) I thought the only logical explanation could be that there is "something" left internally that remains inside the recognizer and influences the next transcription and indeed, when I add `rec = KaldiRecognizer(model, 16000)` in **every** iteration the effect is gone and everything is always identical 🤔.
I tried to add `rec.Reset()` instead, but that didn't work, only creating a new instance every time helps.

Is this expected behavior? Shouldn't a `rec.FinalResult()` or a `rec.Reset()` always reset the recognizer properly?

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.