Giter Site home page Giter Site logo

Comments (6)

erik-seifert avatar erik-seifert commented on July 19, 2024 2

See here https://stackoverflow.com/questions/35248075/android-speech-recognition-insufficient-permission-error-code-9/35784764

Work for me (Error 9)

from speech_recognition.

LouisDeGuinness avatar LouisDeGuinness commented on July 19, 2024 1

About error 7 (https://developer.android.com/reference/android/speech/SpeechRecognizer):

public static final int ERROR_NO_MATCH
No recognition result matched.

Constant Value: 7

(0x00000007)

So whatever you're saying is not properly recognized. Error 6 means timeout, i've came across that one too.

Trying to figure out error handling right now, i'll update this post if i succeed.

Edit:
Seems there is already a Pull request, fixing this problem
(#5)

from speech_recognition.

GurgenHOVH avatar GurgenHOVH commented on July 19, 2024 1

I have faced the same issue. Fixed it by enableing microphone permision from app settings. Also you can do that programatically with this plugin https://pub.dartlang.org/packages/simple_permissions.

from speech_recognition.

qalqi avatar qalqi commented on July 19, 2024 1

Firstly the speech recognition doesn't work on Android Emulator.
You can install with USB and then have to provide microphone permissions from app settings or alternatively, as suggested by @gurgenDP you can do the following

import 'package:simple_permissions/simple_permissions.dart';


 initState() {
    super.initState();
    _checkAudioPermission();
    activateSpeechRecognizer();
  }


 void _checkAudioPermission() async {
    bool hasPermission =
    await SimplePermissions.checkPermission(Permission.RecordAudio);
    if (!hasPermission) {
      await SimplePermissions.requestPermission(Permission.RecordAudio);
    }
  }

from speech_recognition.

lejard-h avatar lejard-h commented on July 19, 2024

Same error for me on the last version, I have log on Android log cat

java.lang.ArrayIndexOutOfBoundsException: length=1; index=1
  at bz.rxla.flutter.speechrecognition.SpeechRecognitionPlugin.getLocale(SpeechRecognitionPlugin.java:86)
  at bz.rxla.flutter.speechrecognition.SpeechRecognitionPlugin.onMethodCall(SpeechRecognitionPlugin.java:67)
  at io.flutter.plugin.common.MethodChannel$IncomingMethodCallHandler.onMessage(MethodChannel.java:191)
  at io.flutter.view.FlutterView.handlePlatformMessage(FlutterView.java:643)
  at android.os.MessageQueue.nativePollOnce(Native Method)
  at android.os.MessageQueue.next(MessageQueue.java:328)
  at android.os.Looper.loop(Looper.java:148)
  at android.app.ActivityThread.main(ActivityThread.java:6361)
  at java.lang.reflect.Method.invoke(Native Method)
  at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1063)
  at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:924)

from speech_recognition.

ColquePaxi avatar ColquePaxi commented on July 19, 2024

This plugin is very very interesting and a great use case. Congratulations!!!

But same error to me too on Android. Anybody had sucessful?

I/FlutterActivityDelegate(19695): onResume setting current activity to this
I/flutter (19695): _MyAppState.activateSpeechRecognizer... 
Syncing files to device SM T330...
D/SpeechRecognitionPlugin(19695): Current Locale : pt_BR
I/flutter (19695): _platformCallHandler call speech.onCurrentLocale pt_BR
D/ViewRootImpl(19695): ViewPostImeInputStage ACTION_DOWN
I/flutter (19695): _MyAppState.start => result true
D/SpeechRecognitionPlugin(19695): onError : 9
I/flutter (19695): _platformCallHandler call speech.onSpeechAvailability false
I/flutter (19695): _platformCallHandler call speech.onError 9
I/flutter (19695): Unknowm method speech.onError 
Application finished.

from speech_recognition.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.