recipes
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseDeepgram Recipes
Deepgram Recipes
Agent-maintained micro-recipes showing how to use every Deepgram SDK feature across every supported language. Each recipe is a focused, runnable snippet — not a full app.
由Agent维护的微型代码示例,展示如何在所有支持的语言中使用Deepgram SDK的各项功能。每个示例都是聚焦且可运行的代码片段——而非完整应用。
When to use recipes
何时使用这些代码示例
- You know the product and feature; you want the shortest working code
- You want /
example.py/example.js/ etc. you can copy into your projectexample.go - You want a language-specific answer to "how do I call with the Deepgram SDK?"
{feature}
Use a different skill when:
- You want a full starter app with a web UI, deploy config, etc. → skill
starters - You want integration with a third-party platform (Twilio, LiveKit, Vercel AI SDK, Discord, etc.) → skill
examples - You want the full API contract (params, responses, message shapes) → skill
api
- 你已了解产品及功能,想要最简短的可运行代码
- 你想要可直接复制到项目中的/
example.py/example.js等文件example.go - 你想要针对「如何用Deepgram SDK调用?」的语言专属解决方案
{feature}
请使用其他技能的场景:
- 你想要带Web界面、部署配置等的完整启动应用 → 技能
starters - 你想要与第三方平台(Twilio、LiveKit、Vercel AI SDK、Discord等)集成 → 技能
examples - 你想要完整的API契约(参数、响应、消息结构) → 技能
api
Browse recipes
浏览代码示例
Repository: https://github.com/deepgram/recipes
Coverage matrix: https://github.com/deepgram/recipes/blob/main/COVERAGE.md
Recipe structure
代码示例结构
recipes/{language}/{product}/{version}/{recipe}/
example.{ext} # runnable, < 50 lines, reads DEEPGRAM_API_KEY from env
example_test.{ext} # runs the example as a subprocess, asserts output
README.md # feature explanation, params, sample output, how to runrecipes/{language}/{product}/{version}/{recipe}/
example.{ext} # 可运行,不足50行,从环境变量读取DEEPGRAM_API_KEY
example_test.{ext} # 以子进程运行示例,验证输出
README.md # 功能说明、参数、示例输出、运行方法Products covered
覆盖的产品
| Product | Recipe examples |
|---|---|
Speech-to-Text — Nova ( | transcribe-url, transcribe-file, paragraphs, diarize, smart-format, utterances, summarize, sentiment, topics, intents, detect-entities, detect-language, redact, search, keywords, streaming |
Speech-to-Text — Flux ( | streaming conversational transcription, EOT / eager-EOT, mid-session |
| Text-to-Speech | generate-audio, stream-audio, websocket-streaming, select-model, select-encoding |
| Audio Intelligence | summarize, sentiment, topics, intents, entities |
| Voice Agents | connect, custom-llm, custom-tts, function-calling |
Nova is the general-purpose STT family; Flux is designed for conversational audio and voice agents. Both are actively maintained — see the skill's "Nova vs Flux" section for the decision guide.
api| 产品 | 代码示例 |
|---|---|
语音转文本 — Nova( | URL转录、文件转录、段落划分、说话人分离、智能格式化、话语提取、摘要生成、情感分析、主题识别、意图识别、实体检测、语言检测、内容脱敏、内容搜索、关键词提取、流式处理 |
语音转文本 — Flux( | 流式对话转录、EOT/提前EOT、会话中 |
| 文本转语音 | 音频生成、音频流式传输、WebSocket流式传输、模型选择、编码选择 |
| 音频智能 | 摘要生成、情感分析、主题识别、意图识别、实体识别 |
| 语音Agent | 连接、自定义LLM、自定义TTS、函数调用 |
Nova是通用型语音转文本系列;Flux专为对话音频和语音Agent设计。二者均处于活跃维护状态——详见技能的「Nova vs Flux」章节获取选型指南。
apiLanguages
支持的语言
Python, JavaScript, Go, .NET, Java, Rust, plus the Deepgram CLI ( / ).
dgdeepctlPython、JavaScript、Go、.NET、Java、Rust,以及Deepgram CLI( / )。
dgdeepctlInstall the related SDK skills
安装相关SDK技能
For language-idiomatic patterns beyond a single recipe (full quick-starts, common patterns, gotchas), install the SDK-specific skills:
bash
npx skills add deepgram/deepgram-python-sdk # Python
npx skills add deepgram/deepgram-js-sdk # JavaScript / TypeScript
npx skills add deepgram/deepgram-java-sdk # Java
npx skills add deepgram/deepgram-go-sdk # Go
npx skills add deepgram/deepgram-rust-sdk # Rust
npx skills add deepgram/deepgram-dotnet-sdk # C# / .NET
npx skills add deepgram/deepgram-swift-sdk # Swift
npx skills add deepgram/deepgram-kotlin-sdk # Kotlin
npx skills add deepgram/deepgram-browser-sdk # Browser TypeScript若需要单个代码示例之外的符合语言特性的模式(完整快速入门、通用模式、常见陷阱),请安装特定SDK的技能:
bash
npx skills add deepgram/deepgram-python-sdk # Python
npx skills add deepgram/deepgram-js-sdk # JavaScript / TypeScript
npx skills add deepgram/deepgram-java-sdk # Java
npx skills add deepgram/deepgram-go-sdk # Go
npx skills add deepgram/deepgram-rust-sdk # Rust
npx skills add deepgram/deepgram-dotnet-sdk # C# / .NET
npx skills add deepgram/deepgram-swift-sdk # Swift
npx skills add deepgram/deepgram-kotlin-sdk # Kotlin
npx skills add deepgram/deepgram-browser-sdk # Browser TypeScriptRelated Deepgram skills
相关Deepgram技能
- — consolidated REST + WebSocket API reference
api - — third-party platform integrations (Twilio, LiveKit, LangChain, etc.)
examples - — runnable starter apps (framework × feature matrix)
starters - — documentation finder
docs - — Deepgram MCP server installation
setup-mcp
- — 整合式REST + WebSocket API参考文档
api - — 第三方平台集成(Twilio、LiveKit、LangChain等)
examples - — 可运行的启动应用(框架×功能矩阵)
starters - — 文档查找工具
docs - — Deepgram MCP服务器安装指南
setup-mcp