Open toshiossada opened 4 years ago
I'd also like to get a same solution to this issues =)
Encountering the same issue.
D/SpeechRecognitionPlugin(19739): onRmsChanged : -2.0
D/SpeechRecognitionPlugin(19739): onRmsChanged : -2.0
D/SpeechRecognitionPlugin(19739): onRmsChanged : -2.0
D/SpeechRecognitionPlugin(19739): onEndOfSpeech
I/flutter (19739): _platformCallHandler call speech.onRecognitionComplete bloody bloody bloody ...
<snip>
D/SpeechRecognitionPlugin(19739): onRmsChanged : -2.0
D/SpeechRecognitionPlugin(19739): onRmsChanged : -2.0
D/SpeechRecognitionPlugin(19739): onRmsChanged : -2.0
D/SpeechRecognitionPlugin(19739): onResults...
D/SpeechRecognitionPlugin(19739): onResults -> bloody bloody bloody bloody bloody bloody bloody bloody bloody bloody bloody bloody bloody bloody bloody bloody bloody bloody bloody bloody bloody bloody bloody bloody bloody bloody bloody
I/flutter (19739): _platformCallHandler call speech.onRecognitionComplete bloody bloody bloody ...<snip>
I had to comment out speechChannel.invokeMethod("speech.onRecognitionComplete", transcription);
at line 121 of android/src/main/java/bz/rxla/flutter/speechrecognition/SpeechRecognitionPlugin.java
to stop it being called twice.
Also commented out Log.d(LOG_TAG, "onRmsChanged : " + rmsdB);
to cut down on log output.
This project doesn't appear to be being maintained anymore.
How do I do this?
Fork the repo and make the changes in your own copy.
You can reference your version in pubspec.yaml with:
speech_recognition:
git:
url: git://github.com/{your_github_username}/speech_recognition.git
ref: master
thanks I'll do this
When I speak some sentence with speech_recognition the "onRecognitionComplete" are triggered twice, for example, I said "Hello how are you", it triggered "Hello how are" and "Hello how are you"... it's anyway to fix this and trigger just once??
Following logs bellow
I'm using this way
.