Closed Gene-Dana closed 3 years ago
Not yet, but it's an interesting idea. Do you know if Chrome (or other) browsers have speech recognition capabilities natively? Do you have any links?
Not yet, but it's an interesting idea. Do you know if Chrome (or other) browsers have speech recognition capabilities natively? Do you have any links?
Yes, Chrome is the only browser that has implemented it so far!
I cannot wait for Flutter Web.
I wanna create a flutter app with your awesome SpeechToText.
It is not compatible now.
More love for Flutter Web. If I would find the time to implement this would you accept a pull request?
Definitely! Always happy to have contributions. With the usual proviso that I'd review it for general code cleanliness and other goodness on the way in to make sure I could support it.
How would you feel about using an online stt provider for web support?
The problem is that it requires separate accounts and usually there's a cost associated with it. It would make the web implementation very different from the iOS or Android. If there were a lot of interest in using online STT then adding it as an option for any deploy target might make sense.
For those watching this issue the 3.0.0 version which is in main now is work in progress towards supporting this. It breaks out the platform interface so that it can be reimplemented for web. So, web support is not here yet but it is progressing.
I'd love that! The only thing missing for me
The current version on main has support for web if anyone wants to give it a try. I still need to add platform capability tests so that the plugin can report failure on browsers that don't support speech yet. Looks like right now Chrome and Edge support it.
@sowens-csd Thanks so much! I have one problem though. When I launch the app (even your example web app) it throws this error. I ran it on chrome V88 and edge (Chromium) V88. Let me know if you need any more info
Error: Expected a value of type 'JSObject
Same error as @Nicicalu
Thanks so much for trying it out, I really appreciate it. Did you run the new multi_platform_example/lib/main.dart
app? And what Flutter channel were you running? I used beta.
Also, and I know this shouldn't matter, but just so I have all the details, what OS are you running it on? I've tried it on Chrome Version 88.0.4324.96 (Official Build) (x86_64) running on Big Sur.
@sowens-csd I am running dev channel. But ran the file multi_platform_example/lib/speech_main.dart
because you added this file in your newest commit.
Ok, I tested it on the beta channel and the launching the main.dart
worked.
Then, I did flutter upgrade
so I have the newest flutter beta channel version, and it's not working any more.
I am on Windows 10 20H2 (Build 19042.746), probably not important, because it worked, with the other beta channel version.
Thanks for the feedback. I'll see what's going on with the beta upgrade, hopefully not too serious.
@sowens-csd Thanks for your quick response! I am working on a school project where I use your library. Thanks<3
Should be resolved now in the version in the repo. Getting closer to a release version. Flutter added native support for some of the underlying speech events in that beta upgrade so there were type conflicts.
@sowens-csd I tested it and it worked fine! :) Thank you. Do you know if it's possible, that you can say words of different languages in one sentence? Like "Translate me Bahnhof to english".
Thanks for the quick feedback, glad it's working. I better release before the Flutter team breaks it again.
As far as I know that is not supported by any of the speech recognition systems other than some 'adopted' words that are effectively native to that language, like hors d'oeuvres used in English.
How would you create a translator using this plugin? Any tips? :) @sowens-csd
I suppose I'd look at something like this https://cloud.google.com/translate or https://aws.amazon.com/translate/ fronted with speech recognition to create the text to send to the API. Both of those have fairly generous free tiers so they would be fine for a school project for example.
@sowens-csd Thanks for this information. My problem is, that translation should be one of many functions (Like a voice assistant). But I think I can get creative and combine it with these cloud services. Thanks again :)
Hi, I use version 3.2.0 and works fine on android with all locales, but on web when I change locale it has no effect and recognize English again... is there limitation on locales on web ?
Not a limitation, more of a bug. Can you try it with the fix I just committed? I haven't tested it yet because I'm on a different version of Flutter but it should resolve the issue.
@sowens-csd For me it didn't work, I used your example, where there is a dropdown for the locales. On web it isn't working, even with the new commit. (At least for me)
Not a limitation, more of a bug. Can you try it with the fix I just committed? I haven't tested it yet because I'm on a different version of Flutter but it should resolve the issue.
@sowens-csd It works for me, thanks a lot...
@sowens-csd Now the speech recognition is interpreting everything as English text. In the last version it would understand German
web support is available in 4.0.0-nullsafety which is live on pub.dev now.
I tried French comprehension and it was working, the main issue seems to be getting the language code right. Unlike Android / iOS I haven't yet found a reliable source for the language codes. I hope to resolve that in an upcoming release. So far all I have tested successfully are 'en_US' and 'fr_FR'. @Nicicalu my German is not good enough to test it even if I did know the language code for sure, have you tried just 'de'?
@sowens-csd Thanks for your answer. It looks like it's working in the newest version (4.0.0-nullsafety). Thank you for your constant effort. 🎉
Guys, this makes me so happy !
Should I close the issue now?
Yes, everything works for me ;)
Hearing that makes me happy, thanks! And yes, @Gene-Dana, please feel free to close. Always satisfying.
Are there any list of web browsers that this plugin should work in theory? desktop browsers and mobile browsers, edge, safari, etc.
The plugin should support any browsers that support the web speech recognition standard. There's a section in the README with the info I've found on it.
Just wondering if this would work in something like Flutter Web to expose the methods of a browser like chrome!