BormintoDevelopers Documentation
docs.borminto.com

Stream Sound To Text

Live captions while someone speaks: partial text first, then final lines. Your server creates a session and a one-time ticket; your app connects with the ticket.

POST https://borminto.com/api/v1/voice/transcription-sessions
  1. Create a session

    Send language, such as ar-EG. Keep session_id from the 201 response.

  2. Get a ticket

    POST …/transcription-sessions/{session}/connect with transport: websocket or webrtc. The ticket works once, for 45 seconds.

  3. Connect and speak

    Open wss://borminto.com/voice-stream/transcription/socket with the subprotocols borminto.transcription.v1 and the ticket, then send audio after session.ready. Add browser origins in Applications & API keys.

  4. End

    DELETE …/transcription-sessions/{session}/connection. Final lines stay readable for 24 hours with GET …/transcription-sessions/{session}.

Events

EventMeaning
session.readyStart sending audio. Usage starts here, including silence.
transcript.partialText so far for a segment_id. Replace it as new ones arrive; ignore older sequence values.
transcript.finalThe finished line for that segment_id.
session.endedreason is finished, connection_ended or allowance_ended.
session.errorcode is invalid_audio, audio_backpressure, source_unavailable, source_disconnected, allowance_unavailable or transcript_delivery_failed.

Errors

Continuing a stream

A ready connection uses the application's voice allowance while it is open. If the gateway reports usage_day_ended or source_limit, reconnect the same session using a fresh ticket. Retrieve any finalized segments with GET /api/v1/voice/transcription-sessions/{session}. If the allowance is exhausted, wait for the next reset or change the application's plan.

StatusCodeWhat to do
401authentication_requiredInvalid key or ticket. Request a fresh ticket.
402allowance_exhaustedThe allowance has run out or expired.
403request_failedThe browser origin is not allowed: add it in Applications & API keys. application_suspended means the application is suspended.
404not_foundThe session does not exist for this key.
409turn_conflictAnother connection is open. Close it before connecting again.
422invalid_requestInvalid language or transport.
429rate_limitedToo many requests or connections. Wait for Retry-After.
503voice_unavailableTemporarily at capacity. Retry with a new ticket.

Search documentation

Documentation
Dashboard (opens in a new tab)