> ## 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.

# Voice cloning

> Create and use custom cloned voices from the CLI.

The CLI can create a custom voice from a local WAV or MP3 sample, print the new `uc_` voice ID, and use that voice for text-to-speech.

## Clone from a sample

```bash theme={null}
cast voices clone sample.wav --name "My Clone"
```

The command prints the cloned voice ID by default, which makes it easy to use in scripts:

```bash theme={null}
voice_id=$(cast voices clone sample.wav --name "Review Clone")
cast "Short test line." --voice-id "$voice_id" --out review.wav
cast voices delete "$voice_id"
```

## Use JSON output for handoff

```bash theme={null}
cast voices clone sample.mp3 --name "Review Clone" --json
```

Use JSON when an agent or another tool needs structured fields such as the cloned voice ID and suggested next-step values.

## Generate speech with the cloned voice

```bash theme={null}
cast "Hello from my cloned voice." \
  --voice-id uc_xxx \
  --emotion smart \
  --out cloned.wav
```

## Clean up cloned voices

```bash theme={null}
cast voices delete uc_xxx
```

## Constraints

| Constraint    | Value           |
| ------------- | --------------- |
| Input audio   | WAV or MP3      |
| Max file size | 25 MB           |
| Voice name    | 1-30 characters |
| Model         | `ssfm-v30`      |

<Warning>
  Treat cloned voices as project assets. Name them clearly, record which output files used them, and delete temporary clones when the workflow is done.
</Warning>
