Comments (6)
Work for me (Error 9)
from speech_recognition.
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.
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.
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.
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.
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)
- Flutter web? HOT 3
- I/flutter (11568): Unknowm method speech.onError on unclear voice
- Auto detect language HOT 1
- How to implement this plugin with a text field and enable user to modify the text?
- Stop when voice end
- Unknowm method speech.onError HOT 1
- new problem on flutter > iOS build (from android studio) HOT 1
- does not work for Android while is working with iOS
- Is it possible to get the .mp3 file?
- Listen unless user finishes
- Can this be used offline?
- speech_recognition ios build target change HOT 2
- use 2 different SpeechRecognition in one class is not working !! HOT 1
- The stop button does not work
- 2 Bips
- onErrorHandler
- Availability for Mandarin Chinese
- Android local language speech detect and text in local language HOT 1
- Problem after adding AndroidX Compatability HOT 1
- Old SDK required? HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from speech_recognition.