Will librosa.effects.time_stretch work for stereo audio?

255 views
Skip to first unread message

Rui Guo

unread,
Jun 15, 2018, 5:34:01 AM6/15/18
to librosa
I try librosa.effects.time_stretch on stereo audio, but it returns 
"Invalid shape for monophonic audio: ndim=2, shape=(2, 1355168)"

Brian McFee

unread,
Jun 15, 2018, 9:34:24 AM6/15/18
to librosa
Librosa's time-stretcher only operates on one channel at a time.  It would be good to add stereo support, but in the meantime, you can do it manually by stretching each channel independently.

You might also consider using pyrubberband, which should support stereo directly and will sound much better.
Reply all
Reply to author
Forward
0 new messages