I have a WAV file that has been compressed using u-LAW encoding, and I need it to have no compression at all because `wavio` doesn't support compressed files.

I have looked into `audioop` that [claims to support this kind of compression](https://docs.python.org/3/library/audioop.html#module-audioop):

> 
> This module provides support for a-LAW, u-LAW and Intel/DVI ADPCM encodings.
> 
> 
> 

Apparently, the function `audioop.ulaw2lin()` does exactly what I need, but I don't understand how to read my file to pass it to that function.

I have tried the following:

```
import wave
wav_file = wave.open(PATH_TO_AUDIO_FILE)

```

But, as I stated above, due to the fact that the audio is in u-LAW encoding, that piece of code raises an exception:

```
Error: unknown format: 7

```

Does anyone know how to perform this operation?