In more detail
A TTS system first normalizes the text (expanding numbers and abbreviations), converts words to phonemes, then generates the sound, either by joining recorded units or, in modern systems, with neural networks that model the waveform directly. Web browsers expose the voices installed on the device through the Web Speech API, where a script sets the text, voice, rate and pitch.
Why it matters
TTS makes content accessible to people who cannot read a screen, helps with proofreading by ear and powers assistants and navigation. Quality, languages and available voices depend on the device and browser, and a browser voice may differ from a cloud voice. Try the voices on your device with the Text to Speech tool.
Example
In a browser, speechSynthesis.speak(new SpeechSynthesisUtterance("Hello")) reads the word aloud with the default voice. Setting rate to 1.5 speeds it up, and pitch changes how high it sounds.