Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Android SpeechRecognizer Audio Recording Error

I'm trying to use SpeechRecognizer on Android without Intent Dialog. It works fine on most of devices but some devices return Audio Recording Error (Error Code 3) and There's no detail for this error. Is there any solution or reason for this?

Thank you!!

like image 676
Android Work Avatar asked Sep 23 '17 04:09

Android Work


3 Answers

I had the same error when Google App(com.google.android.googlequicksearchbox) does not have recording permission.

In addition, SpeechRecognizer uses service of com.google.android.googlequicksearchbox. Thus, if this app is disabled or uninstalled, SpeechRecognizer may not work.

like image 194
realhoon Avatar answered Nov 07 '22 20:11

realhoon


You should go to system setting, Apps, Google app, then enable its permission of microphone. That's exactly the cause of ERROR_AUDIO(Error Code 3).

like image 37
Fisher Avatar answered Nov 07 '22 18:11

Fisher


<uses-permission android:name="android.permission.RECORD_AUDIO" />
<uses-permission android:name="android.permission.MODIFY_AUDIO_SETTINGS"/>

Set this in your manifest. if still not working, then state which device is causing error.

like image 25
Zafar Kurbonov Avatar answered Nov 07 '22 19:11

Zafar Kurbonov