Heard As
A voice timer or alarm that shows what it nearly heard as well. When two readings mean different things, the runner-up sits just behind, one tap away.
Needs: An n-best list with log-probabilities from any speech recogniser (Whisper beam search, a cloud API's alternatives). The preview uses real Whisper tiny output; its mic button loads Whisper tiny (about 41 MB) in the browser only when pressed.
Customize
clip
Props
| Prop | Type | Default | Description |
|---|---|---|---|
| hypotheses | { text: string; logp: number }[] | null | required | The recogniser's n-best list for one command, each line with its log-probability. Null before anything is heard. A new array is a new command. |
| autostart | boolean | true | Start a timer as soon as it's heard. Off, it waits paused for Resume. |
| placeholder | string | "Say a timer or an alarm" | Shown before anything has been heard. |
| accent | string | "#f28c18" | Colour of the countdown bar. How sure the recogniser was is shown by blur and lightness, never colour. |
| onChange | (reading: Reading, transcript: string) => void | – | Called with the reading in front when a command is heard, and again after every swap. Reading is { kind: "timer"; seconds } or { kind: "alarm"; h; m; half }. |
| onDone | () => void | – | Called when a timer reaches zero. Play your chime here. |
| className | string | "" | Extra class on the root. |
| style | CSSProperties | – | Inline style on the root. Set --mlui-heard-size to change the digits' size. |