SOLVED

Web Speech API support ?

Brass Contributor

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 example:

 

var rec = new window.webkitSpeechRecognition(); 
rec.onresult = console.log; 
rec.onerror = console.error;
rec.start();

 

Are there any plans to either:

a) Fully implement the speech recognition part or ...

b) ... throw proper errors?

 

Since Microsoft is already using speech recognition in Windows, has the technology for offline and online ASR and has the cloud architecture it should be no big deal to fully support it right? :lol:

 

It would be really great to finally get a 2nd browser that actually has a working implementation of the API (Google is doing it for 6 years now since Chrome 33).

50 Replies

@HenryLin 

Great to hear!

Lets see what the next Dev build will bring ^^.

@Deleted @HenryLin 

 

I've seen in the latest "Top Feedback Summary" that the voice issue has been moved from September to November with the comment "We have been hard at work to improve this feature and you can currently turn it on via command line in Canary"

 

I was wondering if anybody knows the actual command line command?

@florianSB Good question! Tagging in @MissyQ, who writes our Top Feedback, to see if she can provide more info.

 

Fawkes (they/them)
Program Manager & Community Manager - Microsoft Edge

Thanks 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

Could someone with this enabled in Canary, if it's not too inconvenient, check to see if Edge will now work with speaking exercises in Duolingo? :)

@MissyQ 

 

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?

@florianSB Appreciate you letting me know. I have reached out to the team for advice on how to get this working for you. Stay tuned! :)

 

Missy Quarry (she/her/hers)
Community Manager - Microsoft Edge

@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

"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?

 

HenryLin_0-1603238006022.png

 

@MissyQ 

Thanks for the info!  With this command its actually kind of working now in the latest Canary build :lol:

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.

 

@HenryLin 

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 :)

@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

@florianSB 

 

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

@HenryLin yes, it does :)

@florianSB 

when I use the lang = 'en-US' , it's work

but change the lang to 'cmn-Hant-TW' or 'zh-TW' or 'zh-CHT' , it's error ..

it's only support 'en-US' now?

@HenryLin 

I'm still getting the 'network' error on final result, but in general 'zh-CN' seems to work and most of the popular other languages like Spanish, German, French, etc. etc.


the google chrome is support 'zh-TW' ,
I’m looking forward to seeing edge support this....

^^"

@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 :)

the web speech api is low support now ....

T_T

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!