| name | deepgram-go-speech-to-text |
| description | Use when writing or reviewing Go code in this repo that transcribes prerecorded audio with Listen v1 REST or streams live audio with Listen v1 WebSockets. Route text generation to deepgram-go-text-to-speech, text analysis to deepgram-go-text-intelligence, audio analytics overlays to deepgram-go-audio-intelligence, and Flux or other v2 conversational work to deepgram-go-conversational-stt. |
Using Deepgram Speech-to-Text from the Go SDK
When to use this product
Use this skill for pkg/client/listen work:
- prerecorded transcription with
FromURL, FromFile, or FromStream
- live transcription with
pkg/client/listen/v1/websocket
- channel-based or callback-based streaming flows
Use a different skill when:
- you need TTS output (
deepgram-go-text-to-speech)
- you need text analysis on plain text (
deepgram-go-text-intelligence)
- you need analytics overlays like summaries, topics, or sentiments (
deepgram-go-audio-intelligence)
- you need Flux / conversational STT v2 (
deepgram-go-conversational-stt)
Authentication
Set DEEPGRAM_API_KEY before constructing clients.
export DEEPGRAM_API_KEY="your_api_key"
This SDK reads env-backed defaults via the client option layer. Prefer API key or token auth supported by the repo's client options; do not hardcode credentials.
Quick start
Prerecorded REST:
package main
import (
api
listen
interfaces
)
{
err := run(); err != {
log.Fatal(err)
}
}
{
ctx := context.Background()
client := listen.NewRESTWithDefaults()
dg := api.New(client)
resp, err := dg.FromURL(
ctx,
,
&interfaces.PreRecordedTranscriptionOptions{
Model: ,
SmartFormat: ,
Punctuate: ,
},
)
err != {
err
}
fmt.Println(resp.Results.Channels[].Alternatives[].Transcript)
}