There is no symbol AudioSegment defined in the stereo_to_ms and ms_to_stereo functions. Calling them results in:
NameError: name 'AudioSegment' is not defined. Did you mean: 'audio_segment'?
We cannot import AudioSegment at the top of the module, so we must import it inside of this function.
Here is some example code that triggers the error. This is more or less how I discovered the mistake.
from pydub import AudioSegment
import pydub.scipy_effects
song = AudioSegment.from_mp3("song.mp3")
song = song.eq(100, gain_dB=4, channel_mode="M+S") # This channel mode causes stereo_to_ms and ms_to_stereo to be called.
There is no symbol
AudioSegment
defined in thestereo_to_ms
andms_to_stereo
functions. Calling them results in:We cannot import
AudioSegment
at the top of the module, so we must import it inside of this function.Here is some example code that triggers the error. This is more or less how I discovered the mistake.
This error was introduced with this change: https://github.com/jiaaro/pydub/pull/492