I was using speech_recognition with a wav file that pjsua recorded, and it always ends with an error msg when I try to send the content of the file.
Audio file could not be read as PCM WAV, AIFF/AIFF-C, or Native FLAC; check if file is corrupted or in another format
The file plays normally using MPV, and inspecting the file show that it's a PCM (I used the file command).
test2.wav: RIFF (little-endian) data, WAVE audio, Microsoft PCM, 16 bit, mono 16000 Hz
Looking up, I found a guy with a similar problem, the proposed solution (change a few parameters using the wave library) did not work out to me. After I use the wav.setparams((2, 2, 44100, 0, 'NONE', 'NONE'))
the audio became complete garbage, like ant's talking.
I really don't understand enough about sound files to understand what the "channels", "sampwidth", "framerate", "nframes", "comptype" and "compname" means...