Seed ASR 2.0 Stream API

Live transcription over a WebSocket in 67 languages: Chinese and English arrive word by word while the speaker talks, other languages in passages, priced per hour of audio.

ByteDance Transcription Malaysia Proprietary Endpoint New

About Seed ASR 2.0 Stream

Live transcription over a WebSocket in 67 languages: Chinese and English arrive word by word while the speaker talks, other languages in passages, priced per hour of audio.

Stream 16 kHz mono 16-bit PCM over the socket. Billed per second of audio sent, at the hourly rate.

Also known as Seed ASR Stream, ByteDance Seed ASR 2.0 Stream

transcription speech to text realtime streaming asr multilingual hotwords

Seed ASR 2.0 Stream specs

Model ID
seed-asr-2-0-stream
Author
ByteDance
Category
Transcription
Released
-
Input
Audio
Output
Text
Region
Malaysia
Endpoints
WEBSOCKET/v1/realtime
Alternate model IDs
seed-asr-2.0-streambytedance/seed-asr-2.0-streambytedance/seed-asr-2-0-stream

Seed ASR 2.0 Stream API pricing

Live pay-as-you-go rates from the EmpirioLabs catalog. You can also choose a plan with weekly allowances.

Type
Spec
Rate
Transcription
per hour of audio
$0.30
Compare on the full pricing page

How to call the Seed ASR 2.0 Stream API

Seed ASR 2.0 Stream transcribes a live audio stream over a WebSocket at wss://api.empiriolabs.ai/v1/realtime?model=seed-asr-2-0-stream, not over the HTTP endpoints. Connect with the model id seed-asr-2-0-stream and send your EmpirioLabs API key as an Authorization: Bearer header on the handshake. Append base64 16-bit PCM audio and read transcript events back while the speaker is still talking. A browser cannot set headers on a WebSocket, so open this connection from your server and relay audio to the browser over your own socket. Get an API key from the EmpirioLabs dashboard.

Python (websockets)
import asyncio, json, os, websockets

async def main():
    async with websockets.connect(
        "wss://api.empiriolabs.ai/v1/realtime?model=seed-asr-2-0-stream",
        additional_headers=[
            ("Authorization", f"Bearer {os.environ['EMPIRIOLABS_API_KEY']}"),
        ],
        max_size=None,
    ) as ws:
        print(json.loads(await ws.recv())["type"])  # session.created

        import base64

        # 16-bit PCM microphone audio, base64 encoded, in small chunks.
        for chunk in read_microphone_chunks():
            await ws.send(json.dumps({
                "type": "input_audio_buffer.append",
                "audio": base64.b64encode(chunk).decode(),
            }))

        await ws.send(json.dumps({"type": "input_audio_buffer.commit"}))

        async for raw in ws:
            event = json.loads(raw)
            if event["type"].endswith("input_audio_transcription.delta"):
                # "text" is settled transcript; "stash" is still in progress.
                if event.get("text"):
                    print(event["text"], end="", flush=True)

asyncio.run(main())
Full Seed ASR 2.0 Stream API reference

Seed ASR 2.0 Stream API parameters

Request parameters supported by the Seed ASR 2.0 Stream API on EmpirioLabs. Defaults apply when a field is omitted.

ParameterTypeDefaultRange / valuesDescription
languageenumautoauto, multi, en, zh, yue, ja, ko, es, pt, de, fr, it, nl, ru,...Language spoken. auto, zh, yue and en stream Chinese (Mandarin and dialects such as Cantonese) and English word by word as they are spoken. Every other language, and...
input_audio_formatenumpcm16pcm16The audio you stream: 16 kHz 16-bit mono PCM (pcm16), base64 in input_audio_buffer.append or as binary frames.
silence_duration_msinteger800300 to 5000The pause in milliseconds that ends a turn, 300 to 5000 (turn_detection.silence_duration_ms). Chinese and English.
two_passbooleantrue-Read each finished turn again for a more accurate final transcript. Chinese and English.
accelerate_scoreinteger00 to 20Show the first words of a turn sooner: 0 (off) to 20 (fastest). Higher values can make the first words less accurate. Chinese and English.
force_to_speech_timeinteger00 to 10000The audio in milliseconds a turn must have before a pause can end it, 0 to 10,000. 0 lets any pause end it. Chinese and English.
promptstring-max 4000Text that helps recognition, up to 4,000 characters: names, terms, or what was said just before.
hotwordsarray-max 5000Up to 5,000 words or names to recognize as written, each up to 100 characters.
contextarray-max 20Up to 20 earlier turns of the conversation, most recent first, each a string or an object with text (up to 1,000 characters) and an optional speaker, for example...
itnbooleantrue-Write numbers, dates and amounts as digits and symbols, for example 20% for twenty percent.
punctuationbooleantrue-Add punctuation.
disfluency_removalbooleanfalse-Remove filler words and repetitions such as um, uh and repeated words. Chinese and English.
traditional_chineseenumoffoff, traditional, tw, hkWrite Chinese in Traditional characters: traditional, tw (Taiwan) or hk (Hong Kong). off keeps Simplified.
sensitive_words_filterobject--Hide words in the text: an object with filter_with_empty (words to remove), filter_with_signed (words to replace with *), system_reserved_filter (true also replaces...
2 more parameters in the docs

Good to know

Connect

  • WEBSOCKET /v1/realtime?model=seed-asr-2-0-stream, in the OpenAI Realtime transcription protocol: stream 16 kHz mono 16-bit PCM (pcm16) with input_audio_buffer.append, as base64 or binary frames.
  • Transcripts arrive as conversation.item.input_audio_transcription.delta while the speaker talks and conversation.item.input_audio_transcription.completed when a turn ends.

Languages

  • language, on the URL or in session.update: auto (default), zh, yue and en stream Chinese, its dialects and English word by word. Every other language, and multi (any language, detected), streams its text about every 20 seconds and at each commit.
  • Set language for speech that changes language: detection can miss a change.
  • prompt, hotwords and context help recognize names and terms.

Turns

  • A pause of silence_duration_ms (800 by default) ends a turn; with turn_detection set to null, input_audio_buffer.commit ends one.
  • two_pass (on) reads each finished turn again for a more accurate final transcript, and accelerate_score shows a turn's first words sooner. Chinese and English.
  • itn and punctuation (both on), disfluency_removal, traditional_chinese and sensitive_words_filter shape the text.

Billing

  • Billed per second of audio sent, at the hourly rate. An open connection with no audio is not billed.

Seed ASR 2.0 Stream on the blog

Announcements, prompt tests, and comparisons that cover this model.

Seed ASR 2.0 Stream API: common questions

How much does the Seed ASR 2.0 Stream API cost?

On EmpirioLabs, Seed ASR 2.0 Stream is billed pay as you go: Transcription $0.30 per hour of audio. You can also choose a plan with weekly allowances. The live rate card on this page always matches what the API charges.

What inputs and outputs does Seed ASR 2.0 Stream support?

Seed ASR 2.0 Stream takes Audio as input and returns Text.

Which endpoint does Seed ASR 2.0 Stream use?

Seed ASR 2.0 Stream is served through WEBSOCKET /v1/realtime on api.empiriolabs.ai with standard bearer-token authentication.

What is the model ID for Seed ASR 2.0 Stream?

Send seed-asr-2-0-stream as the model in your request. The alternate IDs seed-asr-2.0-stream, bytedance/seed-asr-2.0-stream, bytedance/seed-asr-2-0-stream also work.

Where is Seed ASR 2.0 Stream served from?

Seed ASR 2.0 Stream on EmpirioLabs is served from Malaysia.

Can I try Seed ASR 2.0 Stream in the browser before integrating?

Open the EmpirioLabs playground and press Start session to try it in your browser. Seed ASR 2.0 Stream runs over a WebSocket rather than a request and response, so to build with it start from the realtime voice quickstart. Connect from your server with your EmpirioLabs API key and the model id seed-asr-2-0-stream, then stream audio in both directions.

How do I get a Seed ASR 2.0 Stream API key?

Create an EmpirioLabs account, then generate a key under API Keys in the dashboard. Billing is pay-as-you-go credits, so you only pay for the requests you make. You can also choose a plan with weekly allowances.

Ready to use better endpoints?

Check out our pricing or reach out if you want your own model deployed on our stack.