Giter Site home page Giter Site logo

Comments (7)

andrezanna avatar andrezanna commented on August 19, 2024 3

Hi to solve the problem I had to remove the methodchannel call in onEndOfSpeech() in android/SpeechRecognitionPlugin.java.
As per documentation, on Android, RecognitionListener calls onEndOfSpeech every time a user stop talking and onResults when the recognition is completed, so in some case onRecognitionComplete can be called twice.
I'm not sure this is the best solution, but hope this helps...

from speech_recognition.

andrezanna avatar andrezanna commented on August 19, 2024 1

It's a lot time i don't use it, but the file i had to modify is this one:
https://github.com/rxlabz/speech_recognition/blob/master/android/src/main/java/bz/rxla/flutter/speechrecognition/SpeechRecognitionPlugin.java

from speech_recognition.

tsinis avatar tsinis commented on August 19, 2024 1

I am actually getting the same error and i am a newBie what can I do

Hi @ramsham2411

All you need is locate and comment this line:

speechChannel.invokeMethod("speech.onRecognitionComplete", transcription);

it can be located in SpeechRecognitionPlugin.java file. Locate it by left click with Ctrl on any of plugin classes or methods, then in address bar you can see where is cache of package located. Or just follow the video I made for you:
Watch the video

from speech_recognition.

MeStrak avatar MeStrak commented on August 19, 2024

Thanks for this tip @andrezanna. I don't know if there will be other consequences from this change, but it's good enough for the basic test I'm trying to do :)

from speech_recognition.

tsinis avatar tsinis commented on August 19, 2024

Hi to solve the problem I had to remove the methodchannel call in onEndOfSpeech() in android/SpeechRecognitionPlugin.java.
As per documentation, on Android, RecognitionListener calls onEndOfSpeech every time a user stop talking and onResults when the recognition is completed, so in some case onRecognitionComplete can be called twice.
I'm not sure this is the best solution, but hope this helps...

Hi @andrezanna,

where is that SpeechRecognitionPlugin.java file located? i dont have such at my android directory... thanks in advance

from speech_recognition.

tsinis avatar tsinis commented on August 19, 2024

It's a lot time i don't use it, but the file i had to modify is this one:
https://github.com/rxlabz/speech_recognition/blob/master/android/src/main/java/bz/rxla/flutter/speechrecognition/SpeechRecognitionPlugin.java

@andrezanna, thanks, working perfect!

from speech_recognition.

ramsham2411 avatar ramsham2411 commented on August 19, 2024

I am actually getting the same error and i am a newBie what can I do

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.