People using Typey Type's "Speak words with sound" setting often get weird voices reading out the words. They often don't match A) the person's general expectations of what they think they should hear (e.g. US/GB/AU dialect or the language of the words they're typing in custom lessons like DE) or B) what the person expects, given their browser and OS settings.
Approach
Add options to control the voice, which in practice probably means a setting for A) controlling the "language" e.g. "en", "en-GB", "en-AU", and B) based on the language, a setting for picking a voice from the available voices for that language.
Background
Typey Type currently sets the web page's HTML lang to "en" and otherwise does not set the speech synthesis utterance language (lang property) or voice. The resulting voice depends largely on the user's system.
The web speech synthesis API and related variables are pretty wild. The behaviour and resulting voice depends on the combination of the user's: browser, browser version, browser language setting, operating system, operating system version, operating system language, installed voice packs, text-to-speech engines set. It also depends on Typey Type's lang attribute and what Typey Type sets as the lang and voice on the web speech synthesis utterance. There are also random details to consider like how Chrome's voices are not ready on page load.
Details
Typey Type UI and default material is all in English, and many lessons are in British English. Many people use Typey Type with other languages, especially in custom lessons.
Ideally Typey Type remembers the user's preferred lang and voice but in some cases (e.g. Chrome) they probably won't be available on page load.
It's possible some people will have no voices available for a given dialect. (Could that happen where they have "en-US" voices but not "en" voices?)
The problem
People using Typey Type's "Speak words with sound" setting often get weird voices reading out the words. They often don't match A) the person's general expectations of what they think they should hear (e.g. US/GB/AU dialect or the language of the words they're typing in custom lessons like DE) or B) what the person expects, given their browser and OS settings.
Approach
Add options to control the voice, which in practice probably means a setting for A) controlling the "language" e.g. "en", "en-GB", "en-AU", and B) based on the language, a setting for picking a voice from the available voices for that language.
Background
Typey Type currently sets the web page's HTML
lang
to"en"
and otherwise does not set the speech synthesis utterance language (lang
property) or voice. The resulting voice depends largely on the user's system.The web speech synthesis API and related variables are pretty wild. The behaviour and resulting voice depends on the combination of the user's: browser, browser version, browser language setting, operating system, operating system version, operating system language, installed voice packs, text-to-speech engines set. It also depends on Typey Type's
lang
attribute and what Typey Type sets as thelang
andvoice
on the web speech synthesis utterance. There are also random details to consider like how Chrome's voices are not ready on page load.Details