Text UtilitiesLesson 128Free preview
Text to Speech
This lesson is part of Web Developer Tools · All levels
Summary
Text to speech converts text into sound using synthetic sounds in a device or browser. On the web, the Web Speech API provides SpeechSynthesisUtterance to organize text, language, speed, and pitch. This feature improves accessibility for users who have difficulty reading text. The sound quality depends on the sound available in the user's system.
Key points
- The Web Speech API uses the speech synthesis object
- Set properties like id-id to match the punctuation
- Rate set speed and pitch set loudness
- Available sound differs between browsers and operating systems
- Set up stop control and avoid disruptive autoplay
Full lesson
Code examples and quizzes
Full lessons, code examples, and quizzes are available to subscribers. 5 questions.