Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

You can't select a voice #2

Open
Leia286 opened this issue Oct 10, 2021 · 3 comments
Open

You can't select a voice #2

Leia286 opened this issue Oct 10, 2021 · 3 comments

Comments

@Leia286
Copy link

Leia286 commented Oct 10, 2021

You can still use it, but no voice selection on iPad running Safari.

@zolomohan
Copy link
Owner

zolomohan commented Oct 10, 2021

Hi @Leia286

The voices are being fetched from the browser.

let voices = [];
window.speechSynthesis.onvoiceschanged = () => {
  voices = window.speechSynthesis.getVoices();
  speech.voice = voices[0];
  let voiceSelect = document.querySelector("#voices");
  voices.forEach((voice, i) => (voiceSelect.options[i] = new Option(voice.name, i)));
};

I'm not sure if Safari on iPad has different voices available.

@Leia286
Copy link
Author

Leia286 commented Oct 10, 2021

I am able to use this JS file in a different TTS project
https://github.com/Leia286/my-speech-app/blob/main/main.js
Check it out. It's in JQuery. Maybe this might help?

@KristjanESPERANTO
Copy link

@Leia286 I had the same problem with Chrome and Chromium. I fixed it and created a PR. Maybe this will fix your problem with Safari to. You are welcome to try my fork: https://github.com/KristjanESPERANTO/text-to-speech

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants