deepgram-go-conversational-stt
Use when planning or reviewing Go SDK work for Deepgram conversational STT / Flux v2. This repo does not currently ship a first-class v2 listen client, so…
npx skills add https://github.com/deepgram/deepgram-go-sdk --skill deepgram-go-conversational-sttUsing Deepgram Conversational STT from the Go SDK
When to use this product
Use this skill when someone asks for Flux or conversational STT v2 in the Go SDK.
Current repo status: this SDK ships a first-class pkg/client/listen/v2 WebSocket client for Flux STT. Flux STT does not have a REST client.
Use a different skill when:
- v1 Listen is acceptable (
deepgram-go-speech-to-text) - voice-agent runtime is the real target (
deepgram-go-voice-agent)
Authentication
Flux constructors with defaults resolve credentials from DEEPGRAM_API_KEY or DEEPGRAM_ACCESS_TOKEN.
export DEEPGRAM_API_KEY="your_api_key"
Connection setup
Use the versioned v2 package and typed options:
package main
import (
"context"
"log"
api "github.com/deepgram/deepgram-go-sdk/v3/pkg/api/listen/v2/websocket"
interfaces "github.com/deepgram/deepgram-go-sdk/v3/pkg/client/interfaces"
listen "github.com/deepgram/deepgram-go-sdk/v3/pkg/client/listen/v2"
)
func main() {
ctx := context.Background()
handler := api.NewDefaultCallbackHandler()
client, err := listen.NewWSUsingCallbackWithDefaults(ctx, &interfaces.FluxTranscriptionOptions{
Model: "flux-general-en",
}, handler)
if err != nil {
log.Fatal(err)
}
defer client.Stop()
if !client.Connect() {
log.Fatal("connect failed")
}
}
This establishes the session only. Send audio with Write or Stream; use a runnable example for the complete capture and event-handling flow.
Key parameters
interfaces.FluxTranscriptionOptionsModelis required:flux-general-enorflux-general-multiEncoding,SampleRate,Keyterm,Tag, andLanguageHintconfigure connection behaviorEagerEotThreshold,EotThreshold, andEotTimeoutMsconfigure turn detection
interfaces.FluxConfigureOptions- send with
WSCallback.ConfigureorWSChannel.Configureto update thresholds, keyterms, or language hints mid-session
- send with
- constructors
listen.NewWSUsingCallbackWithDefaultsandlisten.NewWSUsingChanWithDefaultsuse environment-backed credentialslisten.NewWSUsingCallbackandlisten.NewWSUsingChanaccept explicit v2 client options and handlers
API reference (layered)
- In-repo reference
README.mddocs.gopkg/client/listen/v2/client.gopkg/client/listen/v2/websocketpkg/api/listen/v2/websocket/interfacespkg/client/interfaces/v2/types-flux.go
- OpenAPI
https://developers.deepgram.com/openapi.yaml
- AsyncAPI
https://developers.deepgram.com/asyncapi.yaml
- Context7
/llmstxt/developers_deepgram_llms_txt
- Product docs
https://developers.deepgram.com/reference/speech-to-text/listen-flux
Gotchas
- Flux STT is WebSocket-only; route v1 prerecorded or Nova streaming requests to
deepgram-go-speech-to-text. - Use
pkg/client/listen/v2, not the v1pkg/client/listenfacade, for Flux STT. - Flux callback and channel clients use their own v2 event interfaces; do not mix them with Listen v1 handlers.
Example files in this repo
examples/speech-to-text/websocket/flux_callback/main.goexamples/speech-to-text/websocket/flux_channel/main.goexamples/speech-to-text/websocket/flux_force_end_turn/main.go
Central product skills
For cross-language Deepgram product knowledge — the consolidated API reference, documentation finder, focused runnable recipes, third-party integration examples, and MCP setup — install the central skills:
npx skills add deepgram/skills
This SDK ships language-idiomatic code skills; deepgram/skills ships cross-language product knowledge (see api, docs, recipes, examples, starters, setup-mcp).