ConnectAsync() to open and configure, and typed Event<T> fields to subscribe to messages.
Connecting
Both WebSocket APIs require a handshake before audio can flow. After the connection opens, the SDK sends the configuration automatically and waits for the server to respond withCONFIG_ACCEPTED. Only then does ConnectAsync() return. If configuration is rejected, ConnectAsync() throws.
- Stream
- Transcribe
C# .NET
Connecting without configuration
If you want to manage the handshake manually and only use the SDK for types and reconnection, omitconfiguration from ConnectAsync(). The socket opens without waiting for CONFIG_ACCEPTED — you are responsible for sending the config message yourself and waiting for StreamConfigStatusMessage before sending audio.
C# .NET
Sending audio
Both APIs accept raw audio bytes:Full example
- Stream
- Transcribe
C# .NET
Next steps (sending messages, lifecycle)
After the socket is OPEN and configuration has been accepted, use the SDK’s methods to send audio, flush, end, and subscribe to typed message events.- SDK method reference: See socket event types and method signatures in the C# .NET SDK reference.
- Protocol behavior & message semantics: For the underlying wire format and what each message means, refer to the WebSocket API docs.
Resources
- Stream API reference — WebSocket protocol details and message schemas
- Transcribe API reference — Transcribe protocol and configuration options
- Authentication Guide — All auth flows including scoped tokens for WebSocket
For support or questions, contact us