Opennan

Live transcribe

Live

Talk and see your words appear as you speak, in many languages, detected for you.

$0.00846/minFailed steps are not charged

Live transcribe

$0.00846/min
How you talk
Hold the button (or Space) while you talk; let go and it finishes the sentence.

Billed per second of audio, reserved 1 min at a time. The session ends on its own if your balance runs out, after a stretch of silence, or at the time limit.

Ready

Example runA recorded live session

Language: Thai · A real run of this tool. Your own run replaces it.

What was said

0:00 / 0:00

Transcript

  1. สวัสดีค่ะ ยินดีต้อนรับสู่ร้านกาแฟของเรา วันนี้เรามีเค้กช็อกโกแลตตอบใหม่ๆ ลองชิมดูไหมคะ

Live transcribe API

One WebSocket: send your mic audio; get words as you speak and each finished sentence with its language.

WSShttps://api.opennan.com/v1/realtime/stt
  1. Get an API key

    Create a key in the console. It uses the same balance as the playground.

    Create a key
  2. Send your first request

    The same request the playground sends. Set OPENNAN_KEY to your key.

    const ws = new WebSocket("wss://api.opennan.com/v1/realtime/stt");
    ws.binaryType = "arraybuffer";
    
    ws.onopen = () => {
      ws.send(JSON.stringify({ type: "auth", ticket: session.ticket }));
      ws.send(JSON.stringify({
        "type": "session.config",
        "language": "auto"
      }));
    };
    
    mic.ondata = (pcm16) => ws.send(pcm16); // 16 kHz mono 16-bit PCM, <= 65536 bytes a frame
    
    ws.onmessage = (e) => {
      const msg = JSON.parse(e.data);
      if (msg.type === "transcript.partial") showDraft(msg.text);
      if (msg.type === "transcript.final") addLine(msg.sentence_id, msg.text, msg.language);
      if (msg.type === "session.end") console.log("ended:", msg.reason);
    };
    
    stop.onclick = () => ws.send(JSON.stringify({ type: "session.end" }));
  3. Read the events

    While you talk, the server sends JSON events; the voice comes as base64 audio chunks with their format.

    session.started
    Your session is open, with its price and limits
    transcript.partial
    Words while you are still talking
    transcript.final
    A finished sentence and its language
    usage
    Seconds and cost so far
    error
    A problem, with a code and plain words
    session.end
    Why it ended: you, balance, silence or time limit

Errors and how to fix them

  • 401Missing or wrong key

    Send the header Authorization: Bearer with a key from the console.

  • 402Balance too low

    Add credit in Billing, then send the same call again.

  • 400A value is not accepted

    Read error.message: it names the field. Use a value from the parameter table.

  • 429Too many requests

    Wait a few seconds and try again, waiting longer after each 429.

Live transcribe: questions

What does Live transcribe cost?

$0.00846/min, billed per second of audio. Time is reserved a minute at a time and settled as you go; the session stops cleanly when your balance can't cover the next minute.

How do I call it?

Open a WebSocket to WSS https://api.opennan.com/v1/realtime/stt. From a browser, send an auth message with your key as the first message within 5 seconds; from a server you can use the Authorization header. Then send the session config and 16 kHz mono 16-bit PCM audio. Keys never go in the URL.

Am I charged when something fails?

No. A step that fails is not charged, and the reason is shown in plain words.

Can I use someone else's voice?

No. You can clone only your own voice, with a recording of you reading a consent sentence we give you. Voices are never shared between accounts.

Can my AI agent use it?

Yes, over the API. Have it read https://api.opennan.com/llms.txt to learn how.

We only use the cookies the site needs, such as your language and a referral code. No ads. We count page visits with cookie-free analytics. See our Cookie Policy for details.