deepgram-go-conversational-stt

द्वारा deepgram

जब Deepgram संवादात्मक STT / Flux v2 के लिए Go SDK कार्य की योजना बनाने या समीक्षा करने के दौरान उपयोग करें। यह रिपॉजिटरी वर्तमान में प्रथम श्रेणी का v2 लिसन क्लाइंट प्रदान नहीं करता है, इसलिए…

npx skills add https://github.com/deepgram/deepgram-go-sdk --skill deepgram-go-conversational-stt

Using 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.FluxTranscriptionOptions
    • Model is required: flux-general-en or flux-general-multi
    • Encoding, SampleRate, Keyterm, Tag, and LanguageHint configure connection behavior
    • EagerEotThreshold, EotThreshold, and EotTimeoutMs configure turn detection
  • interfaces.FluxConfigureOptions
    • send with WSCallback.Configure or WSChannel.Configure to update thresholds, keyterms, or language hints mid-session
  • constructors
    • listen.NewWSUsingCallbackWithDefaults and listen.NewWSUsingChanWithDefaults use environment-backed credentials
    • listen.NewWSUsingCallback and listen.NewWSUsingChan accept explicit v2 client options and handlers

API reference (layered)

  1. In-repo reference
    • README.md
    • docs.go
    • pkg/client/listen/v2/client.go
    • pkg/client/listen/v2/websocket
    • pkg/api/listen/v2/websocket/interfaces
    • pkg/client/interfaces/v2/types-flux.go
  2. OpenAPI
    • https://developers.deepgram.com/openapi.yaml
  3. AsyncAPI
    • https://developers.deepgram.com/asyncapi.yaml
  4. Context7
    • /llmstxt/developers_deepgram_llms_txt
  5. Product docs
    • https://developers.deepgram.com/reference/speech-to-text/listen-flux

Gotchas

  1. Flux STT is WebSocket-only; route v1 prerecorded or Nova streaming requests to deepgram-go-speech-to-text.
  2. Use pkg/client/listen/v2, not the v1 pkg/client/listen facade, for Flux STT.
  3. 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.go
  • examples/speech-to-text/websocket/flux_channel/main.go
  • examples/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).

deepgram की और Skills

1password
deepgram
1Password CLI (op) को सेट अप और उपयोग करें। CLI इंस्टॉल करते समय, डेस्कटॉप ऐप एकीकरण सक्षम करते समय, साइन इन करते समय (एकल या बहु-खाता), या...
agent-orchestration
deepgram
जब आपको wsh के माध्यम से अन्य AI एजेंटों (Claude Code, Aider, Codex, आदि) को उनके टर्मिनल इंटरफेस के जरिए लॉन्च और संचालित करने की आवश्यकता हो, तब उपयोग करें। उदाहरण: "एक साथ कई चलाएं…
api
deepgram
डीपग्राम के स्पीच-टू-टेक्स्ट, टेक्स्ट-टू-स्पीच, वॉइस एजेंट और ऑडियो इंटेलिजेंस एपीआई के साथ बनाएं।
apple-notes
deepgram
Manage Apple Notes via the `memo` CLI on macOS (create, view, edit, delete, search, move, and export notes). Use when a user asks OpenClaw to add a note, list…
apple-reminders
deepgram
Manage Apple Reminders via the `remindctl` CLI on macOS (list, add, edit, complete, delete). Supports lists, date filters, and JSON/plain output.
bear-notes
deepgram
grizzly CLI के माध्यम से Bear नोट्स बनाएं, खोजें और प्रबंधित करें।
blogwatcher
deepgram
ब्लॉगवॉचर CLI का उपयोग करके अपडेट के लिए ब्लॉग और RSS/Atom फ़ीड की निगरानी करें।
blucli
deepgram
BluOS CLI (blu) खोज, प्लेबैक, ग्रुपिंग और वॉल्यूम के लिए है।