Last active
July 17, 2022 04:08
-
-
Save AIAnytime/18a7ec0e9e0651c5d744f94379f00f9b to your computer and use it in GitHub Desktop.
Python provides a pydub module that enables you to play, split, merge, and edit WAV audio files. This is how you can use it to convert a stereo WAV file to a mono file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from pydub import AudioSegment | |
mysound = AudioSegment.from_wav("stereo_infile.wav") | |
# set mono channel | |
mysound = mysound.set_channels(1) | |
# save the result | |
mysound.export("mono_outfile.wav", format="wav") It was originally published on https://www.apriorit.com/ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment