Skip to main content
The SDK wraps both WebSocket APIs — Stream and Transcribe — with a consistent async/event-driven interface: factory methods to create connections, 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 with CONFIG_ACCEPTED. Only then does ConnectAsync() return. If configuration is rejected, ConnectAsync() throws.
C# .NET
Subscribe to events before calling ConnectAsync(). The SDK emits Connected and potentially early message events as soon as the WebSocket opens — subscribing after ConnectAsync() returns means those events are already gone.

Connecting without configuration

If you want to manage the handshake manually and only use the SDK for types and reconnection, omit configuration 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:
The SDK does not chunk audio for you. Send chunks at your own cadence — 100–250 ms per chunk is typical.

Full example

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.

Resources


For support or questions, contact us