If you have browsed the entertainment section of the app store in the last few months then you are likely familiar with the Talking Tom Cat app, and other voice changing apps from a company known as Outfit7. These novelty apps have done really well, and you have to tip your hat to how Outfit7 took a simple idea that had already been implemented many times before, ran with it, and turned it into a booming success.
If you try Talking Tom Cat you will notice that after you’re done speaking the pitch change happens instantaneously.
While I don’t know exactly how it’s done within those apps I’ve come across a library that allows you to rapidly change pitch, and tempo in an instant so that you can make your own effects. The library is Dirac from DSP Dimension, and you find the free iOS download with examples here.
Update: I received feedback stating Dirac required the purchase of a license. There is both a free and Pro version (with more sophisticated audio processing), the download points to the free version.
I’ve only begun to explore what this library can do what I really like is how you can change the pitch without changing the tempo – or change the tempo without changing the pitch.
Purplelilgirl has written a collection of tutorials using Dirac demonstrating how to “Chimpmunkify” your voice, and create a talking novelty app:
Making that Talking App (includes sample code)
There is one small change you will need to get the code to compile – change the class header in the “HelloWorld.h” file to implement the AVAudioRecorderDelegate.
You may also need to tweak the threshold parameter in HelloWorldLayer.mm to get the recording working properly due to differences between the simulator and different iOS devices.
Overall a pretty cool and useful audio effect. While you might have interest in building a Talking Tom app there are many other uses for this – such as changing the tempo of a song, or the key to make it easier to play or speeding up boring instructional audios without making the speaker sound like a chipmunk.
©2011 iPhone, iOS 4, iPad SDK Development Tutorial and Programming Tips. All Rights Reserved.
.