I don't want to use any other apps (like sox) - I want to do this in pure Python. Installing needed Python libs is fine.
Select the Start button, then select Settings > Ease of Access > Audio, and then switch on the toggle under Turn on mono audio.
pydub is a Python library to work with only . wav files. By using this library we can play, split, merge, edit our . wav audio files.
I maintain an open source library, pydub, which make this pretty simple
from pydub import AudioSegment sound = AudioSegment.from_wav("/path/to/file.wav") sound = sound.set_channels(1) sound.export("/output/path.wav", format="wav")
One caveat: it uses ffmpeg to handle audio format conversions, but if you only use wav it can be pure python.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With