08Speech synthesis
Text‑to‑Speech Interaction
A playful voice that makes the prototype more fun and interactive.
In this prototype we use the Web Speech API to read model output aloud in real‑time, letting users instantly verify what the AI says and enhancing transparency. As soon as the response appears, SpeechSynthesis starts speaking the content immediately – no button press required.
We select a single voice from the available options—Zarvox—to give the AI a distinctive, robot‑like timbre. The system builds a SpeechSynthesisUtterance, configures it with the chosen voice, and attaches listeners to indicate start, end, or errors so users get visual cues during playback.
The playful voice and immediate feedback make the experience feel more engaging and interactive for users.