For a project I'm currently working on I would like to change the prosody * of a given voice sample. In other words, I need to pitch shift a voice sound without altering the formant frequencies that make up the characteristics of the voice. It's not a requirement for the system to run real-time.

Does anybody know any C or C++ (or actually, any other language) library which could achieve this?


* Prosody is the pitch of a (human) voice.

  • 1
    dunno of a library, but people including me have written on the subject. (and have coded it, too.) try again at the DSP.SE if you have questions about the actual algorithms. Commented Sep 20, 2016 at 5:55

2 Answers 2


Writing from the dsp.stackexchange.com side. Looks like the C++ Rubber Band Library (GPL or buy a license) can do what you ask. Try the command line interface with option -F to preserve formants when pitch-shifting. I have found this library to give good quality results but did not try preserving formants.


The SoundTouch library can alter the pitch without changing the tempo nor the sound quality. It has LGPL licence (free for commercial use).

Here's the source code.

Finding documentation is not easy, but you can start by having a look at this SO question and at the include/SoundTouch.h header file that can be found in the sources.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.