Python Fix ValueError: Incomplete wav chunk – Python Tutorial

By | June 20, 2024

When we are using scipy.io.wavfile() to read a wav data, we may get ValueError: Incomplete wav chunk. In this tutorial, we will introduce how to fix.

This error looks like:

Fix ValueError- Incomplete wav chunk

How to fix this ValueError?

Similar to fix librosa NoBackendError, we can read this wav file using soundfile, then save it again.

audio_data, samplerate = sf.read(file, dtype="float32")
save_file(audio_data, file, sr = samplerate )

Here file is the wav file path.

Then, we will find this error is fixed.

Leave a Reply

Your email address will not be published. Required fields are marked *