I have a Flutter application for mathematic field. (targeted to android, ios, web?).
In a section, I need to get user voice continuously(max: 3mins) listening for a specific (pre-defined) words, without any interruption! Each time the user says one of the specific words, the application should go to next step.
Could you mention what you have done in that kind of situations, please? Or, what is your preferred solutions?
I have tried to use "speech_to_text: ^6.4.0" pub package, but it's not working continuously!
As shown in the code, the listenFor property didn't wait for 3 minutes! It's just listening while the user is speaking, otherwise it will be stopped!
if (available) {
setState(() {
_isListening = true;
});
_speech.listen(
onResult: (result) {
setState(() {
_text = result.recognizedWords;
});
},
listenFor: const Duration(minutes: 3),
);
}