SpeechRecognition event listener on mac Safari

202 Views Asked by At

I am building an application using the Web API SpeechRecognition, but onspeechstart and onspeechend listener are not working. https://developer.mozilla.org/ja/docs/Web/API/SpeechRecognition

The version of Safari is 15.0.

The relevant code is as follows. The language is typescript (javascript).

const SpeechRecognitionrecognition = (window as any).webkitSpeechRecognition;
speechRecognizer = new SpeechRecognitionrecognition();
speechRecognizer.onspeechstart = () => {
  // Process when the user starts speaking
};
speechRecognizer.onspeechend = () => {
  // Processing when speech is finished
};

Are there any settings that are necessary to use these event listeners in Safari? If you know anything about it, I would appreciate it if you could let me know.

0

There are 0 best solutions below