1. Check out our app, Forums for Android! Download and leave feedback here!

Pitch info from microphone

Discussion in 'Application Development' started by android88, Feb 13, 2010.

  1. android88

    android88 Member
    Thread Starter
    15

    Jan 6, 2010
    17
    0
    15
    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.
     

    Advertisement

  2. markb

    markb Well-Known Member
    63

    Sep 14, 2009
    148
    26
    63
    Software Developer (Java, C, Web, Unix)
    Birmingham, UK
    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
     
  3. android88

    android88 Member
    Thread Starter
    15

    Jan 6, 2010
    17
    0
    15
    Thanks very much! It seems that its not going to be as easy as I thought :p
    But at least I know how to proceed now :)
     
  4. markb

    markb Well-Known Member
    63

    Sep 14, 2009
    148
    26
    63
    Software Developer (Java, C, Web, Unix)
    Birmingham, UK

Share This Page

Loading...