I have no idea how to do this. I need to turn stereo audio into mono.
Can someone help me?
I'm using pygame to play the song
from pygame import mixer
mixer.init()
mixer.music.load('meh.wav')
mixer.music.play()
I have no idea how to do this. I need to turn stereo audio into mono.
Can someone help me?
I'm using pygame to play the song
from pygame import mixer
mixer.init()
mixer.music.load('meh.wav')
mixer.music.play()
Copyright © 2021 Jogjafile Inc.
In general, you would simply load the audio into an array of shape
(n, k), wherenis number of channels andknumber of loaded samples. By averaging along channel axis (sum and divide by number of channels), you'd get your mono signal.In
pygamethere are at least two ways:mixer.init(channels=1)-> docs.