alphacep / vosk-server

WebSocket, gRPC and WebRTC speech recognition server based on Vosk and Kaldi libraries
Apache License 2.0
882 stars 243 forks source link

Can't get Vosk-Server working with NodeJS Buffers and Websocket #165

Closed dzlandis closed 2 years ago

dzlandis commented 2 years ago

Is it possible to get some examples with buffers for nodejs? I'm having trouble implementing the websocket stuff with buffers in nodejs.

dzlandis commented 2 years ago

Update: I was able to get it working with buffers to some degree. I am now getting outputs from the server with transcriptions. The issue I am facing now is that the transcriptions appear to be extremely inaccurate. I will say a full on sentence and it will either transcribe it as "the the the the the the the" or "oh oh oh oh oh oh oh" despite that being far from what I actually said. I'm not sure what is going on or how to resolve this strange issue. Any help is greatly appreciated.

dzlandis commented 2 years ago

I was using the wrong WAV buffer format. Changing the wav to 8khz 16bit mono PCM fixed it :)