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