Giter Site home page Giter Site logo

Comments (8)

shinayser avatar shinayser commented on July 19, 2024 3

I solved that on iOS by using a timer. Every time a new word comes from the speech recognition stream, I call it:

if (forceDetectSpeechDetectionOff) {
      _lastWordTimer?.cancel();
      _lastWordTimer = Timer(Duration(milliseconds: 1000), () {
        recognition.stop();
      });
    } 

from speech_recognition.

monggos avatar monggos commented on July 19, 2024 1

@tsinis

declare a class Timer variable..
Line: 53

put it on your callback..

Line: 182 to 186

Screen Shot 2019-10-11 at 4 42 55 PM

from speech_recognition.

antonmolchan avatar antonmolchan commented on July 19, 2024

@shinayser
Hi, i write the same code, works good.
Maybe you know how on android set listening only for eng language ? When i start application on phone with rus language, application try to listen rus or eng voice(when i say only one word, in most cases i seen rus text), but when i setup phone on eng language all works fine.
This exception of library, in android path.

from speech_recognition.

tsinis avatar tsinis commented on July 19, 2024

@antonmolchan @shinayser
Guys, sorry for noob question, but how to implement this code?

if (forceDetectSpeechDetectionOff) {
      _lastWordTimer?.cancel();
      _lastWordTimer = Timer(Duration(milliseconds: 1000), () {
        recognition.stop();
      });
    } 

There is no boolean forceDetectSpeechDetectionOff in this package, so as _lastWordTimer definition... Thanks

from speech_recognition.

tsinis avatar tsinis commented on July 19, 2024

@tsinis
declare a class Timer variable..
Line: 53
put it on your callback..
Line: 182 to 186

@monggos
Awesome, now I get it, at first I didn’t understand where the Тimer class comes from etc. Now it's works like a charm. Thanks a million!

from speech_recognition.

ramsham2411 avatar ramsham2411 commented on July 19, 2024

I am having a problem with IOS, OnRecognitionResultHandler is never called after speaking. As @monggos showed, I did follow the same but not Working Any Suggestions.

from speech_recognition.

monggos avatar monggos commented on July 19, 2024

@ramsham2411 first, check your callback registration if set correctly.. like this..

Screen Shot 2019-11-12 at 11 12 41 PM

from speech_recognition.

beevelop avatar beevelop commented on July 19, 2024

Wouldn't it be useful to have an optional timeout to configure (like SpeechTimeout)? It's unexpected that this behavior differs between iOS and Android.

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.