I try to open a wave file with the wave module, but I keep getting the same error whatever I try.
The line with the error is the following:
wav
The file is compressed and the wave module does not support this type of compression.
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