Opening a wave file in Python: unknown format: 49. What's going wrong?

Python's wave module works with a specific type of WAV: PCM (WAVE_FORMAT_PCM: 0x0001).

In your case, you're using a WAV of type WAVE_FORMAT_GSM610 [0x0031 = hex(49)].

You can use a program like Audacity or some lib for converting codecs to change the type of the WAV file.

You can see a list of WAV types here: https://www.videolan.org/developers/vlc/doc/doxygen/html/vlc__codecs_8h.html

Python's wave module source code: https://github.com/python/cpython/blob/master/Lib/wave.py


The file is compressed and the wave module does not support this type of compression.