Sanas · AsyncAPI Specification
Sanas Stream API
Version v3
Real-time speech-to-speech translation over a single persistent WebSocket connection. Supports consecutive and simultaneous modes. Modeled by API Evangelist from the published Sanas WebSocket API and Stream message-layer documentation; not a Sanas-published AsyncAPI document.
View Spec
View on GitHub
CompanySpeech AIVoice AIAccent TranslationLanguage TranslationSpeech EnhancementReal-Time AudioSDKWebSocketContact CenterAsyncAPIWebhooksEvents
Channels
stream
Bidirectional WebSocket carrying JSON control text frames and PCM audio binary frames.
Messages
init
init
Opens the session and declares input/output sample rates.
configure
configure
Sets or reconfigures the translation pipeline (languages, voice, glossary, features); server replies with configured when ready. Carries optional request_id for correlation.
flush
flush
Manually finalizes the current turn; server confirms when fully processed.
configured
configured
Confirms the pipeline is ready to accept audio; echoes request_id.
transcript
transcript
Source and target transcript segments delivered as JSON.
error
error
Application-level error event on the stream.
audioFrame
audioFrame
Raw PCM audio bytes carried as a WebSocket binary frame (not JSON/base64).
Servers
wss
production
Sanas real-time translation Stream endpoint