recipes

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Deepgram 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
    /
    example.go
    / etc. you can copy into your project
  • You want a language-specific answer to "how do I call
    {feature}
    with the Deepgram SDK?"
Use a different skill when:
  • You want a full starter app with a web UI, deploy config, etc. →
    starters
    skill
  • You want integration with a third-party platform (Twilio, LiveKit, Vercel AI SDK, Discord, etc.) →
    examples
    skill
  • You want the full API contract (params, responses, message shapes) →
    api
    skill
  • 你已了解产品及功能,想要最简短的可运行代码
  • 你想要可直接复制到项目中的
    example.py
    /
    example.js
    /
    example.go
    等文件
  • 你想要针对「如何用Deepgram SDK调用
    {feature}
    ?」的语言专属解决方案
请使用其他技能的场景:
  • 你想要带Web界面、部署配置等的完整启动应用 →
    starters
    技能
  • 你想要与第三方平台(Twilio、LiveKit、Vercel AI SDK、Discord等)集成 →
    examples
    技能
  • 你想要完整的API契约(参数、响应、消息结构) →
    api
    技能

Browse recipes

浏览代码示例

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 run
recipes/{language}/{product}/{version}/{recipe}/
  example.{ext}       # 可运行,不足50行,从环境变量读取DEEPGRAM_API_KEY
  example_test.{ext}  # 以子进程运行示例,验证输出
  README.md           # 功能说明、参数、示例输出、运行方法

Products covered

覆盖的产品

ProductRecipe examples
Speech-to-Text — Nova (
/v1/listen
)
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 (
/v2/listen
)
streaming conversational transcription, EOT / eager-EOT, mid-session
Configure
, keyterms
Text-to-Speechgenerate-audio, stream-audio, websocket-streaming, select-model, select-encoding
Audio Intelligencesummarize, sentiment, topics, intents, entities
Voice Agentsconnect, 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
api
skill's "Nova vs Flux" section for the decision guide.
产品代码示例
语音转文本 — Nova(
/v1/listen
URL转录、文件转录、段落划分、说话人分离、智能格式化、话语提取、摘要生成、情感分析、主题识别、意图识别、实体检测、语言检测、内容脱敏、内容搜索、关键词提取、流式处理
语音转文本 — Flux(
/v2/listen
流式对话转录、EOT/提前EOT、会话中
Configure
配置、关键术语识别
文本转语音音频生成、音频流式传输、WebSocket流式传输、模型选择、编码选择
音频智能摘要生成、情感分析、主题识别、意图识别、实体识别
语音Agent连接、自定义LLM、自定义TTS、函数调用
Nova是通用型语音转文本系列;Flux专为对话音频和语音Agent设计。二者均处于活跃维护状态——详见
api
技能的「Nova vs Flux」章节获取选型指南。

Languages

支持的语言

Python, JavaScript, Go, .NET, Java, Rust, plus the Deepgram CLI (
dg
/
deepctl
).
Python、JavaScript、Go、.NET、Java、Rust,以及Deepgram CLI(
dg
/
deepctl
)。

Install 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 TypeScript

Related Deepgram skills

相关Deepgram技能

  • api
    — consolidated REST + WebSocket API reference
  • examples
    — third-party platform integrations (Twilio, LiveKit, LangChain, etc.)
  • starters
    — runnable starter apps (framework × feature matrix)
  • docs
    — documentation finder
  • setup-mcp
    — Deepgram MCP server installation
  • api
    — 整合式REST + WebSocket API参考文档
  • examples
    — 第三方平台集成(Twilio、LiveKit、LangChain等)
  • starters
    — 可运行的启动应用(框架×功能矩阵)
  • docs
    — 文档查找工具
  • setup-mcp
    — Deepgram MCP服务器安装指南