GithubHelp home page GithubHelp logo

Comments (2)

sowens-csd avatar sowens-csd commented on September 17, 2024 1

Interesting. I haven’t tried this case. I’ll try it out. It will be a few weeks before I can look at it.

from speech_to_text.

uphoon avatar uphoon commented on September 17, 2024

Hello, I have experienced issues with microphone recognition via car Bluetooth. I have conducted further tests. First, take a look at the code below:


...

  void listening() async {
    _available = await speech.initialize(
      onError: (error) {
        print(error.errorMsg);
      },
      onStatus: (status) async {
        if (status == "notListening") {
          // No action taken when not listening
        } else if (status == "done") {
          await speech.stop();
          setState(() {
            isListening = false;
            listening();  // <<< Microphone recognition works from the second call onwards
          });
        }
      },
    );
    
    if (_available) {
      await speech.listen(
        onResult: (result) {
          // Code continues below
      ... 
  }

To provide more detail, when the app is first launched, the microphone is activated for the first time, recognizes the speech correctly, and returns accurate results. However, from the second attempt onwards, the microphone fails to recognize any speech.

I tested using a recursive function as shown in the code above, and from the second call to the listening() function, the microphone was recognized correctly.

I believe this is not the correct way to handle this situation, but I hope this information helps in resolving the bug.

Have a great day.

from speech_to_text.

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.