1

I have tried PyRubberband, librosa, praat-parselmouth and pysox. All off them work but I still hear some noise or small artifacts in the output. Also, they shift the audio around 100 ms. How can I tune them to get the best possible quality or can you suggest any library which does it better?

UPD: FFMPEG approach:

ffmpeg -i input.wav -af asetrate=48000*1.1,aresample=48000,atempo=1/1.1 output.wav
F. Vosnim
  • 476
  • 2
  • 8
  • 23

1 Answers1

1

I would guess that of the four mentioned, PyRubberband is probably the best algorithm. Depending on how much you want to shift pitch, you will never reach perfect results. This has to do with the fact that (as far as I know) they all use a phase vocoder, which transforms the signal into the frequency domain, shifts and then transforms it back into the time domain using the imperfect Griffin-Lim algorithm. Griffin-Lim tends to introduce small phase artifacts, which leads to a slightly metallic sound.

To learn more about time scale modification/pitch shifting, I recommend this overview article by Driedger.

Hendrik
  • 5,085
  • 24
  • 56