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

# StepAudio 2.5 TTS

StepFun's first speech synthesis model to integrate contextual understanding into the entire speech generation pipeline. Through Global Context + Inline Context dual-level control combined with zero-shot voice cloning, StepAudio 2.5 TTS lets AI not just read text, but *perform* it.

<Columns cols={3}>
  <Card title="Online Demo" icon="headphones" href="https://stepaudiollm.github.io/step-audio-2.5-tts/">
    Visit the official demo page to experience the model's capabilities firsthand.
  </Card>

  <Card title="API Quick Start" icon="rocket" href="#quick-start">
    Jump to minimal runnable curl / WebSocket call examples.
  </Card>
</Columns>

## Key Information

<Columns cols={3}>
  <Card title="Model Type">
    Contextual TTS<br />Text-to-speech with contextual understanding
  </Card>

  <Card title="Max Input per Request">
    1,000 characters
  </Card>

  <Card title="Instruction Limit">
    200 characters<br />Global context natural language guidance
  </Card>
</Columns>

## Core Capabilities

<Columns cols={3}>
  <Card title="Dual-level Context Control">
    Global Context sets the overall tone for an entire passage; Inline Context uses parentheses `()` for per-sentence fine-grained control of emotion, pauses, and breathing. Natural language descriptions replace tag matching, supporting complex intents such as "restrained sadness, no sobbing, with a slight tremble".
  </Card>

  <Card title="Zero-shot Voice Cloning">
    Clone any voice from just a 3-second reference audio clip, with full Global / Inline context control inherited. Not limited by fixed voice libraries or preset characters.
  </Card>

  <Card title="Natural, Expressive Delivery">
    Comprehensive improvements in pauses, stress, rhythm, and tonal transitions. Upgraded underlying voice quality delivers clear, natural output without the artificial timbre common in traditional TTS.
  </Card>
</Columns>

## API Endpoints

<Columns cols={3}>
  <Card title="Non-streaming TTS" href="/docs/en/api-reference/audio/create-audio">
    `POST /v1/audio/speech`<br />Generate a complete audio file in a single request, with the best audio quality.
  </Card>

  <Card title="Streaming TTS" href="/docs/en/api-reference/audio/ws-audio">
    `WebSocket /v1/realtime/audio`<br />Low-latency streaming playback, ideal for conversational and real-time scenarios.
  </Card>

  <Card title="Voice Clone Preview" href="/docs/en/api-reference/audio/voices-preview">
    `POST /v1/audio/voices/preview`<br />Quickly preview synthesis results from a reference audio sample without creating a permanent voice asset.
  </Card>
</Columns>

## Pricing

See the [pricing page](/docs/en/guides/pricing/details) for current rates on contextual TTS and voice cloning.

## Quick Start

The two key capability entry points: the `instruction` parameter defines the **overall** expression tone (Global Context), while parentheses `()` inside the `input` / `text` field insert **per-sentence** instructions (Inline Context). Content inside parentheses is treated as instructions only and **will not be spoken aloud**.

<Tabs>
  <Tab title="Non-streaming (curl)">
    ```bash theme={null}
    curl https://api.stepfun.ai/v1/audio/speech \
      -H "Authorization: Bearer $STEP_API_KEY" \
      -H "Content-Type: application/json" \
      -d '{
        "model": "stepaudio-2.5-tts",
        "voice": "cixingnansheng",
        "input": "(lowered voice) Hey... look at my phone. (short gasp) Am I seeing things? (feigning calm) ...Never mind, must be a scam text.",
        "instruction": "Voice is extremely tense, as if desperately holding back uncontrollable excitement; fast and halting pace with noticeable restraint"
      }' \
      --output step-tts-contextual.mp3
    ```

    `instruction` defines the overall context, while parenthesized text in `input` serves as inline instructions. The model synthesizes emotion, pauses, breathing, and subtext together.
  </Tab>

  <Tab title="Streaming (WebSocket)">
    Connection URL:

    ```text theme={null}
    wss://api.stepfun.ai/v1/realtime/audio?model=stepaudio-2.5-tts
    ```

    After connecting, send `tts.create` to start a session with a global `instruction`:

    ```json theme={null}
    {
      "type": "tts.create",
      "data": {
        "session_id": "01956e7388477cfcbdc3aaabf364bc70",
        "voice_id": "cixingnansheng",
        "response_format": "wav",
        "sample_rate": 24000,
        "instruction": "Ice-cold tone, strong pressure, slightly slow pace"
      }
    }
    ```

    Then send text with inline instructions via `tts.text.delta`:

    ```json theme={null}
    {
      "type": "tts.text.delta",
      "data": {
        "session_id": "01956e7388477cfcbdc3aaabf364bc70",
        "text": "(excited) The weather is great today, and I want to learn about StepFun's large model technologies!"
      }
    }
    ```
  </Tab>

  <Tab title="Voice Clone Preview (curl)">
    ```bash theme={null}
    curl https://api.stepfun.ai/v1/audio/voices/preview \
      -H "Authorization: Bearer $STEP_API_KEY" \
      -H "Content-Type: application/json" \
      -d '{
        "model": "stepaudio-2.5-tts",
        "file_id": "file-Ckyl3cV09A",
        "text": "StepFun intelligence, amplifying every possibility tenfold",
        "sample_text": "Nice weather today",
        "instruction": "Gentle tone, slightly slow pace"
      }'
    ```

    This endpoint generates a preview audio clip only; it does not create a permanent voice asset.
  </Tab>
</Tabs>

## Related Resources

<Columns cols={3}>
  <Card title="Audio Models Overview" icon="arrow-left" href="/docs/en/guides/models/audio">
    View all TTS models and their capabilities.
  </Card>

  <Card title="Pricing Details" icon="receipt" href="/docs/en/guides/pricing/details">
    View pricing for speech, text, image, and all other models.
  </Card>

  <Card title="Voice List" icon="microphone" href="/docs/en/guides/developer/tts#system-voice-id-list">
    Browse available voices and their supported parameters.
  </Card>
</Columns>
