Skip to main content
OpenClaw is an AI agent runtime that can execute tools, shell commands, and MCP servers. With Typecast, your agent can generate natural-sounding speech in a single command.

What You Can Do

With Typecast and OpenClaw, you can:
  • Generate speech from agent workflows — Convert any text output to natural-sounding audio
  • Choose from 500+ voices — Select voices by gender, age, and style
  • Control emotion — Apply Smart Emotion or preset emotions (happy, sad, angry, whisper, etc.)
  • Support 37 languages — Generate speech in English, Korean, Japanese, Chinese, and more
  • Automate audio pipelines — Combine with other tools for end-to-end content creation

Prerequisites

Before you start, make sure you have:
  1. OpenClaw installed — npm install -g openclaw@latest
  2. Typecast API KeyGet yours here
  3. Typecast CLI (cast) — The fastest integration path

Quick Start: cast CLI

The official Typecast CLI turns speech generation into a single shell command. If your agent can run shell commands, it can generate Typecast audio without writing a custom provider.

Step 1: Install the CLI

brew install neosapience/tap/cast

Step 2: Authenticate

cast login
Or pass the key directly:
cast login <your-api-key>

Step 3: Verify

cast "Hello, world!" --out ./test.mp3 --format mp3
If the file is generated successfully, you’re ready to use it with OpenClaw.

Integration Methods

OpenClaw distinguishes local exec from remote code_execution. Use local exec when the command must access installed binaries on the machine. Simply ask your OpenClaw agent:
Use local exec to run:
cast "Your reservation has been confirmed for Friday at 7 PM." --language eng --format mp3 --out ./confirmation.mp3
Return the generated file path.
For repeated use, add a project instruction to your OpenClaw config:
When the user asks for spoken audio, use the local `cast` CLI.
Default command:

cast "$TEXT" --voice-id "$TYPECAST_VOICE_ID" --language "${TYPECAST_LANGUAGE:-eng}" --format "${TYPECAST_FORMAT:-mp3}" --out "$OUTPUT"

Never print API keys. Prefer `--out` for headless sessions.
Recommended environment variables:
export TYPECAST_VOICE_ID="tc_60e5426de8b95f1d3000d7b5"
export TYPECAST_LANGUAGE="eng"
export TYPECAST_FORMAT="mp3"

Method 2: MCP Server (Tool-Native)

For deeper integration, connect the Typecast API MCP server so OpenClaw can call TTS tools directly.
openclaw mcp set typecast '{
  "command": "uvx",
  "args": [
    "--from",
    "git+https://github.com/neosapience/typecast-api-mcp-server.git",
    "typecast-api-mcp-server"
  ],
  "env": {
    "TYPECAST_API_KEY": "${TYPECAST_API_KEY}",
    "TYPECAST_OUTPUT_DIR": "./typecast_output"
  }
}'
Verify:
openclaw mcp show typecast
Once registered, Typecast tools appear as typecast__synthesize_speech, typecast__list_voices, etc. Ask your agent:
Use the typecast MCP tools to synthesize "Hello from Typecast" as an mp3 file.
You can also connect the remote docs MCP at https://typecast.ai/docs/mcp for integration guidance — it provides Typecast documentation as MCP resources without generating audio.

Voice & Emotion Control

Finding Voices

Use the cast CLI to list available voices:
cast voices --model ssfm-v30
Or ask your agent to use the MCP list_voices tool to browse by gender, age, and use case.

Emotion Options

Smart Emotion

AI automatically detects the best emotion from text context. Great for natural conversations and storytelling.

Preset Emotion

Manually choose from 7 emotions: Normal, Happy, Sad, Angry, Whisper, Tone Up, Tone Down.
cast CLI with emotion:
# Smart Emotion (ssfm-v30 only)
cast "I can't believe we won!" --model ssfm-v30 --emotion smart --out ./excited.mp3

# Preset Emotion
cast "I'm sorry to hear that." --model ssfm-v30 --emotion sad --out ./sorry.mp3

Example Workflows

  1. OpenClaw receives meeting transcript
  2. Agent summarizes key points with an LLM
  3. Agent runs cast to generate audio summary
  4. Output file is uploaded to Slack or Google Drive
  1. Agent receives content in English
  2. Translates to Korean, Japanese, Chinese
  3. Generates Typecast audio for each language
  4. Saves all audio files to cloud storage
  1. Build pipeline triggers OpenClaw agent
  2. Agent generates status message: “Build succeeded” or “Build failed”
  3. cast produces audio notification
  4. Audio is posted to team Discord channel

Troubleshooting

Install the CLI in the same runtime where OpenClaw executes tools. If installed via Homebrew, verify your PATH includes the Homebrew bin directory.
Run cast login or pass your API key directly with cast login <api_key>. Verify at the Typecast API Console.
Use --out to save to a file instead of playing audio. Return the file path to the user.
Explicitly ask the agent to use the exec tool or local shell. Add a project instruction to clarify this behavior.
  • Ensure uvx is installed and on PATH: command -v uvx
  • Check that TYPECAST_API_KEY is set in the environment
  • Run openclaw mcp show typecast to verify registration

Resources

Typecast API Console

Get your API key

Voice Library

Browse all available voices

API Reference

Explore the Typecast API

MCP Server

Typecast MCP Server docs