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

# Build with an AI coding agent

> Paste one prompt into Claude Code, Cursor or Codex and it turns text into speech with Plivo Text-to-Speech, using the Plivo CLI and the Plivo text-to-speech skill.

Let your AI coding agent make speech with Plivo Text-to-Speech. Paste the prompt below into Claude Code, Cursor or Codex. The agent installs the Plivo CLI and its skills, then follows the text-to-speech skill step by step. Requires Plivo CLI v1.3.3 or later.

## Start

Paste this into your coding agent:

```text Prompt theme={null}
Install the Plivo CLI: curl -fsSL https://raw.githubusercontent.com/plivo/plivo-cli/main/install.sh | bash. Then run plivo skill install all and follow the plivo-tts skill to turn my text into speech.
```

You complete the browser sign-in. The skill asks you before anything that spends money.

> [!NOTE]
>
> Already have the CLI? Run `plivo skill install cli` and `plivo skill install tts`. For Codex, add `--agent codex` to each command so the files go into its skills folder.

## What the agent does

1. **Checks your setup.** It checks that the CLI is installed and logged in, and that your account has credit.
2. **Asks what to say and where it plays.** A file to keep, audio to play on a call, or audio for a voice agent. It picks the audio format for that use, such as 8 kHz μ-law for a phone call.
3. **Helps you pick a voice.** It lists the voices for your language and offers a few to choose from.
4. **Previews, then asks before it spends.** It shows the request and the number of characters, and sends it only after you agree. Text-to-speech is billed per character.
5. **Checks the result.** It checks the file it wrote, asks whether it sounds right, and compares your usage before and after.
6. **Fixes pronunciation.** It can create a lexicon so a brand or name is said the way you want.
7. **Starts realtime speech.** For a voice agent, it gives you a small script that streams speech over the [realtime WebSocket](https://plivo.com/docs/models/text-to-speech/concepts/realtime.md), and asks before running it.

## Keep it current

The skills are reference files bundled with the CLI. [Upgrade the CLI](https://plivo.com/docs/cli/install.md#upgrade) first, using `brew upgrade plivo` for Homebrew or `plivo upgrade` for a standalone install. Then preview and refresh installed skills:

```bash theme={null}
plivo skill update --dry-run
plivo skill update
```

`skill update` covers Codex too. To install the skills as a plugin in Claude Code, Gemini CLI, Codex or Antigravity, or into a project for your whole team, see [Use with a coding agent](https://plivo.com/docs/cli/agents.md).

## Related

> [card] [Text-to-speech commands](https://plivo.com/docs/cli/apis/tts.md)
>
> The `plivo tts` commands the skill runs

> [card] [Audio Streaming skill](https://plivo.com/docs/audio-streaming/integration-guides/ai-coding-agent.md)
>
> Connect your voice agent to phone calls

> [card] [Text-to-Speech quickstart](https://plivo.com/docs/models/text-to-speech/quickstart.md)
>
> Make speech without an agent

> [card] [Plivo CLI](https://github.com/plivo/plivo-cli)
>
> The command-line tool the skill drives
