Spiral gives your agent every tool with one account. Browse the tools →

Codex · AudioReleased 2025-09-08

How to Use Index TTS 2.0 in Codex

Index TTS 2.0 turns scripts into expressive speech with separate control over voice identity and emotion. Use it for character dialogue and narration when the same voice needs different deliveries.

Prompts to try with Index TTS 2.0 in Codex

Copy an example into Codex, or ask in your own words.

Use Index TTS 2.0 to narrate the project's onboarding script with the provided voice reference and a calm delivery.

Index TTS 2.0Codex
Try asking
  • Use Index TTS 2.0 to generate calm, angry, and sad takes of the first game dialogue line, keeping its voice reference fixed.

  • Use Index TTS 2.0 for the tutorial script, taking voice identity from the narrator recording and emotion from the performance reference.

  • Use Index TTS 2.0 to read the project's Chinese lesson examples. Keep each example separate for pronunciation review.

  • Use Index TTS 2.0 to narrate the demo script, then measure the audio duration before placing it on the video timeline.

How to set up Index TTS 2.0 in Codex

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

Use Spiral's MCP server

  1. Add the hosted server
    codex mcp add spiral --url https://api.spiral.ai/mcp
  2. Sign in

    Codex opens the browser: sign in to Spiral and click Authorize. No API key. codex mcp list then shows Spiral.

    codex mcp login spiral

Use the Spiral skill

  1. Send Codex 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.

    npx -y spiral-cli@latest init

Call the Spiral API

  1. Create an API key

    In the console, under API keys.

  2. Run Index TTS 2.0

    One request; the result comes back by polling or a webhook.

    curl https://api.spiral.ai/v1/runs \
      -H "Authorization: Bearer $SPIRAL_API_KEY" \
      -H "Content-Type: application/json" \
      -H "Idempotency-Key: $(uuidgen)" \
      -d '{
        "provider": "fal",
        "model": "fal-ai/index-tts-2/text-to-speech",
        "input": {
          "audio_url": "https://storage.googleapis.com/falserverless/example_inputs/index-tts-2/tts_in.mp3",
          "prompt": "Hide! He'\''s coming! He'\''s coming to get us!"
        }
      }'

Then paste one of the prompts above: Codex finds Index TTS 2.0 on Spiral, shows the price and runs it.

Index TTS 2.0 providers and prices

Spiral runs Index TTS 2.0 through fal. Open a card for today's price, with every fee included.

falAudio
Index TTS 2.0
fal-ai/index-tts-2/text-to-speech

Settings you can ask for

Index TTS 2.0 works from your audio URL and prompt. Ask Codex for any of these in your prompt.

SettingAllowed valuesDefaultDescription
Strength0 to 11

The strength of the emotional style transfer. Higher values result in stronger emotional influence.

Should use prompt for emotionon or offoff

Whether to use the prompt to calculate emotional strengths, if enabled it will overwrite the emotional_strengths values. If emotion_prompt is provided, it will be used to instead of prompt to extract the emotional style.

Every API field of Index TTS 2.0 is on its tool page: open its card above.

What can you do with Index TTS 2.0 in Codex?

Create spoken dialogue and narration from scripts in your project with Index TTS 2.0. Your coding agent can prepare separate takes for each emotional direction and keep them organized for review.

Character dialogue

Give one character calm, angry, and sad readings while keeping the same voice reference.

Explainer narration

Turn an English explainer script into a calm spoken guide using a chosen voice reference.

Chinese lesson narration

Create spoken Chinese examples for lessons, then review pronunciation before publishing.

Dialogue rehearsal

Compare several emotional readings of a line before directing a recording session.

Performance-guided voiceovers

Use one recording for voice identity and another speaker's performance for emotional direction.

Recurring audio briefings

Read each day's prepared summary with the same voice reference and a calm delivery direction.

Questions about Index TTS 2.0 in Codex

Can Codex use Index TTS 2.0?

Yes. Add Spiral to Codex as an MCP server, and Codex can find and run Index TTS 2.0 like any built-in tool.

How much does Index TTS 2.0 cost in Codex?

Up to $0.156 per run at the default inputs for 60 seconds of input. You pay from your Spiral balance as you go, with no subscription, and a failed run is not charged. Your Codex plan is separate.

Do I need a fal account to use Index TTS 2.0 in Codex?

No. Spiral runs Index TTS 2.0 on its own fal account. You sign in to Spiral once and never paste a key.

How long does it take to set up Index TTS 2.0 in Codex?

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

Does Codex wait while Index TTS 2.0 runs?

Index TTS 2.0 runs in the background. Codex starts the run, checks on it and gives you the audio when it's ready.

What is Index TTS 2.0 useful for?

Use it for narration or character lines that need a recognizable voice with different emotional deliveries. You can guide emotion with a separate performance reference or a written description.

Can the voice and emotion references come from different people?

Yes. Index TTS 2.0 separates voice identity from emotional expression, so a second speaker's performance can guide the delivery.

How should I describe the emotion?

Give a specific delivery direction, such as calm reassurance or sadness after a disappointment. Keep that direction separate from the words you want spoken.

Which languages should I use?

Chinese and English are the documented languages in the training description. The Index TTS 2.0 paper reports training data in both.

Can I request an exact clip length?

Do not rely on an exact duration. Although the research demonstrates duration control, the maker's release notes say that capability was not enabled in the IndexTTS-2 public release.

Get started

Start using Index TTS 2.0 in Codex

One Spiral account for every tool your agent needs. No subscription; you pay per run.

Paste this into Codex:

Set up Codex

set up https://spiral.ai/SKILL.md
Are you an AI agent? See setup options