Closed Fhyrel closed 2 years ago
I am also looking for same solution. I tried Future delay but it is not logically correct to use it after every interval. Please help
Same here.
I am experimenting with workarounds for this for some use cases, I don't know when I'll have something to share. However, if you are looking for more of a background command listener then I think it would be better to look at integration with either Siri or Google Assistant.
can you do a loop and if returns error_no_match then run until it does not equal error_no_match?
Looking for the same trick. There is a google-made transcription device which does not stop at all.
I've found a method for my use-case. I needed to listen to the voice while the user wasn't watching the phone. Better if it is in a pocket. So I used the wakelock to stay in foreground, then I made myself an Android plugin to catch the hearset's media button and with the plugin's method channel callback I start to listen the voice 🤙
Inviato da Outlook Mobilehttps://aka.ms/blhgte
From: akk99 notifications@github.com Sent: Sunday, May 31, 2020 5:22:42 PM To: csdcorp/speech_to_text speech_to_text@noreply.github.com Cc: Ivan Territo ivan.territo@hotmail.it; Author author@noreply.github.com Subject: Re: [csdcorp/speech_to_text] Did somebody found a trick or workaround to continuosly get speech and don't stop while not listening a voice?? (#63)
Looking for the same trick. There is a google-made transcription device which does not stop at all.
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHubhttps://github.com/csdcorp/speech_to_text/issues/63#issuecomment-636485597, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ABOO5EGLUMCOKXCI4UUULGTRUJY4FANCNFSM4MFLPVYQ.
Would you be able to share the trick? BTW, was wakelock essential for cases when app remains in foreground with screen on?
I've got something working, basically just listening to the stream from SpeechToTextProvider and whenever a FinalRecognitionEvent or ErrorEvent comes through, start listening again. Example: https://github.com/AlexHartford/voice_control_ui/blob/master/packages/voice_control_ui/lib/speech.dart
@AlexHartford Is it working seamlessly for you ? I also the continuous listening, but on Android, i have some "dead" time periods where listening doesn't work... Seems to be because of the super short speech timeout
@AlexHartford Is it working seamlessly for you ? I also the continuous listening, but on Android, i have some "dead" time periods where listening doesn't work... Seems to be because of the super short speech timeout
Exactly. Doesn't work on Android, due to speech to text device's timeout. You can't control it. So I used the wakelock to stay in foreground, then I made myself an Android plugin to catch the hearset's media button and with the plugin's method channel callback I start to listen the voice. I didn't found another method, but this one is fine form me.
Source-Ref: 'package:speech_to_text/speech_to_text.dart'
[listenFor] sets the maximum duration that it will listen for, after that it automatically stops the listen for you.
[pauseFor] sets the maximum duration of a pause in speech with no words detected, after that it automatically stops the listen for you.
await _speechToText.listen(onResult: _speechResult, listenFor: Duration(minutes: 20), pauseFor: Duration(seconds: 6));
Please see the SpeechToText class file to get more information.
I need to continuosly listen the voice over the silences. When a "silence" comes i get "error_no_match". I tried to restart the listening every time I get "error_no_match", but it is not reliable. In the moment the service stops and restarts I have a void where I can't get the voice and I lose the meaning..
PLS help if you have found something useful.
Ivan.