Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

onStatus method continuously shows "done" and "notListening" status even in silence mode and crashes the app in IOS #342

Closed
basnetjiten opened this issue Sep 25, 2022 · 1 comment

Comments

@basnetjiten
Copy link

I have tried restarting the listener if the status is notListening or done, but It continuously prints "done" and "notListening status. How can we be sure that it has recognized the speech and the status is "done" properly?

   void statusListener(String status) async {
       if ('notListening' == status || 'done' == status) {
      print('onStatus(): $status ');
 
     Timer(const Duration(milliseconds: 100), () {
       _initSpeech();
        startSTTListening();
     });
       // await Future.delayed(const Duration(milliseconds: 50)).then((value) => startSTTListening());
     }
  }
@sowens-csd
Copy link
Contributor

Looks like you're probably trying to implement continuous listening? There is a lengthy issue #253 which has a discussion of the issues and some code samples / recommendations.

As a general rule I don't recommend it because the platforms are not really designed for this use but I understand that each app is unique and you may well have use cases that require it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants