← Speech data prep and inference API

Streaming ASR

Real-time WebSocket transcription with semantic turn-end detection across 45 languages at $0.10 / audio hour. Emits replaceable live partials, speculative turn.eager_end drafts for voice-agent prefetching, automatic turn.resume rollback on mid-pause continuations, confirmed turn.end events, configurable filler preservation (include_fillers), and an optional manual flush mode.

Specifications and limits

Built for interactive voice agents and live transcription pipelines. Supports raw binary audio streaming over WebSocket alongside a companion HTTP file endpoint using the same model identifier.

WebSocket endpointwss://api.trelis.com/v1/audio/transcriptions/stream (authenticate with Authorization: Bearer $TRELIS_API_KEY or browser subprotocol Sec-WebSocket-Protocol: trelis.auth, tk_live_...)
Companion HTTP endpointPOST https://api.trelis.com/v1/audio/transcriptions with model=trelis-asr-turn-v1 (alias trelis-stream-fast). Clips ≤28 s return synchronously; longer files up to 4 hours (or async_mode=true / webhook_url) run via async batch.
Pricing$0.10 / audio hour ($0.001667 / min), billed per streamed or processed audio second to the exact microdollar (no $0.001 minimum; zero-audio disconnects are refunded in full). See current API pricing →
Audio input formatspcm_s16le (default), pcm_f32le, pcm_mulaw, or pcm_alaw mono at 8 kHz to 48 kHz (default sample_rate=16000). Binary frames or base64 JSON audio frames supported.
Turn detection modesturn_detection=auto (default): fast pause detection triggers turn.eager_end, semantic turn scoring releases confirmed turn.end (or holds through pauses/hesitations with turn.resume), plus a hard silence backstop (silence_backstop_s, default 3.0 s, configurable 0.2–30.0 s via query param). The conservative 3.0 s default avoids interrupting slow-paced speakers during thinking pauses; pass e.g. ?silence_backstop_s=2.0 or 1.5 for tighter tail p95.
turn_detection=manual (or manual_flush=true): disables auto-endpointing while keeping 500 ms live partials; commits on explicit flush, finalize, or done.
Filler toggle (include_fillers)Turn verbal fillers (um, uh, er, etc.) on or off via query param (include_fillers=true|false, default false), mid-stream JSON config frames, or HTTP form field. Even when include_fillers=false returns clean transcripts to your app, hesitations remain visible internally to prevent premature turn cuts.
Languages45 languages with automatic language detection when language is omitted (or pass an ISO hint such as en, es, fr, de, pt, it, ar, ja, zh). For dedicated Hindi & Hinglish transcription, see Trelis Tara ($0.05/hr).
Long utterancesUtterances longer than 28 seconds automatically roll segments seamlessly without closing the turn or dropping context.
Data retentionZero data retention; Trelis does not store, log, or train on streamed audio or transcripts.

WebSocket wire protocol

Mirrors the turn-lifecycle event model used by low-latency voice-agent pipelines so you can start speculative LLM generation on turn.eager_end and cancel cleanly if turn.resume arrives.

Client frameBehavior
Binary PCM / μ-law / A-lawStreams raw audio frames (20 ms to 250 ms chunks recommended)
flush or {"type":"flush"}Commits current buffered turn (reason="manual_flush") and emits flush_done
finalize or {"type":"finalize"}Forces immediate turn commit and emits flush_done
{"type":"config",...}Updates language, include_fillers, or turn_detection mid-stream
done or {"type":"done"}Flushes any remaining speech, settles billing, and emits final done
Server eventMeaning
connectedSession handshake confirming model, encoding, sample rate, filler mode, and turn detection mode
turn.startNew caller turn opened with unique turn_id and revision
turn.updateReplaceable interim transcript emitted every ~500 ms (is_final: false)
turn.eager_endFast pause draft transcript (is_final: false) for speculative agent prefetching
turn.resumeCaller resumed speaking before release; cancels pending timers and increments revision
turn.endConfirmed final turn transcript (is_final: true, reason, language)

Turn endpointing & latency vs. ElevenLabs Scribe v3 Live

Evaluated live from US East at 1.0x real-time against production wss://api.trelis.com and ElevenLabs scribe_v3_live (commit_strategy=turn_prediction) on 40 un-spliced real human-to-agent calls from the public livekit/eot-bench-data English validation set containing 73 natural mid-turn hold pauses (≥400 ms) and 40 true end-of-turn (eot) boundaries.

SystemList priceTrue EOT recallSpeculative eager_end p50Final turn_end p50Mid-turn hold false EP (↓)turn.resume recovery
Trelis trelis-asr-turn-v1 (Auto)$0.10 / hr40/40 (100%)273 ms752 ms10/73 (13.7%)57/67 (85.1%)
ElevenLabs Scribe v3 Live (turn_prediction)$0.22 / hr40/40 (100%)—786 ms13/73 (17.8%)—

On LiveKit’s neutral real-call benchmark, Trelis commits faster at median (752 ms vs 786 ms) with fewer mid-turn pause interruptions (13.7% vs 17.8% across 73 natural hold spans) at 2.2x lower cost ($0.10/hr vs $0.22/hr), while exposing a 273 ms p50 (489 ms p95) speculative turn.eager_end event with 85.1% turn.resume recovery that ElevenLabs does not provide (ElevenLabs exposes a numeric turn_probability on partials rather than dedicated eager-end and resume events). On turns with any premature commit, Trelis was 11/40 vs 9/40. Because uncertain turns wait for the default 3.0 s silence_backstop_s (vs ElevenLabs’s shorter fallback), Trelis’s default EOT p95 is 3.39 s vs 1.59 s; setting ?silence_backstop_s=2.0 reduces p95 to 2.49 s at 17.8% hold false interrupts (matching ElevenLabs), and 1.5 reduces p95 to 1.94 s at 20.5%.

Real-world accuracy & US East manual-commit latency

Head-to-head in manual-commit mode from US East across all 9 benchmarked test splits using identical text normalization: spontaneous English earnings calls (Earnings22, closest to live voice-agent conversations) plus all 8 tested languages from crowdsourced read speech (Common Voice 17, test split) with none omitted. Trelis matches scribe_v3_live within 0.49 WER points on spontaneous English calls and outperforms it on Spanish, while running slightly higher WER on read Common Voice speech at 2.2x lower price (126–201 ms commit p50 across European & Arabic sets).

LanguageDatasetTrelis WER (↓)ElevenLabs v3 WER (↓)Trelis commit p50ElevenLabs v3 commit p50
English (spontaneous calls)Earnings22 test (n=20)13.48%12.99%201 ms62 ms
English (en)Common Voice 17 (n=15)15.22%10.87%143 ms56 ms
Spanish (es)Common Voice 17 (n=15)2.63%3.95%167 ms56 ms
German (de)Common Voice 17 (n=15)3.38%2.03%163 ms52 ms
Italian (it)Common Voice 17 (n=15)4.76%2.72%175 ms56 ms
Portuguese (pt)Common Voice 17 (n=15)8.18%4.55%153 ms55 ms
Arabic (ar)Common Voice 17 (n=15)11.69%6.49%126 ms50 ms
French (fr)Common Voice 17 (n=15)12.50%8.09%143 ms56 ms
Hindi (hi)*Common Voice 17 (n=15)23.62%11.02%339 ms52 ms

Manual-commit latency measures elapsed time from the final audio frame sent to the final committed transcript received (both measured from US East against production endpoints). Warm companion sync HTTP transcription completes a 4.66 s WAV in 172 ms p50 (27x realtime). *For dedicated Hindi and Hinglish workloads, we recommend Trelis Tara ($0.05/hr, 12.06% Vistaar Hindi WER) instead of this general multilingual endpoint.

Quickstart (WebSocket, manual flush & filler toggle)

Stream raw 16 kHz mono PCM16 frames for automatic turn detection, toggle include_fillers on or off at connect time or mid-stream, switch to turn_detection=manual to control commits with flush, or send short/long audio files to POST /v1/audio/transcriptions.

Python (WebSocket auto turn detection)

pythonstream_auto.py
import asyncio, json, os, websockets

WS_URL = (
    "wss://api.trelis.com/v1/audio/transcriptions/stream"
    "?model=trelis-asr-turn-v1&turn_detection=auto&include_fillers=false"
)

async def stream_turn_asr(pcm_path: str):
    headers = {"Authorization": f"Bearer {os.environ['TRELIS_API_KEY']}"}
    async with websockets.connect(WS_URL, additional_headers=headers) as ws:
        print(json.loads(await ws.recv()))  # {"type": "connected", ...}

        async def receiver():
            async for raw in ws:
                ev = json.loads(raw)
                t = ev["type"]
                if t == "turn.update":
                    print(f"[partial]   {ev['text']}")
                elif t == "turn.eager_end":
                    # Start speculative LLM / tool prefetch here
                    print(f"[eager_end] {ev['text']}")
                elif t == "turn.resume":
                    # Caller kept talking — cancel speculative generation
                    print("[resume]    cancelled speculative turn")
                elif t == "turn.end":
                    print(f"[FINAL]     {ev['text']} (reason={ev['reason']})")
                elif t == "done":
                    return

        recv_task = asyncio.create_task(receiver())
        with open(pcm_path, "rb") as f:
            while chunk := f.read(3200):  # 100 ms of 16 kHz mono PCM16
                await ws.send(chunk)
                await asyncio.sleep(0.1)
        await ws.send("done")
        await recv_task

asyncio.run(stream_turn_asr("utterance_16k.pcm"))

Manual flush, filler toggle & companion HTTP

bashmanual & http
# 1. Manual flush mode (disable auto-endpointing, keep 500 ms live partials)
# Connect to:
#   wss://api.trelis.com/v1/audio/transcriptions/stream?model=trelis-asr-turn-v1&turn_detection=manual
# Stream audio frames, then send plain text "flush" (or {"type":"flush"}) to commit:
#   -> emits {"type":"turn.end","reason":"manual_flush",...} + {"type":"flush_done"}
# Toggle fillers on/off anytime mid-stream:
#   {"type": "config", "include_fillers": true}

# 2. Companion sync / batch file transcription (<= 28 s sync; > 28 s or async_mode=true for batch)
curl -X POST https://api.trelis.com/v1/audio/transcriptions \
  -H "Authorization: Bearer $TRELIS_API_KEY" \
  -F "file=@clip.wav" \
  -F "model=trelis-asr-turn-v1" \
  -F "include_fillers=false"  # set true to keep "um" / "uh" verbatim

Start streaming with trelis-asr-turn-v1

Sign in with email in the console to create an API key and add prepaid credits, with optional automatic top-up. Pair with Conversational Gemma for a low-latency voice-agent stack.