csdcorp / speech_to_text

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

The listner stops after a very short silence period #294

Closed FerasAlhammoud closed 2 years ago

FerasAlhammoud commented 2 years ago

In my Android app user needs to say a long sentence, the problem is if he stops talking for a very short time just to take a breath, the listner stops. In the documentation of "Android speech recognition" they mentioned how to increase the silence period:

https://developer.android.com/reference/android/speech/RecognizerIntent.html#EXTRA_SPEECH_INPUT_COMPLETE_SILENCE_LENGTH_MILLIS

Thanks in advance

sowens-csd commented 2 years ago

Things may have changed since I last tried these but all of the Android speech tuning parameters I've tried in the past have been completely ignored by the OS. Even the docs you linked to notes that:

Note that it is extremely rare you'd want to specify this value in an intent. If you don't have a very good reason to change these, you should leave them as they are. Note also that certain values may cause undesired or unexpected results - use judiciously! Additionally, depending on the recognizer implementation, these values may have no effect.

I'll try again at some point to see if newer OS builds have changed the behaviour.

piratejoe commented 2 years ago

Flutter web: custom pauseFor and listenFor values not taking effect. The pauseFor duration is definitely something I would want to tweak. Otherwise works great!

sowens-csd commented 2 years ago

I'm surprised those don't work on FlutterWeb. I should probably extend the example app to allow those two parameters to be tuned so I can more easily check reports like these. I'll do that and then see what's up with them.

sowens-csd commented 2 years ago

I just committed a change to the example app to allow the pauseFor and listenFor options to be set in the UI. I tried those options in the example on the web and they seemed to be working. Could you give the example app a try and let me know if you see issues?

dyardy commented 1 year ago

This still seems to be an issue. i.e. Android cuts off after very short period. Modifying pausefor and listenfor really didn't change anything.

sowens-csd commented 1 year ago

Yes, this is covered in the README. Android does not provide any control over the no speech detected time out.