csdcorp / speech_to_text

A Flutter plugin that exposes device specific text to speech recognition capability.
BSD 3-Clause "New" or "Revised" License
372 stars 231 forks source link

listen Time in android #554

Closed MoazzamAliSE closed 3 days ago

MoazzamAliSE commented 1 week ago

The listen time is inconsistent in android, but in ios it works fine. why there is very less time in android for listen? although i had set the time to 1 day/ 1 hour but nothing works. we need continuous listening just like in ios. Thank you.

await _speechToText.listen( onResult: (result) { _onResultListener(result); }, listenFor: const Duration(days: 1), pauseFor: const Duration(days: 1), listenOptions: SpeechListenOptions(listenMode: ListenMode.deviceDefault), )

sowens-csd commented 1 week ago

Yes, Android has a fixed listen time that cannot be overridden. This is covered in the README and in numerous issues here.

MoazzamAliSE commented 1 week ago

yeah, i also researched about this that android has fixed listen time due to privacy concern. Thanks.

MoazzamAliSE commented 1 week ago

But in some applications like, google translate and the inbuilt keyboard's speech to text has more time.

Screenshot 2024-09-13 at 10 16 51 AM
sowens-csd commented 1 week ago

Yes, Google has access that they don't expose through the API unfortunately.