didoesdigital / typey-type

Typey Type for Stenographers is a free typing app designed specifically to help steno students practise and rapidly master stenography.
https://didoesdigital.com/typey-type
GNU Affero General Public License v3.0
90 stars 15 forks source link

Let people pick a voice for "Speak words with sound" setting #141

Closed didoesdigital closed 10 months ago

didoesdigital commented 11 months ago

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 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