3

Can somebody tell me how to change the pitch of a wave file in Android?

Tomerikoo
  • 18,379
  • 16
  • 47
  • 61
Sukitha Udugamasooriya
  • 2,268
  • 1
  • 35
  • 56
  • 3
    [Sound Pool](http://developer.android.com/reference/android/media/SoundPool.html) allows you to change the playback rate, but unfortunately this does not seem to be possible with Media Player. You may want to add java, DSP, audio tags to your question, if you actually need advice re: audio processing in Java. – James Jan 08 '10 at 22:30
  • Sound pool just allows to change the Play Back rate when the audio is being played...It won't help in the case of a recorded file. – Sreekanth Karumanaghat Nov 26 '12 at 04:07
  • Changing the playback rate will change the pitch but will also affect the playback speed. So you should consider to use one of the algorithms presented by @Phonon which allow to change the pitch without changing the speed. – Chris623 Dec 04 '14 at 09:50

1 Answers1

0

Android does not have such functions built in, and the process is not at all trivial. If you would like to try and code it yourself, I suggest looking at such algorithms as PSOLA, WSOLA and Phase Vocoder for pitch alteration. The book DAFX by Udo Zölzer discusses many of these in quite good detail and most of it is fairly straightforward. Phase Vocoder, I believe, works the fastest, but also takes more DSP and mathematical knowledge to understand. PSOLA is perhaps the least mathematically complicated. I personally prefer WSOLA and Enhanced WSOLA (EWSOLA), but those take quite a bit of processing power.

For correlation techniques (if you use WSOLA) I suggest doing it if frequency domain (Google FFT-based correlation). It is much quicker.

If most of this had just gone over your head, you might want to reconsider doing this altogether, but I by no means try to discourage you. = )

Phonon
  • 12,549
  • 13
  • 64
  • 114