alphacep / alphacep/vosk-api

Small model doesn't decode 8 kHz data

Aperta
#1,726 5 commenti 0 reazioni 0 assegnatari Vedi su GitHub
Lingua principale
Jupyter Notebook
Stelle
15.1k
Fork
1.8k
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Descrizione

Hi All,

I am playing with test_simple.py, I use asterisk to record a file saved to /var/lib/asterisk/sounds/test.wav

so then I run python3 test_simple.py /var/lib/asterisk/sounds/test.wav

ERROR (VoskAPI:MaybeCreateResampler():online-feature.cc:99) Sampling frequency mismatch, expected 16000, got 8000

doing file test.wav says: test.wav: RIFF (little-endian) data, WAVE audio, Microsoft PCM, 16 bit, mono 8000 Hz

THe line in test_simple.py says:
rec = KaldiRecognizer(model, wf.getframerate())
so I would expect its READING The rate from teh file - does not seem to be right ????

But then I change the code to be 8000
rec = KaldiRecognizer(model, 8000)

I still get: ERROR (VoskAPI:MaybeCreateResampler():online-feature.cc:99) Sampling frequency mismatch, expected 16000, got 8000

I then change the line to be
rec = KaldiRecognizer(model, 16000)

The program runs now - but I get the "wrong" result printed for the STT.

What is happening here - how can I correct ?

Running test_simple.py with the included test.wav - works just fine it seems
That test is 16000 test.wav: RIFF (little-endian) data, WAVE audio, Microsoft PCM, 16 bit, mono 16000 Hz

Jerry

Guida per i contributori

Nessuna guida per i contributori indicizzata per questo repository

Valutazione

Questa issue non è ancora stata valutata.

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.