I have to implement a iphone application which will record user\'s voice as you starts speaking, and change the pitch of the recorded sound and play it back. I am able to record
Actually there is an easier solution. Use the rate feature of the audio player. It ranges between 0.1f - 2.0f where higher number means faster and squeekier pitch and lower number means slow dragged out sound (deep voice)
player = [[AVAudioPlayer alloc] initWithContentsOfURL:
[NSURL fileURLWithPath:path] error:&err];
player.volume = 0.4f;
player.enableRate=YES;
[player prepareToPlay];
[player setNumberOfLoops:0];
player.rate=2.0f;
[player play];
How to detect the sound?
I solved my first problem with the help of a tutorial..here is the link for this,
link: http://mobileorchard.com/tutorial-detecting-when-a-user-blows-into-the-mic/
Here we can easily understand the recording of the sound on detection of some noise.
How to change the pitch of the recorded sound and play back.
Second problem I faced in changing the pitch of the sound. As we can only record the sound with the help of AVAudioRecorder
we can’t alter the pitch by that.
For this purpose I used an external library DIRAC.
Here is the link for the Dirac library.
This comes up with some sample project (for mobile apps as well as desktop apps)about the implementation of the dirac library to the application.
Another way I found to solve this issue by implementing Cocoas2D, Cocos Denshion with Dirac. Because the above proess was not working well with my application. Here is the link for implementing this (a sample project about the changing the pitch and play the recorded sound).
I found another link related to sound recording.