leaonline / easy-speech

🔊 Cross browser Speech Synthesis also known as Text to speech or TTS; no dependencies; uses Web Speech API
https://leaonline.github.io/easy-speech/
175 stars 20 forks source link

`onend` event don't work on Safari #226

Open alexlana opened 8 months ago

alexlana commented 8 months ago

Is your feature request related to a problem? Please describe. The end event is messy in Safari.

Describe the solution you'd like By adding window. before the variable utterance it works perfectly in Safari.

I worked on it in a fork, if you think it can be helpful, I will love to contribute.

jankapunkt commented 8 months ago

Hey @alexlana thank your for reporting. Can you please specify the line of the code, where utterance exists? => https://github.com/jankapunkt/easy-speech/blob/master/src/EasySpeech.js

Of course, I would be very pleased to see a pull request on this.

jankapunkt commented 8 months ago

@alexlana where do you actually put window in front of utterance?