• After 15+ years, we've made a big change: Android Forums is now Early Bird Club. Learn more here.

Apps Pitch info from microphone

android88

Newbie
Hi, I want to make an app that reacts to the pitch of the voice of the user, but Im not sure how to do this. Is there a standard function for reading the pitch, or can I get the raw audo information some way and then calculate the pitch?

Any suggestions of how to do this are appreciated :)

Thanks.
 
Hi,

There's no standard function that I know of.

You'll need to record the audio, and then do some processing on the raw data you've captured. That processing will involve Fast Fourier Transformations (FFT). A mathematical way of working out what frequencies make up the signal. After all that it's still not a trivial task to identify a single frequency. Your signal will be made up of many frequencies, and it's not always easy to pick out the one you're after.

You'll be able to find implementations of the FFT algorithm in various languages, including Java. I'd recommend adapting some existing code, unless you're particularly mathematically minded.

I've written an app that tries to identify the frequency of a guitar string, and I didn't find it easy to get reliable results. Lower frequencies are particularly tricky to handle. I fear that it will be even trickier dealing with the human voice.

Good luck with it.

Mark
 
Back
Top Bottom