Merge pull request #4848 from buildwithricky/fix/Domina-Mode-is-speaking-in-indian-on-safari

fix(Domina): fix #4782 to allow domina mode to switch from an Indian accent to other accents in dropdown on safari browsers
This commit is contained in:
Johannes Millan 2025-07-27 12:06:24 +02:00 committed by GitHub
commit f2e959adeb
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -12,7 +12,7 @@ export const speak = (text: string, volume: number, voice: string): void => {
const utter = new SpeechSynthesisUtterance();
utter.text = text;
utter.voice =
synth.getVoices().find((v) => v.name === voice) ||
synth.getVoices().find((v) => voice.includes(v.name)) ||
synth.getVoices().find((v) => v.default) ||
null;
utter.volume = volume;