Skip to content Skip to sidebar Skip to footer

Android: How To Detect When A User Stops Talking Into The Microphone

I have an Android application that begins recording from the microphone when the application starts. In my current version, the user must press a STOP button to stop recording. How

Solution 1:

An approach is to use threads on recording and the speech power analyzing process on the recorded bytes, there's a sample code for your reference: http://musicg.googlecode.com/files/musicg_android_demo.zip

Solution 2:

What are you using to record audio? This may provide some clues:

android.media.MediaRecorder:

  • the constant MEDIA_RECORDER_INFO_MAX_DURATION_REACHED can be used with an onInfoListener.

android.speech.SpeechRecognizer:

  • attach a RecognitionListener and call onEndofSpeech().

Post a Comment for "Android: How To Detect When A User Stops Talking Into The Microphone"