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.
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.
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:
cast "The build failed. Check the test report before pushing." --out agent-alert.wav
Then play it with your system audio tool:
Agent prompt pattern
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 |
Keep PC audio messages short. For detailed status, speak one sentence and write the full details in the chat or log.