Skip to content
QuickvoiceBeta

Streaming text-to-speech API

Speaks while the model is still writing. Stops when your user cuts in.

Quickvoice gives AI assistants a voice for live conversation. Send text as your LLM produces it and audio comes back clause by clause. When the user interrupts, one message cancels the rest.

Beta. English only. Keys are issued by hand.

one turn on /ws
  1. You send:{"type":"text","text":"Sure, I can"}
  2. You send:{"type":"text","text":" help with that. Your last"}
  3. Server sends:{"type":"chunk","text":"Sure, I can help with that.", …}
  4. Server sends:PCM audio, 200 ms frames
  5. You send:{"type":"cancel"}the user starts talking
  6. Server sends:{"type":"cancelled"}

Live demo

We don't publish a latency number. Measure yours.

Type a line or pick one. The clock starts when your text goes out on the open socket and stops at the first audio frame your browser receives. The result is yours: your network, your distance from the server, today.

Type a line. Hear it back.

The reply is your own text, printed clause by clause as each clause is synthesised. Turn your sound on. The demo takes up to 300 characters per turn.

No key needed here. The demo runs on a rate-limited tier with 300 characters per turn. The chart plots the synthesis time the server reports for each clause of your own session, one point per chunk message.

Voices

English voices, US and UK.

English is the only language for now. The same voice ids work over the WebSocket, over HTTP and through MCP.

Heart
Voice id
af_heart
Accent
US
Gender
Female
Bella
Voice id
af_bella
Accent
US
Gender
Female
Nicole
Voice id
af_nicole
Accent
US
Gender
Female
Michael
Voice id
am_michael
Accent
US
Gender
Male
Fenrir
Voice id
am_fenrir
Accent
US
Gender
Male
Puck
Voice id
am_puck
Accent
US
Gender
Male
Emma
Voice id
bf_emma
Accent
UK
Gender
Female
George
Voice id
bm_george
Accent
UK
Gender
Male

Loading the voice list.

How it works

Text in, audio out, and a way to stop.

One connection carries a whole conversation. Three steps cover every turn.

  1. Stream text in

    Open one WebSocket and forward tokens as your LLM writes them. A clause goes to the voice as soon as it is complete, while the rest of the reply is still on its way.

    • {"type":"text","text":"..."}
    • {"type":"flush"}
  2. Audio out, clause by clause

    Each clause comes back as a chunk message followed by raw 16-bit PCM at 24 kHz, in 200 ms frames. Schedule the frames back to back with Web Audio and play.

    • {"type":"chunk","text":"..."}
    • binary PCM frames
  3. Cancel on barge-in

    When the user starts talking, send cancel. The server drops what it had queued and answers cancelled, so you know the line is clear for the next turn.

    • {"type":"cancel"}
    • {"type":"cancelled"}

Code

One socket for conversations. One POST for files.

Use the WebSocket when a person is waiting on the other end. Use /tts when you want the audio as a file or a stream over HTTP.

const ws = new WebSocket("wss://quickvoice-api.msrisktec.co.in/ws?api_key=qv_...");
ws.binaryType = "arraybuffer";

ws.onmessage = (event) => {
  if (typeof event.data !== "string") return play(event.data); // PCM frame
  const msg = JSON.parse(event.data);
  if (msg.type === "chunk") console.log(msg.text, msg.synth_ms);
};

ws.onopen = async () => {
  ws.send(JSON.stringify({ type: "config", voice: "af_heart", speed: 1.0 }));
  for await (const token of llmStream) {
    ws.send(JSON.stringify({ type: "text", text: token }));
  }
  ws.send(JSON.stringify({ type: "flush" })); // end of turn
};

// The user started talking: stop the voice.
const bargeIn = () => ws.send(JSON.stringify({ type: "cancel" }));

Pricing

Pay by the character.

Three plans and one overage rate. During the beta, paid plans are by request.

Extra usage
$4 per 1M characters.
What 1M characters buys
1M characters is roughly 18 hours of speech.
During the beta
Paid plans are by request. Keys are issued manually.

Beta access

Request an API key

Tell us where the voice will go. During the beta every key is issued by hand, so this form is the whole sign-up.

  • Free: $0, 100k characters/month.
  • Starter and Pro are by request while the beta runs.
  • English only for now.

Paid plans are by request during the beta.