> ## Documentation Index
> Fetch the complete documentation index at: https://docs.hyperwisor.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Voice to Text

> Transcribe speech to text and act on it via the Script API.

<Info>
  **Category:** Controls · **Emits:** transcribed text (to scripts) · **Reads data:** no
</Info>

## Mental model

A **Voice to Text widget is a dictation mic.** It listens, transcribes speech to
text, and hands that text to your logic — hands-free input for a dashboard.

## When to use it

* Voice commands ("turn on the light")
* Hands-free text entry

## Settings

### General

* **Widget Title / ID**
* **Language** — recognition language
* **Continuous recognition** — keep transcribing
* **Always listening** — hands-free
* **Auto-send on speech end** — emit when the user pauses

### Triggers

| Event                       | Fires when                                                |
| --------------------------- | --------------------------------------------------------- |
| `speechResult`              | A transcription is produced (carries the text)            |
| `speechStart` / `speechEnd` | Speaking starts / stops                                   |
| *(common)*                  | `load`, `ready`, `destroy`, `update`, `visible`, `hidden` |

## Acting on the transcription

Use the [Script API](/script/overview) — the event carries the recognized text:

```js theme={null}
widget.on('voiceInput', 'speechResult', (text) => {
  if (text.toLowerCase().includes('turn on')) {
    ws.send(context.deviceId, { command: 'Operate', action: 'ON' });
  }
});
```

<Card title="Text to Speech" icon="volume-high" href="/dashboard/widgets/display">
  The reverse — speak text aloud.
</Card>
