I'm working on a voice changer. My plan is to make it so that it can change your voice in various different ways, but right now I'm just trying to make it change your voice to "chipmunk voice" or a high pitch voice. I have successfully programmed an algorithm that can perform a DFT and an inverse DFT on a recording of my voice. But now I am stuck trying to figure out how to create the "chipmunk voice". I assume you would just change the fundamental frequency of the clip, but how would I do this? How do I modify the DFT to get my desired outcome? What's the best method for this? Apologies in advance if I sound like a noob, but any help (preferably in the most simple terms possible) would be greatly appreciated!
Putting aside the obvious "resample and play-back at original sampling rate" method, there are many ways to do pitch shifting. Some algorithms work in the time domain (PSOLA is the most commonly named), some in the frequency domain (Phase Vocoder) or time-frequency domain.
These aren't trivial algorithms to implement (time-domain based algorithms are probably easier to understand/implement, but also come with undesired artifacts for most applications) and can be very sensitive to the parameter choices dependent on the desired results.
I strongly suggest you start researching the subject (a simple google search such as "pitch shifting algorithms for voice" would help), try different methods and come back with questions on specific methods! Hope this at least guides you in the right direction.
EDIT Regarding Auto-tune
Auto-tune at its most basic is a two-step process:
- Pitch Detection
- Pitch shift (Auto-tune is based on the phase vocoder method mentioned above)
There are many different ways to realize both these steps. I'll suggest again that you do some research on each of these if you actually want to implement all of this yourself. If you just want the effect, there are plenty of open-source or proprietary software that does this for you.
Here are some references to get you started: