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

# PC audio output

When an agent controls a local computer, the CLI can turn short text into speech and play it through the default audio output. This is useful for audible alerts, hands-free status updates, or quick voice previews.

<Info>
  For local agent feedback, `cast "message"` is the simplest realtime-style path because playback starts as part of the CLI command. For API-level chunked streaming, use the Typecast streaming endpoint through an SDK.
</Info>

## Speak immediately

```bash
cast "The export is complete."
```

By default, the CLI plays the generated audio instead of saving it.

## Use saved audio for reliability

For longer messages or repeated playback, save the audio first:

```bash
cast "The build failed. Check the test report before pushing." --out agent-alert.wav
```

Then play it with your system audio tool:

<Tabs>
  <Tab title="macOS">
    ```bash
    afplay agent-alert.wav
    ```
  </Tab>
  <Tab title="Linux">
    ```bash
    aplay agent-alert.wav
    ```
  </Tab>
</Tabs>

## Agent prompt pattern

```text
When a long-running task finishes, speak a short status update through PC audio.
Use the CLI.
Keep the spoken sentence under 12 words.
If playback fails, save the audio file and report its path.
```

## Good audio messages

| Situation | Suggested text |
|-----------|----------------|
| Task complete | `The task is complete.` |
| Human input needed | `I need your input to continue.` |
| Test failure | `Tests failed. Please check the report.` |
| Deployment ready | `The preview is ready.` |

## Choosing the audio path

| Need | Best path |
|------|-----------|
| Fast audible status | `cast "The preview is ready."` |
| Repeat the same alert | Save with `--out agent-alert.wav`, then replay with `afplay` |
| Agent-specific voice | Set `cast config set voice-id tc_xxx` |
| Project-specific voice | Clone once with `cast voices clone`, then use `--voice-id uc_xxx` |
| Detailed report | Speak one sentence, write details in chat or a log |

<Tip>
  Keep PC audio messages short. For detailed status, speak one sentence and write the full details in the chat or log.
</Tip>
