vosk-browser icon indicating copy to clipboard operation
vosk-browser copied to clipboard

unrecognized error

Open JerryGeis opened this issue 10 months ago • 5 comments

I get these errors on the console log:

Recognizer (id: 6f7c530f-d67b-4fc0-bed4-43e469db1c31): Could not be created due to: TypeError: Cannot convert "undefined" to float TypeError: Cannot convert "undefined" to float at Object.toWireType (blob:

at KaldiRecognizer.constructor$KaldiRecognizer (eval at new_ (blob:

this is my web page, taken from the example.

Testing

What is not right?

Jerry

JerryGeis avatar Feb 19 '25 21:02 JerryGeis

Which line of the code throws the exception? I'm guessing Vosk.createModel() but it would be nice to confirm.

erikh2000 avatar Mar 16 '25 17:03 erikh2000

Realizing now I'm replying to a stale message. Did you get past the problem?

erikh2000 avatar Mar 16 '25 17:03 erikh2000

I had the same issue, I hope this helps. I think it fails on recognizer.acceptWaveform(audioBuffer), I am directly sending audiobuffer.

Recognizer (id: 6ae028b0-3c44-490e-a441-e7577bd777ad): Could not be created due to: TypeError: Cannot convert "undefined" to float
toWireType@blob:http://localhost:3000/20550967-a69f-4a8c-9b6c-8e718189c6c2:39:4274917
constructor$Recognizer@blob:http://localhost:3000/20550967-a69f-4a8c-9b6c-8e718189c6c2 line 39 > Function:8:26
__embind_register_class/</constructor<@blob:http://localhost:3000/20550967-a69f-4a8c-9b6c-8e718189c6c2:39:4265842
Recognizer@blob:http://localhost:3000/20550967-a69f-4a8c-9b6c-8e718189c6c2 line 39 > Function:4:34
createRecognizer/<@blob:http://localhost:3000/20550967-a69f-4a8c-9b6c-8e718189c6c2:285:38
__awaiter/<@blob:http://localhost:3000/20550967-a69f-4a8c-9b6c-8e718189c6c2:25:75
__awaiter@blob:http://localhost:3000/20550967-a69f-4a8c-9b6c-8e718189c6c2:21:16
createRecognizer@blob:http://localhost:3000/20550967-a69f-4a8c-9b6c-8e718189c6c2:277:20
handleMessage@blob:http://localhost:3000/20550967-a69f-4a8c-9b6c-8e718189c6c2:197:22
RecognizerWorker/<@blob:http://localhost:3000/20550967-a69f-4a8c-9b6c-8e718189c6c2:150:61
[20550967-a69f-4a8c-9b6c-8e718189c6c2:121:21](blob:http://localhost:3000/20550967-a69f-4a8c-9b6c-8e718189c6c2)
    error blob:http://localhost:3000/20550967-a69f-4a8c-9b6c-8e718189c6c2:121
    createRecognizer blob:http://localhost:3000/20550967-a69f-4a8c-9b6c-8e718189c6c2:296
    __awaiter blob:http://localhost:3000/20550967-a69f-4a8c-9b6c-8e718189c6c2:25
    __awaiter blob:http://localhost:3000/20550967-a69f-4a8c-9b6c-8e718189c6c2:21
    createRecognizer blob:http://localhost:3000/20550967-a69f-4a8c-9b6c-8e718189c6c2:277
    handleMessage blob:http://localhost:3000/20550967-a69f-4a8c-9b6c-8e718189c6c2:197
    RecognizerWorker blob:http://localhost:3000/20550967-a69f-4a8c-9b6c-8e718189c6c2:150

jibraniqbal666 avatar May 11 '25 00:05 jibraniqbal666

Fixed the issue was not specifying sample size

new model.KaldiRecognizer(48000);

jibraniqbal666 avatar May 11 '25 01:05 jibraniqbal666

Fixed the issue was not specifying sample size

new model.KaldiRecognizer(48000);

this helped me too. Thanks man

ssnake avatar Jul 27 '25 10:07 ssnake