csdcorp / speech_to_text

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

What are the different apps for in example folder? #473

Closed timmolter closed 3 months ago

timmolter commented 3 months ago
Screenshot 2024-01-09 at 2 24 36 PM

For example stress.dart and repro.dart, etc. Consider adding comments in the files or descriptions in the README under the examples folder.

Also, would you consider the "Continuous Listening Demo" here good enough to include as a demo to be added in examples?

sowens-csd commented 3 months ago

Good thoughts on improving the comments on those. I should also do some cleanup in that folder.

I've been thinking about continuous listening and whether I should add it as a library method given how popular it is as a feature request. It would never be perfect but at least all the users could converge on a single implementation. I've been hesitant because the results will always be at best okay, but if I document it properly it might be an improvement on the status quo.

timmolter commented 3 months ago

Cool, it'd be greatly appreciated! :)

Yes, I agree that there should be a base line or "best" approach to the continuous listening demo app somewhere, and in this repo would of course be the ideal place. That way, we could all understand the limitations (assuming you also clearly list them) and we as a community could take that baseline demo, and try to hack some improvements onto it.

Your demo I linked to above seems to be the best one I've found so far. But I'm still hesitant to implement something like that in a production app. I wish I knew the limitations or potential pitfalls ahead of time before I invest too much time and effort into this method of STT.

One quick question regarding this package that I haven't seen a definite answer to yet: Can the beep sound on Android be disabled?

sowens-csd commented 3 months ago

No, the beep cannot be disabled AFAIK. It is built in at the OS level and I haven't found an option to disable it.

The key issue with continuous listening is that the OS explicitly doesn't support it. So it means starting and stopping the OS level listener which will cause breaks in recognition, those breaks could be in the middle of words, so recognition would be less accurate. There's also smaller things like the beep sounds that would occur on each start / stop section on Android and of course the increased chance of hitting the capacity limits on speech recognition if using online rather than on-device.

sowens-csd commented 3 months ago

I've just pushed 6.6.0 with improved documentation for the various sample apps. I'll do further upgrades to the samples in upcoming versions.