Forum Discussion
florianSB
Jan 13, 2020Brass Contributor
Web Speech API support ?
Currently Edge (81.0.381.0) is behaving strange when using the Web Speech API for speech recognition. The interface exists, but does not work AND does not throw any error. Here is a quick code examp...
MissyQ
Microsoft
Oct 19, 2020Thanks for looping me in, Fawkes! florianSB, you can enable the command line msSpeechRecognition for our Canary channel to test out the changes we've been making. If you notice any issues, remember to submit feedback to us by hitting the chat message icon on the far right side of the toolbar, or through the ... menu > Help and feedback > Send feedback. Appreciate your curiosity around this, and let me know if you have other questions. 🙂
Missy Quarry (she/her/hers)
Community Manager - Microsoft Edge
florianSB
Oct 20, 2020Brass Contributor
I've tried
.\msedge --msSpeechRecognition
and
.\msedge -msSpeechRecognition
for the most recent Canary build. The Canary version opens but I don't see any changes or improvements in the handling of the WebSpeechApi or any change on sites using the recognition feature.
Am I using the correct command?
- StephaneDezMay 12, 2022Copper Contributor
Hy mikohead
did you find a solution about the freeze ? I have the same issue 😕
it seems that it came from the onError event but i'm not sure.Regards
- dtylesJul 25, 2021Copper ContributorflorianSB
I tried your test application the day after your post and it indeed worked but the following day it stopped working (same as my own tests) producing "Error: 'E0? - network'". In Edge release notes I see that Microsoft says that support for speech recognition is added for google.com and similar web sites. I wonder if speech recognition worked for all web sites for couple days (as an oversight) and then was shutdown? Would be good to understand what Microsoft's intentions are here. - florianSBJun 09, 2021Brass ContributorIt seems to work fine for me. You can test it here: https://sepia-framework.github.io/app/index.html
(simply skip the login to get to demo mode and press the microphone below). Its an older version of my app that wasn't working for a while in Edge because of all the initial quirks in Edge's Web Speech API but it has fixed itself recently and now works almost with the same performance as in Chrome ^^. - florianSBJun 07, 2021Brass Contributor
I've just tested the Web Speech API in the current release of (normal, no-flags, non-dev, non-canary) version of Edge again ... and it seems to work well now :-). I'm cautiously optimistic that we have actually 3 browsers now (Chrome, Edge, Safari) with full support ^^. Took them only 9 years 😛
- Poodll_GuyJun 02, 2021Copper Contributor
Well I'd rather say they forgot to disable the API when they switched to the Chromium based Edge 😉
This is correct. It is also the case with Brave browser, which behaves identically. I had not realised Safari Web Speech API was now working. That is very good news. Thanks for sharing, - florianSBMay 31, 2021Brass Contributor
Poodll_Guy wrote:I don't buy that the developers forgot to hook it up.
Well I'd rather say they forgot to disable the API when they switched to the Chromium based Edge 😉
The API has been in Chromium for ages and Google simply adds the Server URL and authentication (I guess) when they build Chrome. Firefox handles this better, they have full API support as well but since they don't have a server they disable it (it was once working in Firefox Nightly when they licensed a Google Server ^^).
Poodll_Guy wrote:Its not really easy to implement speech recognition in a synchroneous way for mass users in different languages. Its got to be a massive project with timelines and project management and schedules.
True, that's why Firefox doesn't have it. Microsoft built the infrastructure for Cortana and has proven that it can work (in Edge Dev with Flags for example) but for some reason doesn't go main stream. Apple has the infrastructure built for Siri and has now enabled Web Speech API in Safari.
- Poodll_GuyMay 29, 2021Copper Contributor
If it doesn't work why is the interface sitting there pretending it does, and making it really hard to code web apps that use speech recognition?
I don't buy that the developers forgot to hook it up. Its not really easy to implement speech recognition in a synchroneous way for mass users in different languages. Its got to be a massive project with timelines and project management and schedules.
- mikoheadMar 02, 2021Copper Contributor
After some more testing, it seems Edge's SpeechRecognition API is still not usable. Here are some notes:
1) On google.com test (google voice search)
System: linux mint 20.0 Edge Dev 90.0.803.0 (Official build) dev (64-bit)
1st load - says not available
2nd load - crashes after clicking the voice search
2) With LipSurf Chrome Extension:
System: Windows 10
LipSurf semi works on Canary build, but confidence is "0" for all results, when it should be returning a decimal between 0 and 1, see below:SpeechRecognitionEvent bubbles: false cancelBubble: false cancelable: false composed: false currentTarget: SpeechRecognition {grammars: SpeechGrammarList, lang: "en-US", continuous: true, interimResults: true, maxAlternatives: 1, …} defaultPrevented: false emma: null eventPhase: 0 interpretation: null isTrusted: true path: [] resultIndex: 2 results: SpeechRecognitionResultList 0: SpeechRecognitionResult 0: SpeechRecognitionAlternative {transcript: "Scroll down.", confidence: 0} isFinal: true length: 1 __proto__: SpeechRecognitionResult 1: SpeechRecognitionResult 0: SpeechRecognitionAlternative {transcript: "Scroll up.", confidence: 0} isFinal: true length: 1 __proto__: SpeechRecognitionResult 2: SpeechRecognitionResult 0: SpeechRecognitionAlternative {transcript: "Scroll down.", confidence: 0} isFinal: true length: 1 __proto__: SpeechRecognitionResult length: 3 __proto__: SpeechRecognitionResultList returnValue: true srcElement: SpeechRecognition {grammars: SpeechGrammarList, lang: "en-US", continuous: true, interimResults: true, maxAlternatives: 1, …} target: SpeechRecognition {grammars: SpeechGrammarList, lang: "en-US", continuous: true, interimResults: true, maxAlternatives: 1, …} timeStamp: 32099.350000000413 type: "result" __proto__: SpeechRecognitionEvent
- florianSBJan 27, 2021Brass Contributor
An update on the current state:
- Flags are not required anymore
- Canary works on first try, a follow-up call wont work anymore and the 3rd call will crash the browser, always! This can be easily reproduced using google.com for testing or my own test-page
- Dev is stuck in "no internet connection" on google.com and will crash the browser occasionally
I've reported this about 2-3 weeks ago and it is unchanged ever since.
So to sum up the current state is worse than ever before due to constant crashes 😐
MissyQ Do you have any news from the dev team about it? Are they aware of these issues? Can they reproduce it?
- florianSBJan 06, 2021Brass Contributor
I've just tested the newest Canary build and it seems some errors are fixed now 🙂
"Network error" is now a proper "no-speech" error and the end event seems to trigger on a regular basis!
Looking forward for the next Dev Build!
- HenryLinDec 28, 2020Brass Contributorthe web speech api is low support now ....
T_T - florianSBDec 07, 2020Brass Contributor
MissyQ I'm happy to see that the implementation of the Web Speech API finally arrived in Edge Dev. With a bit of code tweaking I've managed to run it in an "okay" state but I've found a few bugs that I already reported via Edge Dev tools.
Just to sum this up somewhere:
- The Web Speech API generally works at least in English and German and reliably delivers interim results ...
- ... but it occasionally drops the "onend" event
- ... and throws "network" errors where it should throw "no-speech" errors
This behavior also breaks the "continuous" mode, because it constantly throws "network" errors when no speech is coming in.
The drop of the "onend" event seems to happen more frequently on a "fresh" recognizer object.
I hope the team can find and fix these bugs since they make it very hard to work with the current implementation without building a lot of Edge specific safety nets 😞
Besides that I'm really happy that Edge will finally be the 2nd major desktop browser (after almost 10 years) that delivers a functional speech recognition feature 🙂
- HenryLinOct 29, 2020Brass Contributor
the google chrome is support 'zh-TW' ,
I’m looking forward to seeing edge support this....
^^" - HenryLinOct 22, 2020Brass Contributor
thanks !! ur app is work for me , the microphone can get my speech content
do u ues Wep-Speech-API ???
https://developer.mozilla.org/en-US/docs/Web/API/Web_Speech_API
- MissyQOct 21, 2020
Microsoft
HenryLin I'm not entirely sure, to be honest! The only thing I can think of is that in your pathway to the exe file for Edge, it's missing your username (which, please don't post that here). Is that in the path when you try to run the command?
florianSB Thanks for this info! I'll forward this off to the team to let them know what you found. 🙂
Missy Quarry (she/her/hers)
Community Manager - Microsoft Edge - florianSBOct 21, 2020Brass Contributor
Thanks for the info! With this command its actually kind of working now in the latest Canary build
The strange thing is that I'm getting an intermediate result but the final result triggers a "network" error again.
I've updated my own app for testing: S.E.P.I.A. Open Assistant (sepia-framework.github.io)
You can try it yourself by extending the login box and choosing "continue without login". The microphone button is the circle at the bottom 😉 errors will be shown in the console and chat view.
I'll use the integrated Edge feedback feature to send a bug report as well.
I'm getting the same error. I think this page has some unrelated issues 😕
You can try my own app I've linked above for a more up-to-date implementation 🙂 - HenryLinOct 20, 2020Brass Contributor
"C:\Users\AppData\Local\Microsoft\Edge SxS\Application\msedge.exe" --enable-features=msSpeechRecognition
i try it and open "https://www.google.com/intl/en/chrome/demos/speech.html"
it's not work
Am I using the correct command? - MissyQOct 20, 2020
Microsoft
florianSB Appreciate your patience while I chatted with the team. They let me know that this command line should turn on the feature for you. Let me know if you are still having troubles after that! 🙂
msedge.exe --enable-features=msSpeechRecognition
Missy Quarry (she/her/hers)
Community Manager - Microsoft Edge