VibeVoice

The API

Two ways in: a WebSocket that returns punctuated text while somebody is still talking, and an HTTP pipeline for files. Every example below was taken from the running server rather than written to describe it.

Quickstart: your first request

Two minutes, one terminal. A WAV file in, text out.

  1. Get a key

    Create an account and confirm the email (unverified accounts get 403). Then create a key on the Devices page of your account. Treat it like a password.

  2. Send a file

    The synchronous endpoint takes WAV only. Anything else, or a long file, goes to the job queue (second tab).

    curl -X POST https://vibevoice.net/api/transcribe \
      -H "X-API-Key: your_api_key_here" \
      -F "file=@/path/to/meeting.wav"
  3. Read the answer

    /api/transcribe answers with the transcript as plain text, not JSON, when the file is done.

    Can we move the review to Thursday? I need one more day for the figures.

    /api/jobs/submit answers at once with a job id. Poll GET /api/jobs/{id} until status is completed or failed.

    {"job_id": 1234, "status": "pending", "message": "Job submitted successfully"}

Streaming in six frames

Endpoint wss://vibevoice.net/api/v2/stream. Audio is raw 16 kHz mono int16 PCM, no header. The key goes in the first frame, never in the URL.

DirectionFrameWhat it is
you sendstartJSON with api_key, audio, optional language and vocabulary
you getreadyKey accepted. Carries the resume token. Wait for it before sending audio.
you sendbinaryRaw PCM audio, 16 kHz mono int16.
you getsegmentCommitted text with idx, never changes. Append in order.
you sendendNo more audio. For one short utterance send this, not flush.
you getendThe last frame, with last_idx and billed_ms.

No progress frame for 3 seconds means the link is dead: reconnect with the resume token. Also on the wire: flush and flushed, ping and pong, warning and restarting.

What can I build on the VibeVoice API?

Two things. The WebSocket at wss://vibevoice.net/api/v2/stream takes 16 kHz mono PCM — with typed frames, per-session vocabulary and explicit cuts. Existing desktop installs use the frozen v1 path at /api/stream. The HTTP endpoints transcribe files you already have. Both authenticate with an API key from your account.

There is no local or on-premise deployment: audio is transcribed on our servers, so an integration needs a network connection. If your constraint is that audio must never leave the machine, a self-hosted transcriber is the right tool and this is not one — we would rather say so here than after you have built against us.

Authentication

HTTP requests carry the key in an X-API-Key header, or the same key as Authorization: Bearer. Either works on every HTTP endpoint here. The WebSocket does neither: it takes the key in the first text frame after the connection opens. There is no query-parameter form — connecting with ?api_key= fails the handshake without explanation, which is the single most common way a first integration goes wrong.

X-API-Key: 0123456789abcdef...                                      # HTTP
Authorization: Bearer 0123456789abcdef...                           # HTTP, same key
{"type": "start", "api_key": "...", "audio": {...}}                # v2 first frame (recommended)
{"api_key": "0123456789abcdef..."}                                  # v1 legacy first frame

Keys are per-device rather than per-account: treat a key as a password, as it is not scoped. Unverified accounts return 403 until the link in the confirmation email is clicked.

What comes back

Text arrives in pieces while the speaker is still going. On protocol v2, every text frame is a JSON object whose first key is type: a ready frame after start, followed by committed segment frames with text and sequence position idx. The segments never overlap: append them in order and you have the transcript.

# v2 (recommended) — typed JSON frames
{"type": "ready", "session": "...", "resume": {"token": "..."}, ...}
{"type": "segment", "idx": 1, "text": "Can we move the review to Thursday? I need one more day for the figures. ", "ack_ms": 27400}
{"type": "segment", "idx": 2, "text": "Everything else stays as planned.", "ack_ms": 31200}
{"type": "end", "last_idx": 2, "billed_ms": 31200}

# v1 (legacy) — raw pieces followed by final marker
{"text": "Can we move the review to Thursday? I need one more day for the figures. ", "idx": 1, "ack_ms": 27400}
{"text": "Everything else stays as planned.", "idx": 2, "ack_ms": 31200}
{"text": "", "is_final": true, "idx": 2}

Each piece carries idx (counting from 1, continuing across resumes) and ack_ms (audio timestamp in ms before which every word has been delivered). v2 also emits progress once a second and confirms manual cuts with flushed. Segments are whole stretches of speech cut at a pause, about every half minute in a long stream, not single words. For one utterance, a command or a short note, send end rather than flush: it is the fastest way to all of the text.

If the connection drops

A phone switching between Wi-Fi and mobile data drops its socket mid-sentence. On protocol v2, every ready frame automatically carries a resume token. Reconnect with that token and the last segment you received to resume the same stream seamlessly. No progress frame for 3 seconds means the link is dead: reconnect then, rather than waiting for TCP to give up, which on a phone can take a minute.

# v2 reconnect
{"type": "start", "api_key": "...", "audio": {...},
 "resume": {"token": "<token>", "last_idx": 3, "ttl_s": 60}}

{"type": "ready", "resume": {"token": "...", "resumed": true, "received_ms": 9024}}
{"type": "segment", "idx": 4, "text": "...", "ack_ms": 9000}    # what you missed

# v1 legacy reconnect (requires resumable: true on connect)
{"api_key": "...", "resumable": true, "resume": "<token>", "last_idx": 3}
{"status": "authenticated", "resumed": true, "received_ms": 9024}

When resumed is true, the server replays missed segments and you stream audio from received_ms onward. The session is held for 30 seconds by default (configurable up to 120 seconds in ttl_s). If expired, resumed is false: resend from your last ack_ms.

Error handling & close codes

Protocol v2 delivers errors as explicit JSON frames followed immediately by an RFC 6455 application close code (4000–4029). Every error specifies whether reconnecting can succeed in retryable.

{"type": "error", "code": "invalid_api_key", "retryable": false}  # close 4001
{"type": "error", "code": "quota_exceeded", "retryable": false}   # close 4002
{"type": "error", "code": "rate_limited", "retryable": true,
 "retry_after_ms": 60000}                                         # close 4029

# Mid-stream server drain before restart:
{"type": "restarting", "reconnect_after_ms": 4000}

Close codes map directly to failure reasons. The last three are retryable.

CloseCodeRetryMeaning
4000bad_startunknown_messagenoThe first frame is missing, not JSON, has the wrong type or a wrong field; or a text frame whose type is not flush, end or ping.
4001invalid_api_keynoKey unknown or revoked.
4002quota_exceededtrial_exhaustednoThe minutes of the plan or of the trial are used up.
4003device_key_refusednoThis key may not stream here.
4004unsupported_audiounsupported_languagenoThe audio format or language code is not supported; the error frame lists what is.
4010server_restartingyesThe server restarted before the stream began. Mid-stream you get a restarting frame instead.
4011internal_erroryesAn internal error.
4029rate_limitedyesToo many streams: 300 opened an hour per API key, 600 per IP address. Wait retry_after_ms before reconnecting.

A working client

# Install: pip install websockets
import asyncio
import json
import websockets

API_KEY = "your_api_key_here"
URL = "wss://vibevoice.net/api/v2/stream"


async def stream_audio_v2(pcm_chunks):
    """pcm_chunks yields raw int16 PCM bytes, 16 kHz mono."""
    async with websockets.connect(URL) as ws:
        # 1. Start frame: format required; optional language & vocabulary.
        await ws.send(
            json.dumps({
                "type": "start",
                "api_key": API_KEY,
                "audio": {"encoding": "pcm_s16le", "sample_rate": 16000, "channels": 1},
                "language": "de",  # or "auto", or omit to use account default
                "vocabulary": ["Home Assistant", "Zigbee", "Wohnzimmer"],
            })
        )

        # 2. Server answers with ready frame containing session and limits.
        ready = json.loads(await ws.recv())
        if ready.get("type") != "ready":
            raise RuntimeError(ready)

        # 3. Read committed segment frames while audio is streaming.
        async def reader():
            async for message in ws:
                frame = json.loads(message)
                kind = frame.get("type")
                if kind == "segment":
                    print(frame["text"], end="", flush=True)
                elif kind == "progress":
                    pass  # frame["received_ms"], frame["ack_ms"]
                elif kind == "flushed":
                    pass  # flush cut complete up to frame["ack_ms"]
                elif kind == "end":
                    break
                elif kind == "error":
                    raise RuntimeError(f"Error {frame.get('code')}: {frame.get('message')}")

        reading = asyncio.create_task(reader())

        # 4. Stream audio as binary frames.
        for chunk in pcm_chunks:
            await ws.send(chunk)

        # Optional, for long streams: flush cuts at the latest pause.
        # Words after that pause arrive later, at the latest with "end".
        # await ws.send(json.dumps({"type": "flush"}))

        # 5. Send end control frame when finished.
        await ws.send(json.dumps({"type": "end"}))
        await reading


asyncio.run(stream_audio_v2(my_pcm_source()))

Endpoints

WSSwss://vibevoice.net/api/v2/stream

Recommended streaming protocol (v2) for live dictation and speech applications.

Typed frames · per-session language & vocabulary · explicit flush · automatic resume tokens · close codes

WSSwss://vibevoice.net/api/stream

Legacy streaming protocol (v1), frozen for existing desktop installs.

Additive maintenance only · /stream is the legacy alias · new integrations should use /api/v2/stream

POST/api/transcribe

Synchronous transcription of a single WAV file. Nothing transcodes first, so other formats belong on /api/jobs/submit.

Optional prompt field biases vocabulary · up to 30MB, the same for every plan

POST/api/jobs/submit

The queued pipeline, and the one to use for anything long or not already a WAV. Returns a job id immediately; poll GET /api/jobs/{id} for status and the finished transcript. Optional word-level timestamps (Pro and Ultra) and speaker diarization (Ultra).

Accepts audio and video · include_timestamps, word_level_timestamps, enable_diarization · up to 100MB free, 1GB on Pro, 10GB on Ultra

POST/oauth/device/code

Device Code Grant, for a client with no browser of its own — the desktop app and CLI tools use it. Pair with /oauth/device/token to exchange an approved code for a key.

Same flow the desktop client runs on first launch

The complete parameter and response reference is in the Redoc explorer (opens in a new tab), generated from openapi.json (opens in a new tab).

30min / month

Included every month on every account, Free plan and up — no credit card needed to test the API.

A glass housing with an orb feeding threads into one side and structured output emerging from the other.

What the API does not do

  • It does not run on your infrastructure. There is no self-hosted build, no container and no on-premise licence — audio is transcribed on our servers.
  • It does not work offline, and it has no local fallback. A dropped connection can be resumed for 30 seconds by default (configurable up to 120 seconds on protocol v2); after that, or without resume, the stream is gone.
  • POST /api/transcribe takes WAV only. Other formats belong on /api/jobs/submit, which transcodes; sending an mp3 to the synchronous endpoint currently returns a 500 rather than a helpful error.
  • There is no custom model or terminology training. You can bias recognition with a per-session vocabulary list on streaming v2 (up to 200 terms, capped at 400 characters in total via limits.max_vocabulary_chars; whole terms from the end are dropped and ready.vocabulary.truncated reports when terms are omitted) or the prompt field on batch requests, which condition the decoder rather than retraining the model.
  • Speaker diarization runs on the job pipeline only, not on the live stream, and requires Ultra.
  • There is no webhook or push callback yet. Job completion is polled.

Common questions

Raw int16 PCM, 16 kHz, mono, sent as binary WebSocket frames — no container, no header, no WAV wrapper. On protocol v2, the format is declared in the start frame ({"encoding": "pcm_s16le", "sample_rate": 16000, "channels": 1}) and mismatches receive an explicit unsupported_audio error with close code 4004. Float32 samples are the usual mistake on v1, where they transcribe as noise because the bytes are read as int16 regardless.

With a JSON start frame on protocol v2 ({"type": "start", "api_key": "...", "audio": ...}), answered with a ready frame before audio is accepted. Legacy v1 (/api/stream) uses {"api_key": "..."}. There is no query-parameter or header form — connecting with ?api_key= fails the handshake without explanation.

/api/v2/stream is the current protocol and recommended for new integrations: it provides typed JSON frames, per-session vocabulary hints, explicit flush cuts, automatic resume tokens, and standard close codes. /api/stream and /stream are the frozen v1 protocol, kept for existing desktop installs that cannot be force-updated.

On protocol v2, pass vocabulary in the start frame as a list of strings (up to 200 terms of up to 100 characters each). The list is also capped at 400 characters in total (limits.max_vocabulary_chars); terms are packed in order, and whole terms from the end are dropped when they exceed the cap. ready.vocabulary.accepted reports how many were included, and ready.vocabulary.truncated indicates if any were dropped.

No. The protocol is a WebSocket and a multipart POST, which every language handles in its standard library or one common package, so a wrapper would mostly be maintenance. The request examples on this page are the reference implementation.

300 requests an hour on POST /api/transcribe and 200 on POST /api/jobs/submit, counted per IP address. Streams: 300 opened an hour per API key, 600 per IP address. Separately, your plan caps monthly transcription minutes and maximum file size — those are the limits most integrations meet first.

Yes, through /api/jobs/submit rather than the synchronous endpoint. It queues the work and returns an id to poll, so the request does not sit open for the duration. File-size caps still apply by plan.

Last updated .