I'm using SpeechSynthesisUtterance
in javascript and cannot find a list of the languages supported.
Does anybody know how to get a list of the languages containing the code and the name of the language?
example. English-US en-US Japanese ja-JA
The SpeechSynthesisUtterance interface of the Web Speech API represents a speech request. It contains the content the speech service should read and information about how to read it (e.g. language, pitch and volume.)
cancel() The cancel() method of the SpeechSynthesis interface removes all utterances from the utterance queue. If an utterance is currently being spoken, speaking will stop immediately.
To use a voice, set the voice property on your SpeechSynthesisUtterance instance to the desired SpeechSynthesisVoice object. The example below shows how to do this. var utterance = new SpeechSynthesisUtterance('Hello Treehouse'); var voices = window. speechSynthesis.
speechSynthesis. The speechSynthesis read-only property of the Window object returns a SpeechSynthesis object, which is the entry point into using Web Speech API speech synthesis functionality.
https://developer.mozilla.org/en-US/docs/Web/API/SpeechSynthesisUtterance/lang
Review this. But to make a very long story short, the language setter/getter returns a BCP-47 language tag. List here. No guarantee that any are particularly supported per a browser, as a comprehensive list of supported values doesn't actually exist.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With