from os import path from pydub import AudioSegment # files src = "test.mp4" dst = "test.wav" # convert mp4 to wav sound = AudioSegment.from_file(src,format="mp4") sound.export(dst, format="wav")