[Integrations](https://spiral.ai/integrations) › [opencode](https://spiral.ai/integrations/opencode) › [ElevenLabs v4 Text to Speech](https://spiral.ai/integrations/opencode/elevenlabs-v4-text-to-speech)

# How to Use ElevenLabs v4 Text to Speech in opencode

Eleven v4 suits expressive narration, audiobooks, and character voiceovers. Compared with Eleven v4 Turbo, it prioritizes finished content and long-form audio over real-time conversation.

|  |  |
| --- | --- |
| Model | ElevenLabs v4 Text to Speech |
| Available through | ElevenLabs |
| Category | Audio |
| Price | $0.104 per 1,000 characters of text. |
| Returns | audio |
| Runs | In the background |
| Setup | About 2 minutes, no API key |

## Prompts to try with ElevenLabs v4 Text to Speech in opencode

- Read the README and draft a 150-word spoken introduction to the project. Remove code syntax from the narration, show me the script, then generate it with Eleven v4.
- Use the onboarding documentation to write a 250-word narrated walkthrough of the first successful task. Generate it with Eleven v4, keeping delivery measured and using sentence breaks for pacing.
- Find the game's quest dialogue and select five lines that need different emotions. Add restrained square-bracket delivery directions and generate a separate take for each line with Eleven v4.
- Review the narration script in this project for difficult names. Suggest IPA pronunciations between forward slashes, then use Eleven v4 to generate a short pronunciation audition before the full script.
- Turn the latest changelog into a 180-word spoken release update. Generate it with Eleven v4 using higher stability for consistent delivery, and save the approved script beside the audio.

## How to set up ElevenLabs v4 Text to Speech in opencode

Pick the way that suits you. Each takes about two minutes.

### Use Spiral's MCP server

1. **Add the server**: Leave out `--global` to add Spiral to the current project only. No header and no client ID or secret: opencode registers itself with Spiral.

```bash
opencode mcp add spiral --global --url https://api.spiral.ai/mcp
```

2. **Sign in**: Your browser opens. Sign in to Spiral, pick the organization and click Authorize, then return to the terminal. No API key. Inside opencode, `/mcps` starts the same sign-in.

```bash
opencode mcp auth spiral
```

3. **Check it**: Spiral shows as connected.

```bash
opencode mcp list
```

### Use the Spiral skill

1. **Send opencode this message**: Your agent reads Spiral's skill and sets itself up.

```
set up https://spiral.ai/SKILL.md
```

2. **Sign in or paste a key**: Approve Spiral in the browser, or give the agent a key from the console.

### Use the Spiral CLI

1. **Install and sign in**: Installs the Spiral CLI, signs you in and adds its skill to your coding agents.

```bash
npx -y spiral-cli@latest init
```

### Call the Spiral API

1. **Create an API key**: In the console, under API keys.

2. **Run ElevenLabs v4 Text to Speech**: One request; the result comes back by polling or a webhook.

```bash
curl https://api.spiral.ai/v1/runs \
  -H "Authorization: Bearer $SPIRAL_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: $(uuidgen)" \
  -d '{
    "provider": "elevenlabs",
    "model": "eleven_v4",
    "input": {
      "text": "<text>",
      "voice_id": "<voice_id>"
    }
  }'
```

Then paste one of the prompts above: opencode finds ElevenLabs v4 Text to Speech on Spiral, shows the price and runs it.

Setup guide in the docs: https://spiral.ai/docs/quickstarts/opencode

## ElevenLabs v4 Text to Speech tools and prices

- [ElevenLabs v4 Text to Speech](https://spiral.ai/tools/elevenlabs/eleven_v4) (ElevenLabs): $0.104 per 1,000 characters of text.

## Settings you can ask for

| Setting | Allowed values | Default | Description |
| --- | --- | --- | --- |
| seed |  | — | If specified, our system will make a best effort to sample deterministically, such that repeated requests with the same seed and parameters should return the same result. |
| next_text |  | — | The text that comes after the text of the current request. |
| audio_effects |  | — | Audio effects applied to the generated audio. |
| language_code |  | — | Language code (ISO 639-1) used to enforce a language for the model and text normalization. |
| output_format | alaw_8000, mp3_22050_32, mp3_24000_48, mp3_44100_128, mp3_44100_192, mp3_44100_32, mp3_44100_64, mp3_44100_96, opus_48000_128, opus_48000_192, opus_48000_32, opus_48000_64, opus_48000_96, pcm_16000, pcm_22050, pcm_24000, pcm_32000, pcm_44100, pcm_48000, pcm_8000, ulaw_8000, wav_16000, wav_22050, wav_24000, wav_32000, wav_44100, wav_48000, wav_8000 | mp3_44100_128 | Output format of the generated audio. |
| previous_text |  | — | The text that came before the text of the current request. |

## What can you do with ElevenLabs v4 Text to Speech in opencode?

Turn project documentation and scripts into narrated demos, lessons, or character recordings with Eleven v4. A coding agent can prepare spoken copy from project files and divide long scripts into passages below 10,000 characters.

### Audiobook passages

Narrate fiction with changes in emotion between scenes. Split longer chapters into passages below 10,000 characters.

### Game character lines

Record quest introductions, warnings, and reactions. Put delivery directions beside the lines that need them.

### Animation voiceovers

Generate separate character takes for an animated scene, then review each performance against the script.

### Product walkthrough narration

Turn a demonstration script into spoken instructions. Audition product names before generating the full narration.

### Multilingual explainers

Narrate approved translations as separate English, Spanish, French, or Japanese recordings. Review accent and pronunciation in each language.

### Audio editions of updates

Turn an approved newsletter or product update into a spoken edition, with short sections and restrained delivery.

### Training narration

Create spoken lessons from approved instructional scripts. Test technical terms in a short sample before recording each lesson.

## Overview

- [ElevenLabs](https://spiral.ai/providers/elevenlabs)
- [All opencode guides](https://spiral.ai/integrations/opencode)

## ElevenLabs v4 Text to Speech in other agents

- [Amp](https://spiral.ai/integrations/amp/elevenlabs-v4-text-to-speech)
- [ChatGPT](https://spiral.ai/integrations/chatgpt/elevenlabs-v4-text-to-speech)
- [Claude](https://spiral.ai/integrations/claude-desktop/elevenlabs-v4-text-to-speech)
- [Claude Code](https://spiral.ai/integrations/claude-code/elevenlabs-v4-text-to-speech)
- [Cline](https://spiral.ai/integrations/cline/elevenlabs-v4-text-to-speech)
- [Codex](https://spiral.ai/integrations/codex/elevenlabs-v4-text-to-speech)
- [Cursor](https://spiral.ai/integrations/cursor/elevenlabs-v4-text-to-speech)
- [Devin](https://spiral.ai/integrations/devin/elevenlabs-v4-text-to-speech)
- [dots](https://spiral.ai/integrations/dots/elevenlabs-v4-text-to-speech)
- [Factory Droid](https://spiral.ai/integrations/factory-droid/elevenlabs-v4-text-to-speech)
- [Gemini](https://spiral.ai/integrations/gemini/elevenlabs-v4-text-to-speech)
- [Gemini CLI](https://spiral.ai/integrations/gemini-cli/elevenlabs-v4-text-to-speech)
- [Google Antigravity](https://spiral.ai/integrations/antigravity/elevenlabs-v4-text-to-speech)
- [goose](https://spiral.ai/integrations/goose/elevenlabs-v4-text-to-speech)
- [Grok](https://spiral.ai/integrations/grok/elevenlabs-v4-text-to-speech)
- [Grok Build](https://spiral.ai/integrations/grok-build/elevenlabs-v4-text-to-speech)
- [Hermes](https://spiral.ai/integrations/hermes/elevenlabs-v4-text-to-speech)
- [Instinct](https://spiral.ai/integrations/instinct/elevenlabs-v4-text-to-speech)
- [Manus](https://spiral.ai/integrations/manus/elevenlabs-v4-text-to-speech)
- [Muse](https://spiral.ai/integrations/muse/elevenlabs-v4-text-to-speech)
- [Muse Code](https://spiral.ai/integrations/muse-code/elevenlabs-v4-text-to-speech)
- [n8n](https://spiral.ai/integrations/n8n/elevenlabs-v4-text-to-speech)
- [Notion](https://spiral.ai/integrations/notion/elevenlabs-v4-text-to-speech)
- [OpenClaw](https://spiral.ai/integrations/openclaw/elevenlabs-v4-text-to-speech)
- [Perplexity](https://spiral.ai/integrations/perplexity/elevenlabs-v4-text-to-speech)
- [Raycast](https://spiral.ai/integrations/raycast/elevenlabs-v4-text-to-speech)
- [VS Code](https://spiral.ai/integrations/vscode/elevenlabs-v4-text-to-speech)
- [Windsurf](https://spiral.ai/integrations/windsurf/elevenlabs-v4-text-to-speech)
- [Zapier](https://spiral.ai/integrations/zapier/elevenlabs-v4-text-to-speech)

## More opencode guides

- [ElevenLabs Voice Isolator](https://spiral.ai/integrations/opencode/elevenlabs-voice-isolator)
- [ElevenLabs v4 Turbo Text to Speech](https://spiral.ai/integrations/opencode/elevenlabs-v4-turbo-text-to-speech)
- [ElevenLabs Voice Changer Multilingual v2](https://spiral.ai/integrations/opencode/elevenlabs-voice-changer-multilingual-v2)
- [Elevenlabs Music v2.5](https://spiral.ai/integrations/opencode/elevenlabs-music-v2-5)
- [ElevenLabs Voice Changer](https://spiral.ai/integrations/opencode/elevenlabs-voice-changer)
- [Elevenlabs Tts Eleven V3](https://spiral.ai/integrations/opencode/elevenlabs-tts-eleven-v3)

## Questions about ElevenLabs v4 Text to Speech in opencode

**Can opencode use ElevenLabs v4 Text to Speech?**

Yes. Add Spiral to opencode as an MCP server, and opencode can find and run ElevenLabs v4 Text to Speech like any built-in tool.

**How much does ElevenLabs v4 Text to Speech cost in opencode?**

$0.104 per 1,000 characters of text. You pay from your Spiral balance as you go, with no subscription, and a failed run is not charged. Your opencode plan is separate.

**Do I need an ElevenLabs account to use ElevenLabs v4 Text to Speech in opencode?**

No. Spiral runs ElevenLabs v4 Text to Speech on its own ElevenLabs account. You sign in to Spiral once and never paste a key.

**How long does it take to set up ElevenLabs v4 Text to Speech in opencode?**

About two minutes: add the server, then sign in, then check it.

**Does opencode wait while ElevenLabs v4 Text to Speech runs?**

ElevenLabs v4 Text to Speech runs in the background. opencode starts the run, checks on it and gives you the audio when it's ready.

**What is Eleven v4 best for?**

Expressive narration, audiobooks, and character voiceovers for games or animation. It is the content-focused choice compared with Eleven v4 Turbo, which targets real-time conversation.

**How much text can Eleven v4 read at once?**

Up to 10,000 characters per generation. ElevenLabs estimates roughly 10 minutes of audio at that length; treat that as an estimate, not a fixed runtime.

**Which languages does Eleven v4 support?**

More than 90, including English, Spanish, French, German, Japanese, Hindi, and Arabic. When you change the language, do not assume the reference voice's original accent will carry over.

**How do I direct emotion and pauses?**

Place short directions such as [curious], [whispers], or [sighs] where the delivery should change. Use ellipses and sentence structure for pacing; Eleven v4 does not support SSML.

**Which voice settings matter most?**

Lower stability allows more varied delivery; higher stability keeps the performance more consistent. Higher similarity holds closer to the reference voice, potentially sacrificing some naturalness.

