Open AMEvers opened 6 years ago
You can write the audio as raw data, then use sox to convert it, something like:
sox -r 16000 -c 1 -b 16 -e signed-integer -t raw your_audio.raw -t wav your_audio.wav
Otherwise, you can also try to use Python packages that support wave format audio.
Do you have any idea why adding a logging message is affecting whether the code detects the end of speech? It just never gets past elif ans == -2 and triggered is true and it's really weird that something like a log message would affect it.
I do not have a clue. These two lines of logger info were not in our original example.
I'm not sure if this warrants an issue or not. I've been modifying snowboy to, on hotword detection, start buffering audio data that I would like to write to a .wav. I was having issues when I modified ring buffer where it stopped detecting when I stopped talking. Weirdly, when I added a debug statement, it suddenly worked fine. Here's the modified code.
If I uncomment ` #message = str(ans)
logger.info(message)`
It works fine, and if I comment it out, I never trigger my last elif.
Also, if you can offer me any advice on how to actually store data as a .wav so I can hear what was actually said after the hotword? I've been struggling to get the data to save in a readable .wav format.