speech_recognition
speech_recognition copied to clipboard
stop when voice ends.
Hi there,
I want to press a listen button and it will start listens me with few second. When I stop it will ends the listing and translates to text. How do we do that?
Example: when I say "what is my balance" its stop and converts to text and search from given list and finds the "balance" word match and it open the Account or Balance page.
You can override the setRecognitionCompleteHandler method and put the code you want to run after listening stops.
Example :
_speech.setRecognitionCompleteHandler(() { setState(() { _isListening = false; _isAvailable = true; }); // do some stuff });