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.
- You send:{"type":"text","text":"Sure, I can"}
- You send:{"type":"text","text":" help with that. Your last"}
- Server sends:{"type":"chunk","text":"Sure, I can help with that.", …}
- Server sends:PCM audio, 200 ms frames
- You send:{"type":"cancel"}the user starts talking
- 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 | af_heart | US | Female |
| Bella | af_bella | US | Female |
| Nicole | af_nicole | US | Female |
| Michael | am_michael | US | Male |
| Fenrir | am_fenrir | US | Male |
| Puck | am_puck | US | Male |
| Emma | bf_emma | UK | Female |
| George | bm_george | UK | Male |
- Voice id
- af_heart
- Accent
- US
- Gender
- Female
- Voice id
- af_bella
- Accent
- US
- Gender
- Female
- Voice id
- af_nicole
- Accent
- US
- Gender
- Female
- Voice id
- am_michael
- Accent
- US
- Gender
- Male
- Voice id
- am_fenrir
- Accent
- US
- Gender
- Male
- Voice id
- am_puck
- Accent
- US
- Gender
- Male
- Voice id
- bf_emma
- Accent
- UK
- Gender
- Female
- 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.
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"}
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
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.
Free
$0
100k characters/month
For trying it in a prototype.
Request a free keyStarter
$9/month
2M characters
By request during the beta.
Request StarterPro
$29/month
10M characters
By request during the beta.
Request Pro
- 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.