How to send data from RecordRTC to Vosk for Speech-to-text

752 Views Asked by At

I am using a Vosk server for speech-to-text conversion. I send the audio/wav blob data obtained using this method

recorder.stopRecording(function() {
    var blob = this.blob;

    // below one is recommended
    var blob = this.getBlob();
});

from RecordRTC(https://recordrtc.org/RecordRTC.html) at 16000 samples with LINEAR16 encoding to the Vosk WebSocket server(https://github.com/alphacep/vosk-server/blob/master/websocket/asr_server.py). The server works with the test16k.wav file that ships with Vosk-server for testing but returns an empty detection response for my audio data. What would be the correct way to send data to Vosk?

0

There are 0 best solutions below