Loading...
const u = new SpeechSynthesisUtterance('Bonjour tout le monde');
speechSynthesis.speak(u);const u = new SpeechSynthesisUtterance('Bonjour tout le monde');
u.lang = 'fr-FR';
speechSynthesis.speak(u);Setting lang lets the browser pick a matching voice instead of reading French with the default one.
lang unset, so the text is read with the wrong voice and accent.lang property matches the language of the text.Listen for its end event. Many voices also fire boundary events at word or sentence boundaries.
rate and pitch take?rate goes from 0.1 to 10 and pitch from 0 to 2. For both, 1 is the normal value.
No, changes apply only the next time it is spoken. Cancel the current speech and speak a new utterance instead.