k2-fsa / sherpa

Speech-to-text server framework with next-gen Kaldi
https://k2-fsa.github.io/sherpa
Apache License 2.0
521 stars 105 forks source link

Saving the audio from the WebSocket stream in the backend #348

Closed KazBrekker1 closed 1 year ago

KazBrekker1 commented 1 year ago

Hey, I've been trying to accumulate the samples sent through the JS websocket on a python server, but I cant figure out how to save it to a wav file.

when I save them and write to a wav file, the result is a very loud static noise.

I've tried using the np.frombuffer method as well as the utilities here.

KazBrekker1 commented 1 year ago

there was a buffer mutation before np.frombuffer that I missed, the method is working properly. closing the issue.