import torchaudio.sox_effects as sox_effects
wav, sr = sox_effects.apply_effects_file(
[[‘speed’, str(speed)],[‘pitch’, ‘0’], [‘rate’, str(sample_rate)]])
This method apply_effects_file is used to change the speed of speech, but the pitch is changed even I set the pitch shift is zero. I want to know how to change the speed of audio but not change the pitch.
In addition, I found another method “torchaudio.transforms.TimeStretch” to stretch on the stft and keep the pitch unchanged. If the “torchaudio.transforms.TimeStretch” can make the speed change but the pitch unchanged?
Thanks very much for your help.