or is there any library that I can use?
What I want is to record a audio, and then display the text recognized. Thanks a lot.
Yes, please do a google search next time, http://code4reference.com/2012/07/tutorial-android-voice-recognition/
Alternately, if you want more control you can use SpeechRecognizer, Is there a way to use the SpeechRecognizer API directly for speech input?