Guides Go SDK usage for Deepgram text-to-speech: REST file/stream synthesis and low-latency WebSocket synthesis via pkg/client/speak.
Ships in deepgram-go-sdk. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
Use this skill for pkg/client/speak work:
Use a different skill when:
deepgram-go-speech-to-text)deepgram-go-voice-agent)deepgram-go-maintaining-sdk)Set DEEPGRAM_API_KEY before creating Speak clients.
export DEEPGRAM_API_KEY="your_api_key"
Use the repo's env-backed client defaults instead of embedding secrets in code.
REST synthesis to file:
package main
import (
"context"
"log"
api "github.com/deepgram/deepgram-go-sdk/v3/pkg/api/speak/v1/rest"
speak "github.com/deepgram/deepgram-go-sdk/v3/pkg/client/speak"
interfaces "github.com/deepgram/deepgram-go-sdk/v3/pkg/client/interfaces"
)
func main() {
if err := run(); err != nil {
log.Fatal(err)
}
}
func run() error {
ctx := context.Background()
client := speak.NewRESTWithDefaults()
dg := api.New(client)
if _, err := dg.ToSave(
ctx,
"hello.wav",
"Hello from the Deepgram Go SDK.",
&interfaces.SpeakOptions{Model: "aura-2-thalia-en"},
); err != nil {
return err
}
return nil
}
Streaming synthesis with callbacks or channels:
package main
import (
"context"
"fmt"
"log"
speakws "github.com/deepgram/deepgram-go-sdk/v3/pkg/api/speak/v1/websocket"
speak "github.com/deepgram/deepgram-go-sdk/v3/pkg/client/speak"
interfaces "github.com/deepgram/deepgram-go-sdk/v3/pkg/client/interfaces"
)
func main() {
if err := run(); err != nil {
log.Fatal(err)
}
}
func run() error {
ctx := context.Background()
handler := speakws.NewDefaultChanHandler()
conn, err := speak.NewWSUsingChanWithDefaults(
ctx,
&interfaces.WSSpeakOptions{Model: "aura-2-thalia-en"},
handler,
)
if err != nil {
return err
}
defer conn.Stop()
if ok := conn.Connect(); !ok {
return fmt.Errorf("connect failed")
}
conn.Start()
if err := conn.SpeakWithText("Streaming TTS from Go."); err != nil {
return err
}
// The handler receives binary audio and flow-control events.
if err := conn.Flush(); err != nil {
return err
}
return nil
}
interfaces.SpeakOptions
Model, Encoding, Container, SampleRateinterfaces.WSSpeakOptions
Model, streaming audio format settingspkg/api/speak/v1/rest: api.New(client).ToStream, ToFile, ToSaveSpeakWithText, Speak, Flush, ClearReset is deprecated; use Clear insteadspeak.NewRESTWithDefaults() / speak.NewREST(...)speak.NewWSUsingCallback...speak.NewWSUsingChan...README.mddocs.gopkg/client/speak/client.gopkg/client/speak/v1/rest/client.gopkg/client/speak/v1/websocket/client_callback.gopkg/client/speak/v1/websocket/client_channel.gopkg/client/interfaces/v1/types-speak.gohttps://developers.deepgram.com/openapi.yamlhttps://developers.deepgram.com/asyncapi.yaml/llmstxt/developers_deepgram_llms_txthttps://developers.deepgram.com/reference/text-to-speech/speak-requesthttps://developers.deepgram.com/reference/text-to-speech/speak-streaminghttps://developers.deepgram.com/docs/tts-modelspkg/api/speak/v1/rest; build them with api.New(client).Connect() returns bool, and shutdown is Stop().examples/text-to-speech/rest/file/hello-world/main.goexamples/text-to-speech/websocket/simple_channel/main.goexamples/text-to-speech/websocket/simple_callback/main.goFor 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).
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
/deepgram-deepgram-go-sdk:deepgram-go-text-to-speechfrom deepgram-go-sdk
Claude Code refuses to install this plugin
This plugin's marketplace entry is invalid: skills.0: Invalid string: must start with "./", skills.1: Invalid string: must start with "./", skills.2: Invalid string: must start with "./" (+4 more)
This plugin's marketplace entry is invalid: skills.0: Invalid string: must start with "./", skills.1: Invalid string: must start with "./", skills.2: Invalid string: must start with "./" (+4 more)
Checked against Claude Code 2.1.332's install rules. The listing below is what the repository ships; Claude Code cannot install it as published.
7 skills in this plugin
/deepgram-go-audio-intelligenceUse when writing or reviewing Go code in this repo that applies summaries, topics, intents, sentiment, language detection, diarization, redaction, or entity extraction to audio inputs through Listen v1 REST. Route plain transcription to deepgram-go-speech-to-text and plain-text Read requests to deepgram-go-text-intelligence./deepgram-go-conversational-sttUse when planning or reviewing Go SDK work for Deepgram conversational STT / Flux v2. This repo ships first-class callback and channel Listen v2 WebSocket clients with typed options and mid-session configuration. Route v1 transcription to deepgram-go-speech-to-text./deepgram-go-Other plugins' skills for the same job