How to repair invalid SpeechRecognition API after edge Version 111.0.1661.54

Hilbrand Valham 0 Reputation points
2023-03-26T02:23:14.3566667+00:00

Recently, after I updated my Edge browser, I discovered some speech-to-text extensions were unable to recognize my voice. Through my research, I found that the reason could be due to an API called SpeechRecognition. In Chrome, the speech-to-text API used to be called 'webkitSpeechRecognition', but Edge doesn't support this API.

However, in a recent update to Edge, the SpeechRecognition API became invalid for some reasons I don't know.I tried and find that I cannot use any other likely speech-to-text services on other websites while using Edge but they work in Chrome.

In the morning, I wrote a web page to test this interface and successfully reproduced this error. Can you please let me know if it's my problem or do I need to wait for the official fix from Edge?

User's image

When I click "stop", there is no output on the webpage. When I try to recognize for the second time, it will output: "

Uncaught DOMException: Failed to execute 'start' on 'SpeechRecognition': recognition has already started.

    at HTMLButtonElement.<anonymous> (file:///E:/Project/talk-to-chatgpt/chrome-extension/test.html:26:25)

I have enabled the Experimental JavaScript in the experimental web platform feature.
Microsoft Edge
Microsoft Edge
A Microsoft cross-platform web browser that provides privacy, learning, and accessibility tools.
2,125 questions
JavaScript API
JavaScript API
An Office service that supports add-ins to interact with objects in Office client applications.
866 questions
{count} votes

1 answer

Sort by: Most helpful
  1. ShiJieLi-MSFT 7,391 Reputation points Microsoft Vendor
    2023-03-27T09:14:39.8233333+00:00

    Hi @Hilbrand Valham ,

    Normally, webkitSpeechRecognition should work in Edge as well because in this doc it says Edge is "Implemented with the vendor prefix: webkit".

    Judging from the error message, it is caused by multiple "start" event triggered by button click as mentioned in your question. It can just possibly be the network issue which caused the first attempt failure. You can also provide a minimal code example that can help us reproduce this issue if possible.


    If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".

    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

    Best Regards,

    Shijie Li

    0 comments No comments