Dot Dictation
At rest it shows a microphone in dots. Tap it and the dots become your voice, columns rising and falling with how loud you are and scrolling in from the right like a recorder's meter, with a timer, while the transcript streams in beside it, words not yet settled shown fainter. Tap again to stop: a dot scans while your speech-to-text finishes, and it settles into a tick. The microphone is only read here for the level; its stream is handed to you for whatever speech-to-text you use, on the device or off it.
Needs: A microphone, asked for on the first tap. You bring the speech-to-text (Whisper in the browser, an API).
Customize
voice
Props
| Prop | Type | Default | Description |
|---|---|---|---|
| transcript | string | – | What's been heard and settled so far. |
| interim | string | – | Words heard but not settled yet; shown fainter. |
| busy | boolean | false | Your speech-to-text is still finishing after the recording stopped. |
| onStart | (stream: MediaStream | null) => void | – | Called when recording starts, with the microphone's stream. |
| onStop | () => void | – | Called when recording stops. |
| onError | (error: unknown) => void | – | Called if the microphone can't be had. |
| level | number | – | A loudness, 0 to 1, from your own audio pipeline; then the microphone isn't opened here. |
| placeholder | string | "Tap to speak" | Shown before anything's been said. |
| tone | string | – | The voice and the tick. The page's accent by default. |
| pitch | number | 3 | Size of one dot in px. |
| className | string | – | Class on the dictation row. |
| style | CSSProperties | – | Style on the dictation row. |