Using Deepgram Conversational STT / Flux (.NET SDK)
This repo does not currently expose a dedicated Flux / conversational STT API surface comparable to the Python SDK's listen.v2.connect(...) + TurnInfo flow.
Use a different skill when:
- You only need standard streaming transcription without turn awareness →
deepgram-dotnet-speech-to-text.
- You need a full voice assistant (STT + LLM + TTS) →
deepgram-dotnet-voice-agent.
Current repo status
What exists:
ClientFactory.CreateListenWebSocketClient() returns the latest WebSocket listen client.
- Request model:
Deepgram.Models.Listen.v2.WebSocket.LiveSchema.
- Event models:
OpenResponse, MetadataResponse, ResultResponse, SpeechStartedResponse, UtteranceEndResponse, CloseResponse, ErrorResponse, UnhandledResponse.
- Control helpers:
SendKeepAlive(), SendFinalize(), SendClose(), Send(...).
What is not present in the current repo search:
- No
flux model constants or examples.
- No
TurnInfo / turn-aware event models.
- No
language_hint, eager_eot_threshold, eot_threshold, or similar Flux request properties.
- No README/examples that mention conversational STT explicitly.
Closest supported code path today
using Deepgram;
using Deepgram.Models.Listen.v2.WebSocket;
Library.Initialize(); // reads DEEPGRAM_API_KEY env var
var liveClient = ClientFactory.CreateListenWebSocketClient();
await liveClient.Subscribe(new EventHandler<ResultResponse>((sender, e) =>
{
var transcript = e.Channel.Alternatives[0].Transcript;
if (!string.IsNullOrWhiteSpace(transcript))
{
Console.WriteLine(transcript);
}
}));
await liveClient.Subscribe(new EventHandler<UtteranceEndResponse>((sender, e) =>
{
Console.WriteLine(e.Type);
}));
await liveClient.Connect(new LiveSchema()
{
Model = "nova-3",
Encoding = "linear16",
SampleRate = 16000,
InterimResults = true,
UtteranceEnd = "1000",
VadEvents = true,
});
Treat this as standard live STT, not true Flux parity.
Key params currently available
On LiveSchema: Model, Encoding, SampleRate, InterimResults, UtteranceEnd, VadEvents, Endpointing, NoDelay, Punctuate, SmartFormat, Keywords, Keyterm, Diarize, Redact.
Workflow: adding Flux support to the SDK
If the task requires real Flux parity, follow these steps in order:
- Add request params — extend
Deepgram/Models/Listen/v2/WebSocket/LiveSchema.cs with LanguageHint, EagerEotThreshold, EotThreshold, and other Flux-specific fields. Validate against the AsyncAPI spec.
- Add response models — create
TurnInfo and any turn-aware event types under Deepgram/Models/Listen/v2/WebSocket/. Verify field names match the AsyncAPI spec.
- Wire events in the client — update
Deepgram/Clients/Listen/v2/WebSocket/Client.cs to deserialize and dispatch new event types.
- Write tests — add unit tests covering serialization of new request params and deserialization of new response types.
- Add an example — create
examples/speech-to-text/websocket/flux/Program.cs demonstrating a Flux session with turn-taking.
Gotchas
- Flux is not first-class here yet. Do not invent
TurnInfo-style .NET models or ConnectFluxAsync(...) helpers that are not backed by real implementation.
Listen.v2.WebSocket naming is misleading for Python-parity expectations. It is the newest streaming client, but not a full conversational surface.
DeepgramWsClientOptions defaults APIVersion to v1. Inspect connection URIs before assuming /v2/listen behavior.
Example files in this repo
examples/speech-to-text/websocket/file/Program.cs
examples/speech-to-text/websocket/http/Program.cs
examples/speech-to-text/websocket/microphone/Program.cs
References
1---2name: deepgram-dotnet-conversational-stt3description: Use when evaluating, extending, or writing C# code for conversational speech-to-text, Flux-style real-time transcription, or turn-taking streaming in the Deepgram .NET SDK. Identifies missing Flux request parameters (language_hint, eot_threshold), maps existing WebSocket response types, provides the closest supported LiveSchema code path, and guides adding TurnInfo models and Flux examples. Use `deepgram-dotnet-speech-to-text` for standard streaming transcription without turn awareness.4---56# Using Deepgram Conversational STT / Flux (.NET SDK)78This repo does **not** currently expose a dedicated Flux / conversational STT API surface comparable to the Python SDK's `listen.v2.connect(...)` + `TurnInfo` flow.910**Use a different skill when:**11- You only need standard streaming transcription without turn awareness → `deepgram-dotnet-speech-to-text`.12- You need a full voice assistant (STT + LLM + TTS) → `deepgram-dotnet-voice-agent`.1314## Current repo status1516What exists:17- `ClientFactory.CreateListenWebSocketClient()` returns the latest WebSocket listen client.18- Request model: `Deepgram.Models.Listen.v2.WebSocket.LiveSchema`.19- Event models: `OpenResponse`, `MetadataResponse`, `ResultResponse`, `SpeechStartedResponse`, `UtteranceEndResponse`, `CloseResponse`, `ErrorResponse`, `UnhandledResponse`.20- Control helpers: `SendKeepAlive()`, `SendFinalize()`, `SendClose()`, `Send(...)`.2122What is **not** present in the current repo search:23- No `flux` model constants or examples.24- No `TurnInfo` / turn-aware event models.25- No `language_hint`, `eager_eot_threshold`, `eot_threshold`, or similar Flux request properties.26- No README/examples that mention conversational STT explicitly.2728## Closest supported code path today2930```csharp31using Deepgram;32using Deepgram.Models.Listen.v2.WebSocket;3334Library.Initialize(); // reads DEEPGRAM_API_KEY env var35var liveClient = ClientFactory.CreateListenWebSocketClient();3637await liveClient.Subscribe(new EventHandler<ResultResponse>((sender, e) =>38{39 var transcript = e.Channel.Alternatives[0].Transcript;40 if (!string.IsNullOrWhiteSpace(transcript))41 {42 Console.WriteLine(transcript);43 }44}));4546await liveClient.Subscribe(new EventHandler<UtteranceEndResponse>((sender, e) =>47{48 Console.WriteLine(e.Type);49}));5051await liveClient.Connect(new LiveSchema()52{53 Model = "nova-3",54 Encoding = "linear16",55 SampleRate = 16000,56 InterimResults = true,57 UtteranceEnd = "1000",58 VadEvents = true,59});60```6162Treat this as **standard live STT**, not true Flux parity.6364## Key params currently available6566On `LiveSchema`: `Model`, `Encoding`, `SampleRate`, `InterimResults`, `UtteranceEnd`, `VadEvents`, `Endpointing`, `NoDelay`, `Punctuate`, `SmartFormat`, `Keywords`, `Keyterm`, `Diarize`, `Redact`.6768## Workflow: adding Flux support to the SDK6970If the task requires real Flux parity, follow these steps in order:71721. **Add request params** — extend `Deepgram/Models/Listen/v2/WebSocket/LiveSchema.cs` with `LanguageHint`, `EagerEotThreshold`, `EotThreshold`, and other Flux-specific fields. Validate against the AsyncAPI spec.732. **Add response models** — create `TurnInfo` and any turn-aware event types under `Deepgram/Models/Listen/v2/WebSocket/`. Verify field names match the AsyncAPI spec.743. **Wire events in the client** — update `Deepgram/Clients/Listen/v2/WebSocket/Client.cs` to deserialize and dispatch new event types.754. **Write tests** — add unit tests covering serialization of new request params and deserialization of new response types.765. **Add an example** — create `examples/speech-to-text/websocket/flux/Program.cs` demonstrating a Flux session with turn-taking.7778## Gotchas79801. **Flux is not first-class here yet.** Do not invent `TurnInfo`-style .NET models or `ConnectFluxAsync(...)` helpers that are not backed by real implementation.812. **`Listen.v2.WebSocket` naming is misleading for Python-parity expectations.** It is the newest streaming client, but not a full conversational surface.823. **`DeepgramWsClientOptions` defaults `APIVersion` to `v1`.** Inspect connection URIs before assuming `/v2/listen` behavior.8384## Example files in this repo8586- `examples/speech-to-text/websocket/file/Program.cs`87- `examples/speech-to-text/websocket/http/Program.cs`88- `examples/speech-to-text/websocket/microphone/Program.cs`8990## References9192- In-repo: `Deepgram/Clients/Listen/v2/WebSocket/Client.cs`, `Deepgram/Models/Listen/v2/WebSocket/*.cs`93- AsyncAPI (target spec): https://developers.deepgram.com/asyncapi.yaml94- Product docs: https://developers.deepgram.com/reference/speech-to-text/listen-flux