Isuru Madusanka
Isuru Madusanka

Reputation: 1407

Android Use MediaRecorder to capture audio.

I need to capture audio from microphone and after user stop talking application need to identify that user stopped talking. I have a Android 2.2 Froyo device and it has this kind of app. Since most of the apps written in Java, I was wondering how to do this. I searched everywhere, MediaRecorder Api but I couldn't find anything on that.

I'm using this tutorial and since this is general question I'm not going to post any coding.

I'm not using ACTION_RECOGNIZE_SPEECH intent, instead I use google speech-api, I record amr file and upload it to google speech api, and it provides me json with speech to text.

Problem is how I determine user stopped speaking.

Upvotes: 1

Views: 799

Answers (1)

Kaarel
Kaarel

Reputation: 10672

MediaRecorder cannot be used for that, but look into:

  • AudioRecord, which lets you capture raw audio which you can then analyze for pauses; or
  • SpeechRecognizer (since API level 8), which lets you call a speech recognizer which already implements the endpointer detection.

Upvotes: 1

Related Questions