emre
emre

Reputation: 41

flutter speech_to_text example SpeechRecognitionError

I'm trying to run speech_to_text example project (here) on my phone for an another project. I'm clone the least version and only update these lines:

path: speech_to_text/example/android/build.gradle

line 2: ext.kotlin_version = '1.6.10'
path: speech_to_text/example/android/app/src/main/AndroidManifest.xml

line 14: android:name="${applicationName}"

Also I didn't change any permissions on AndroidManifest.xml. (reference)

    <uses-permission android:name="android.permission.RECORD_AUDIO"/>
    <uses-permission android:name="android.permission.INTERNET"/>
    <uses-permission android:name="android.permission.BLUETOOTH"/>
    <uses-permission android:name="android.permission.BLUETOOTH_ADMIN"/>
    <uses-permission android:name="android.permission.BLUETOOTH_CONNECT"/>
    <queries>
        <intent>
            <action android:name="android.speech.RecognitionService" />
        </intent>
    </queries>

And application installed clearly, there is no problem. But when I want to start recognition in application, application writes to screen error_permission - true like this.

flutter permission error

Here is error log:

I/flutter (27860): 2022-02-21T00:43:41.721954 start listening
D/SpeechToTextPlugin(27860): Start listening
D/SpeechToTextPlugin(27860): setupRecognizerIntent
D/SpeechToTextPlugin(27860): Notify status:listening
D/SpeechToTextPlugin(27860): Start listening done
D/SpeechToTextPlugin(27860): Error 9 after start at 5 1000.0 / -100.0
D/SpeechToTextPlugin(27860): Notify status:notListening
D/SpeechToTextPlugin(27860): Notify status:doneNoResult
I/flutter (27860): 2022-02-21T00:43:41.829552 Received listener status: listening, listening: true
I/flutter (27860): 2022-02-21T00:43:41.834224 Received listener status: notListening, listening: false
I/flutter (27860): 2022-02-21T00:43:41.835629 Received listener status: done, listening: false
I/flutter (27860): 2022-02-21T00:43:41.837419 Received error status: SpeechRecognitionError msg: error_permission, permanent: true, listening: false

I'm very new to flutter and I don't know which I'm missing. Thanks.

Upvotes: 2

Views: 1034

Answers (1)

Dongjun Cha
Dongjun Cha

Reputation: 39

it doesn't work on the eumulator. try on your real device.

Upvotes: 1

Related Questions