2

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.

2
  • have you add internet permission in the AndroidManifest.xml file? Commented Feb 21, 2022 at 6:38
  • @HeIsDying already exists in AndroidManifest.xml and I did not change it Commented Feb 21, 2022 at 9:28

1 Answer 1

1

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

Sign up to request clarification or add additional context in comments.

1 Comment

Your answer could be improved with additional supporting information. Please edit to add further details, such as citations or documentation, so that others can confirm that your answer is correct. You can find more information on how to write good answers in the help center.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.