Home Blog

How to Use the Seed TTS 3.0 API

Seed TTS 3.0 API blog cover

Nov 27, 2026

EmpirioLabs AI

Disclosure: This article was written with AI assistance and reviewed by EmpirioLabs AI.

Seed TTS 3.0 is available on EmpirioLabs. It is ByteDance's newest text-to-speech model: 541 preset voices, 119 languages and dialects that every voice speaks, and 82 audio tags written inline that set the emotion and delivery of the words after them or insert a laugh, a sigh or a gasp where they sit. Audio comes back as a finished file or as a stream, with word timestamps on request. It is billed per character of input, audio tags included.

Try it in the Playground, read the parameters in the docs, and see the current rates on the Seed TTS 3.0 model page.

Your first request

Send the text to POST /v1/audio/speech. The reply carries a link to the audio, its length, what was billed and, with timestamp_type set to WORD, the start and end of every word:

import os

import requests

API = "https://api.empiriolabs.ai/v1"
HEADERS = {"Authorization": f"Bearer {os.environ['EMPIRIOLABS_API_KEY']}"}

response = requests.post(f"{API}/audio/speech", headers=HEADERS, timeout=120, json={
    "model": "seed-tts-3-0",
    "input": "[excited] We did it! [laughs] The new release is live. [whispering] Don't tell anyone yet.",
    "voice": "multi_female_dacey_v3_uranus_bigtts",
    "language": "en",
    "timestamp_type": "WORD",
})
response.raise_for_status()
result = response.json()

audio = result["data"][0]
with open("release.mp3", "wb") as f:
    f.write(requests.get(audio["url"], timeout=60).content)
print(f"{audio['duration_seconds']:.1f} s of audio, {result['usage']['billable_characters']} characters billed")
for word in result["timestamp_info"]["words"][:5]:
    print(f"{word['start']:.2f}-{word['end']:.2f}  {word['word']}")

It printed 4.5 s of audio, 90 characters billed, then the first words with their times.

Directing the delivery

  • Audio tags go in square brackets inside the text. Emotion tags such as [happy], [sarcastic] or [nervous] and delivery tags such as [whispering], [slow] or [very loud] shape the words that follow; vocal tags such as [laughs], [sighs] or [gasps] insert the sound where they sit. Tag names are written in English whatever the language of the text.
  • instruction gives one plain-language direction for the whole request, for example "Warm and calm".
  • pronunciation_map sets how particular words are read, as {"tone": ["GIF/jif"]}.
  • speed, volume and pitch adjust the voice: 0.5 to 2.0 for the first two, -12 to 12 semitones for pitch.

Streaming

POST /v1/audio/speech:stream takes the same body and sends the audio as it is generated, as server-sent events: audio.chunk events carry base64 audio, audio.timestamps the word times when asked for, and audio.done the link to the whole file and the usage. In our tests the first chunk arrived in about half a second.

import base64
import json
import os

import requests

response = requests.post(
    "https://api.empiriolabs.ai/v1/audio/speech:stream",
    headers={"Authorization": f"Bearer {os.environ['EMPIRIOLABS_API_KEY']}"},
    json={"model": "seed-tts-3-0", "input": "[warm] Thanks for waiting. Your table is ready.", "response_format": "mp3"},
    stream=True,
    timeout=120,
)
response.raise_for_status()
with open("table.mp3", "wb") as out:
    for line in response.iter_lines(decode_unicode=True):
        if not line or not line.startswith("data: ") or line == "data: [DONE]":
            continue
        event = json.loads(line[6:])
        if event["type"] == "audio.chunk":
            out.write(base64.b64decode(event["audio_b64"]))  # play or forward each chunk as it arrives
        elif event["type"] == "audio.done":
            print(event["usage"]["billable_characters"], "characters billed")
        elif event["type"] == "audio.error":
            raise RuntimeError(event["error"]["message"])

Speaking text as it is written

WEBSOCKET /v1/realtime?model=seed-tts-3-0 takes text while it is still being written, for example a language model's reply, and returns the audio as it is generated. Send the text in pieces with input_text_buffer.append, then session.finish, and set the voice, language and other options with session.update. Audio tags work as they do in a request.

import asyncio, base64, json, os, websockets

URL = "wss://api.empiriolabs.ai/v1/realtime?model=seed-tts-3-0"
KEY = os.environ["EMPIRIOLABS_API_KEY"]

async def main():
    async with websockets.connect(URL, additional_headers=[("Authorization", f"Bearer {KEY}")], max_size=None) as ws:
        await ws.recv()  # session.created
        await ws.send(json.dumps({"type": "session.update", "session": {"language": "en"}}))
        # Text goes in as it is written, for example a language model's reply.
        for piece in ["[happy] Good evening, ", "and welcome back. ", "Here is what changed today."]:
            await ws.send(json.dumps({"type": "input_text_buffer.append", "text": piece}))
        await ws.send(json.dumps({"type": "session.finish"}))
        audio = bytearray()
        async for raw in ws:
            event = json.loads(raw)
            if event["type"] == "response.audio.delta":
                audio.extend(base64.b64decode(event["delta"]))  # 16-bit PCM, 24,000 Hz, mono
            elif event["type"] == "response.done":
                print("segment:", event["response"]["usage"]["billable_characters"], "characters")
            elif event["type"] == "session.finished":
                break
        print(f"{len(audio) / 48000:.1f} s of audio")

asyncio.run(main())

It printed segment: 67 characters and 4.2 s of audio. Text is spoken in segments that end at sentence boundaries, and each segment's response.done carries its usage, billed like the same text in a request. The Playground runs the same session with its Realtime switch.

Voices and languages

GET /v1/voices?model=seed-tts-3-0 lists the 541 voices. Every voice speaks every supported language, so choose a voice for its sound and set language for the text: auto (the default) detects it, a code such as es or ja fixes it, and a dialect code such as zh-CN-x-sichuan also sets the accent. A language name or a locale works too: "Spanish" and "zh-CN" are read as es and zh.

Watch the launch film

Every line in the film is Seed TTS 3.0 through the EmpirioLabs API, in English, Spanish, Japanese and Chinese, each directed by an audio tag. Watch it on YouTube.

Operational notes

  • Set language when you need word timestamps. They exist in 68 of the languages. With auto, the language detected from the text decides whether they come back, and asking for them in a language without them is refused.
  • Opus is produced at 48,000 Hz. With response_format set to opus, leave sample_rate unset or send 48000; any other rate is refused.
  • A Chinese character counts as two characters. The usage block shows both counts: characters as written and billable_characters as billed.
  • One request takes up to 10,000 characters. Split longer text at sentence ends and join the audio.
  • Keep a conversation's context with session_id. Requests that send the same id are spoken in the context of the ones before it; use a new id for each independent text. An id is private to your account.

Ready to use better endpoints?

Explore our models, or contact us about business inquiries, custom deployments, or anything else.