Skip to content

docs: add auto-generated code documentation#327

Open
enesgules wants to merge 1 commit into
deepgram:mainfrom
enesgules:codedocs/auto-generated
Open

docs: add auto-generated code documentation#327
enesgules wants to merge 1 commit into
deepgram:mainfrom
enesgules:codedocs/auto-generated

Conversation

@enesgules

Copy link
Copy Markdown

Auto-generated Code Documentation

AI-analyzed source code to produce structured documentation including:

  • Architecture overview with diagrams
  • Core concepts and internals
  • API reference with parameter tables
  • Practical usage guides

Browse the documentation →


Generated by Context7 · View docs

Copilot AI review requested due to automatic review settings April 27, 2026 14:39
@enesgules enesgules requested a review from lukeocodes as a code owner April 27, 2026 14:39

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR adds an auto-generated “codedocs” documentation set for the Deepgram Go SDK, covering architecture, core concepts, guides, and API reference pages.

Changes:

  • Introduces new “Getting Started”, architecture, and core concept pages for the SDK’s layered design and option/auth model.
  • Adds practical guides for transcription, microphone streaming, TTS generation, project/key management, and Voice Agent sessions.
  • Adds API reference pages for major product surfaces (Listen/Speak/Analyze/Manage/Auth/Agent) and shared client interfaces.

Reviewed changes

Copilot reviewed 18 out of 18 changed files in this pull request and generated 11 comments.

Show a summary per file
File Description
docs/codedocs/index.md New landing page + install/quickstart flow and navigation cards.
docs/codedocs/architecture.md High-level layering/flow explanation with diagrams.
docs/codedocs/authentication-and-client-options.md Credential resolution + shared transport option behavior overview.
docs/codedocs/realtime-streaming.md WebSocket lifecycle + callback/channel routing explanation.
docs/codedocs/typed-api-layer.md Explains transport vs typed wrapper split and how to choose imports.
docs/codedocs/voice-agent-settings.md Explains Voice Agent settings boot payload and provider cleanup behavior.
docs/codedocs/guides/transcribe-audio.md Prerecorded transcription “how to” guide.
docs/codedocs/guides/stream-microphone-audio.md Microphone capture + realtime listen WebSocket guide.
docs/codedocs/guides/generate-speech.md REST + WebSocket TTS guide with runnable examples.
docs/codedocs/guides/manage-projects-and-keys.md Manage API usage guide for projects/keys.
docs/codedocs/guides/build-a-voice-agent.md Voice Agent end-to-end session guide with channel handler example.
docs/codedocs/api-reference/client-interfaces.md Reference for shared options/types/helpers across SDK.
docs/codedocs/api-reference/listen.md Listen REST + WebSocket constructors/methods/event interface reference.
docs/codedocs/api-reference/speak.md Speak REST + WebSocket constructors/methods/event interface reference.
docs/codedocs/api-reference/analyze.md Analyze constructors + typed wrapper + transport method reference.
docs/codedocs/api-reference/manage.md Manage constructors + major method surface reference.
docs/codedocs/api-reference/auth.md Auth constructors + token grant workflow reference.
docs/codedocs/api-reference/agent.md Agent constructors/settings types/event interface reference.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +153 to +154
fmt.Printf("%s: %s
", msg.Role, msg.Content)
})

dg := api.New(c)
_, _ = dg.FromURL(ctx, "https://dpgr.am/spacewalk.wav", nil)
| `file` | `string` | — | Path to an audio file on disk. |
| `src` | `io.Reader` | — | Stream of audio bytes. |
| `url` | `string` | — | Remote audio URL. |
| `options` | `*interfaces.PreRecordedTranscriptionOptions` | `nil` or explicit struct | Query-string transcription options. |
| `file` | `string` | — | Text file path. |
| `src` | `io.Reader` | — | Reader for text input. |
| `url` | `string` | — | URL pointing to text content. |
| `options` | `*interfaces.AnalyzeOptions` | `nil` or explicit struct | Analysis toggles such as `Sentiment`, `Topics`, `Intents`, and `Summarize`. |
| `SelfHosted` | `bool` | `false` | Allows missing auth when talking to self-hosted deployments. |
| `Proxy` | `func(*http.Request) (*url.URL, error)` | `nil` | Custom HTTP or WS proxy function. |
| `WSHeaderProcessor` | `func(http.Header)` | `nil` | Final mutation hook for WebSocket headers. |
| `SkipServerAuth` | `bool` | `false` | Disables server-side TLS verification for WebSockets. |
```go
func NewWithDefaults() *Client
func New(apiKey string, options *interfaces.ClientOptions) *Client
func New(client interface{}) *api.Client
}
```

Related pages: [Client Interfaces](/workspace/home/codedocs-template/content/docs/api-reference/client-interfaces.mdx), [Realtime Streaming](/workspace/home/codedocs-template/content/docs/realtime-streaming.mdx)
}
```

Related page: [Voice Agent Settings](/workspace/home/codedocs-template/content/docs/voice-agent-settings.mdx)
Comment on lines +112 to +120
func (Callback) Binary(by []byte) error {
f, err := os.OpenFile("streamed.raw", os.O_CREATE|os.O_APPEND|os.O_WRONLY, 0o666)
if err != nil {
return err
}
defer f.Close()
_, err = f.Write(by)
return err
}
Comment on lines +19 to +22
func NewWSUsingChanForDemo(ctx context.Context, options *interfaces.SettingsOptions) (*listenv1ws.WSChannel, error)
func NewWSUsingChanWithDefaults(ctx context.Context, options *interfaces.SettingsOptions, chans msginterfaces.AgentMessageChan) (*listenv1ws.WSChannel, error)
func NewWSUsingChan(ctx context.Context, apiKey string, cOptions *interfaces.ClientOptions, tOptions *interfaces.SettingsOptions, chans msginterfaces.AgentMessageChan) (*listenv1ws.WSChannel, error)
func NewWSUsingChanWithCancel(ctx context.Context, ctxCancel context.CancelFunc, apiKey string, cOptions *interfaces.ClientOptions, tOptions *interfaces.SettingsOptions, chans msginterfaces.AgentMessageChan) (*listenv1ws.WSChannel, error)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants