Closed wasertech closed 2 years ago
INFO 2022-06-15 20:44:47,546 HTTP/2 support not enabled (install the http2 and tls Twisted extras)
INFO 2022-06-15 20:44:47,549 Using busy-loop synchronous mode on channel layer
INFO 2022-06-15 20:44:47,550 Listening on endpoint tcp:port=8010:interface=127.0.0.1
DEBUG 2022-06-15 20:44:57,390 file name: /tmp/tmp_audiohttp_generated_22-06-15_204457
INFO 2022-06-15 20:44:57,395 Inside stt function
ERROR 2022-06-15 20:44:57,411 exception occurred: WAV header is invalid: nAvgBytesPerSec must equal product of nSamplesPerSec and nBlockAlign, but file has nSamplesPerSec = 16000, nBlockAlign = 2, and nAvgBytesPerSec = 64000
I'm currently struggling with this check in scipy which assert the header of the wav file.
Either the js recorder or the resampler must be fixed to account for this check.
Edit: It was the wav encoder.
Be default in chromium, you can't get access to media devices (mic) over an unsecured connection (http) but it should work just fine with encryption. See https://stackoverflow.com/questions/34165614/navigator-mediadevices-getusermedia-is-not-working-and-neither-does-webkitgetuse
Websocket channel is known to be finicky but it should work with the enforced version.
I also fixed the header of the recorded wav files. (I did it in local)
Draft to add a Django example. I need to update the js part of it but it should be a fairly simple example to point to for convenience sake.