pbakondy / cordova-plugin-speechrecognition

:microphone: Cordova Plugin for Speech Recognition
MIT License
196 stars 116 forks source link

speech recognition service is not available on system on Android 11 Beta #115

Open rksoni31895 opened 4 years ago

rksoni31895 commented 4 years ago

I am Getting speech recognition service is not available on system on latest android 11 beta. I am using: Ionic version 4. Ionic webview version: 4.2.0. Cordova-android: 9.0.0

My Target sdk version: 30

In older version of android speech recognition is working as expected.

russaa commented 4 years ago

you should check, if the "Google App" play.google.com/com.google.android.googlequicksearchbox is installed:
on most Android systems I've come across, the default/system speech recognition engine is the one that is provided by that app (and since this cordova plugin relies on the system's engine, at least one must be installed)

joshglazer commented 3 years ago

I have this app installed on my phone but am still getting this error. Is there anything else that I could try?

sdetweil commented 3 years ago

nor on Android 11 production (Samsung 8+ S20 FE 5G)

dteso commented 3 years ago

In Android 11 the connection to the voice recognition service must be done manually (https://developer.android.com/training/basics/intents/package-visibility-use-cases). Adding next code in AndroidManifest.xml worked for me:

<queries>
  <intent>
    <action android:name="android.speech.RecognitionService" />
  </intent>
</queries>
secretmoo35 commented 3 years ago

It Work for me.

In Android 11 the connection to the voice recognition service must be done manually (https://developer.android.com/training/basics/intents/package-visibility-use-cases). Adding next code in AndroidManifest.xml worked for me:

<queries>
  <intent>
    <action android:name="android.speech.RecognitionService" />
  </intent>
</queries>
OtherCarlos commented 2 years ago

@dteso That idea sounds amazing, how can I add this to my AndroidManifest.xml, if 'cordova platform add' build by himself the android folder?

@secretmoo35 you did it?

secretmoo35 commented 2 years ago

@OtherCarlos

AndroidManifest

Add this code in file "config.xml"

<platform name="android">
...
...
<config-file parent="/manifest" target="AndroidManifest.xml" xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools">
            <queries>
                <intent>
                    <action android:name="android.speech.RecognitionService" />
                </intent>
            </queries>
</config-file>
</platform>