In this tutorial, we will introduce you how to convert m4a audio file to wav using python pydub.
In order to use pydub, you should install ffmpeg.exe first.
You can read this tutorial to know how to install.
How to convert m4a to wav using pydub
Here is an example code:
m4a_file = '20211210_151013.m4a' wav_filename = r"F:\20211210_151013.wav" from pydub import AudioSegment track = AudioSegment.from_file(m4a_file, format= 'm4a') file_handle = track.export(wav_filename, format='wav')
However, you may get this error: Couldn’t find ffmpeg or avconv
In order to fix this error, you can read:
Then, you can find m4a is converted to wav.