Spoken Reply
A play button and the reading as a waveform in dots whose played part lights in the accent behind a playhead, with the text below lighting word by word as it's said (those said in ink, those to come fainter). Click a word or the waveform to jump there. Give it your text-to-speech audio (and word timings, if you have them) and it draws the waveform from the sound itself; without audio the browser's own voice reads it, preferring one on the device, and the waveform is shaped from the words' syllables.
Needs: None. Your text-to-speech audio, or the browser's speech synthesis.
Customize
Props
| Prop | Type | Default | Description |
|---|---|---|---|
| text | string | required | The reply's text. |
| src | string | – | Audio of it being read. Without it, the browser's voice reads it. |
| timings | number[] | – | When each word starts in the audio, in seconds. Estimated otherwise. |
| rate | number | 1 | How fast the browser's voice reads. |
| onEnd | () => void | – | Called when it's finished reading. |
| tone | string | – | The played part and the word being read. The page's accent by default. |
| pitch | number | 3 | Size of one dot in px. |
| className | string | – | Class on the reply. |
| style | CSSProperties | – | Style on the reply. |