Agent skill

Deepgram Audio Intelligence for Python

by deepgram in deepgram/deepgram-python-sdk

Shows how to add Deepgram analytics such as diarization, summaries, sentiment, topics, redaction and language detection to speech transcription in Python.

MITAuto-check passedAI & LLM Engineering

Install Deepgram Audio Intelligence for Python

skills CLI
$ npx skills add deepgram/deepgram-python-sdk --skill deepgram-python-audio-intelligence -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install deepgram/deepgram-python-sdk deepgram-python-audio-intelligence --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/deepgram/deepgram-python-sdk.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.agents/skills/deepgram-python-audio-intelligence .claude/skills/deepgram-python-audio-intelligence && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
deepgram-python-audio-intelligence
GitHub stars
469
Token cost
~2.3k tokens
SKILL.md length
612 words
Files
1
Skills in repo
7
Repo updated
First seen
Licence
MIT

At a glance

Shows how to add Deepgram analytics such as diarization, summaries, sentiment, topics, redaction and language detection to speech transcription in Python.

  • Works in 5 steps: In-repo reference: reference.md —… → OpenAPI (REST):… → AsyncAPI (WSS):… → …
  • Adding speaker diarization to a Deepgram transcription call
  • SKILL.md covers When to use this product, Feature availability: REST vs…, Authentication and Quick start — REST with full…, plus 9 more sections
  • Calls npx; reaches dpgr.am

What it does

These are analytics overlays on the same `/v1/listen` transcription endpoint used for plain speech-to-text, switched on with request parameters: summarize, topics, intents, sentiment, language detection, diarization, redaction and entity detection. The skill covers the REST client methods `client.listen.v1.media.transcribe_url` and `transcribe_file`, plus the smaller set supported over WebSocket through `client.listen.v1.connect`.

Availability differs by transport. Diarize, redact, punctuate, smart_format and entity detection work over both REST and WSS, while summarize, topics, intents, sentiment, detect_language and the custom topic and intent options are REST only. Quick starts show a URL request, a file request and a diarization request with word-level timings, and a table lists per-word fields such as the word, punctuated word, start and end times and confidence. Authentication uses an API key loaded from the environment with python-dotenv. Other Deepgram skills are named for plain transcription, analytics on text, turn-taking and voice agents.

When your agent uses it

  • Adding speaker diarization to a Deepgram transcription call
  • Summarizing audio or detecting sentiment, topics and intents
  • Redacting sensitive information from a transcript
  • Detecting the spoken language of an audio file

Example prompts

  • “Transcribe call.wav with Deepgram and label which speaker says each word.”
  • “Add summarize and sentiment to our transcribe_url call and print the summary.”
  • “Redact personal data from the transcript when we send a file to Deepgram.”
  • “Check which of these analytics options work over the live WebSocket connection.”

Requirements

  • Python with the Deepgram SDK
  • A Deepgram API key

Workflow steps

5 steps, taken from the first numbered list in SKILL.md.

  1. In-repo reference: reference.md — "Listen V1 Media" (REST params include all analytics flags), "Listen V1 Connect" (WSS-supported subset).
  2. OpenAPI (REST): https://developers.deepgram.com/openapi.yaml
  3. AsyncAPI (WSS): https://developers.deepgram.com/asyncapi.yaml
  4. Context7: library ID /llmstxt/developers_deepgram_llms_txt.
  5. Product docs

What it can do on your machine

Read from SKILL.md and the folder at commit 5c2f3af. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Shell commands in SKILL.md call:

    • npx

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    Hosts in commands or code, which the agent is likely to contact:

    • dpgr.am

    Also links to:

    • developers.deepgram.com

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Deepgram Audio Intelligence for Python loads about 2.3k tokens when it runs. Until then it costs about 183 tokens; SKILL.md has 612 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~183
When it runs · the whole SKILL.md, loaded when a task matches
~2.3k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from deepgram/deepgram-python-sdk at commit 5c2f3af, republished under its MIT licence (© deepgram). 612 words, ~2,323 tokens.

Download SKILL.mdSave it as .claude/skills/deepgram-python-audio-intelligence/SKILL.md (or your agent's skills folder).
name
deepgram-python-audio-intelligence
description
Use when writing or reviewing Python code in this repo that calls Deepgram audio analytics overlays on `/v1/listen` - summarize, topics, intents, sentiment, diarize, redact, detect_language, entity detection. Same endpoint as plain STT but with analytics params. Covers both REST (`client.listen.v1.media.transcribe_url`/`transcribe_file`) and the WSS-supported subset (`client.listen.v1.connect`). Use `deepgram-python-speech-to-text` for plain transcription, `deepgram-python-text-intelligence` for analytics on already-transcribed text. Triggers include "diarize", "summarize audio", "sentiment from audio", "redact PII", "topic detection audio", "audio intelligence", "detect language audio".

Using Deepgram Audio Intelligence (Python SDK)

Analytics overlays applied to /v1/listen transcription: summarize, topics, intents, sentiment, language detection, diarization, redaction, entities. Same endpoint / same client methods as STT — enable features via params.

When to use this product

  • You have audio (file, URL, or live stream) and want analytics alongside the transcript.
  • REST is the primary path — most analytics are REST-only.

Use a different skill when:

  • You want a pure transcript with no analytics → deepgram-python-speech-to-text.
  • Your input is already transcribed text → deepgram-python-text-intelligence (/v1/read).
  • You need conversational turn-taking → deepgram-python-conversational-stt.
  • You need a full interactive agent → deepgram-python-voice-agent.

Feature availability: REST vs WSS

FeatureRESTWSS
diarizeyesyes
redactyesyes
punctuate, smart_formatyesyes
Entity detectionyesyes
summarizeyesno
topicsyesno
intentsyesno
sentimentyesno
detect_languageyesno
custom_topic / custom_intentyesno

For the WSS-only subset, same code path as deepgram-python-speech-to-text.

Authentication

python
from dotenv import load_dotenv
load_dotenv()

from deepgram import DeepgramClient
client = DeepgramClient()

Header: Authorization: Token <api_key>.

Quick start — REST with full analytics

python
response = client.listen.v1.media.transcribe_url(
    url="https://dpgr.am/spacewalk.wav",
    model="nova-3",
    smart_format=True,
    punctuate=True,
    diarize=True,              # speaker separation
    summarize="v2",            # "v2" for the current model; True also accepted on /v1/listen
    topics=True,
    intents=True,
    sentiment=True,
    detect_language=True,
    redact=["pci", "pii"],     # or Sequence[str]
    language="en-US",
)

r = response.results
print("transcript:", r.channels[0].alternatives[0].transcript)
print("summary:",    r.summary)
print("topics:",     r.topics)
print("intents:",    r.intents)
print("sentiments:", r.sentiments)
print("detected_language:", r.channels[0].detected_language)

# Speaker diarization
for word in r.channels[0].alternatives[0].words or []:
    speaker = getattr(word, "speaker", None)
    if speaker is not None:
        print(f"Speaker {speaker}: {word.word}")

Quick start — REST file

python
with open("call.wav", "rb") as f:
    audio = f.read()

response = client.listen.v1.media.transcribe_file(
    request=audio,
    model="nova-3",
    diarize=True,
    redact=["pii"],
    summarize="v2",
    topics=True,
)

Quick start — diarization with word-level timings

Enable speaker separation and word-level timestamps in a single request, then iterate the per-word objects to build a speaker-labelled transcript with timing.

python
response = client.listen.v1.media.transcribe_url(
    url="https://dpgr.am/spacewalk.wav",
    model="nova-3",
    diarize=True,        # tag each word with a speaker id
    smart_format=True,   # punctuated_word for cleaner output
    punctuate=True,
)

words = response.results.channels[0].alternatives[0].words or []

# Per-word: speaker, timestamps, confidence
for w in words:
    speaker = getattr(w, "speaker", None)
    text = w.punctuated_word or w.word
    print(f"[speaker {speaker}] {text}  ({w.start:.2f}s–{w.end:.2f}s, conf={w.confidence:.2f})")

# Group consecutive words by speaker into utterances
from itertools import groupby
for speaker, group in groupby(words, key=lambda w: getattr(w, "speaker", None)):
    text = " ".join((w.punctuated_word or w.word) for w in group)
    print(f"Speaker {speaker}: {text}")

Per-word fields available on each entry:

FieldTypeDescription
wordstrLowercase token
punctuated_wordstr | NoneToken with smart-formatted casing/punctuation (when smart_format=True)
start, endfloatAudio timestamps in seconds
confidencefloat0.0–1.0 confidence
speakerint | NoneSpeaker id (when diarize=True); None if diarization disabled
speaker_confidencefloat | NoneSpeaker-id confidence

For a higher-level breakdown, set utterances=True to get pre-grouped speaker turns at response.results.utterances. Set paragraphs=True for a paragraphs view organised by speaker turn boundaries.

Quick start — WSS subset (diarize / redact / entities only)

python
import threading
from deepgram.core.events import EventType

with client.listen.v1.connect(model="nova-3", diarize=True, redact=["pii"]) as conn:
    conn.on(EventType.MESSAGE, lambda m: print(m))
    threading.Thread(target=conn.start_listening, daemon=True).start()
    for chunk in audio_chunks:
        conn.send_media(chunk)
    conn.send_finalize()

Key parameters

summarize, topics, intents, sentiment, detect_language, diarize, redact, custom_topic, custom_topic_mode, custom_intent, custom_intent_mode, detect_entities, plus all the standard STT params (model, language, encoding, sample_rate, ...).

redact is typed as Optional[str] in the current generated SDK (src/deepgram/listen/v1/media/client.py). Pass a single redaction mode such as "pci", "pii", "numbers", or "phi". Multi-mode redaction at the transport level is supported by sending redact as a repeated query parameter — check src/deepgram/types/listen_v1redact.py for the current type and fall back to raw query-param construction (or multiple calls) if you need several modes. The earlier Union[str, Sequence[str]] override is no longer carried in .fernignore.

Show full SKILL.md (249 more words)Show less

API reference (layered)

  1. In-repo reference: reference.md — "Listen V1 Media" (REST params include all analytics flags), "Listen V1 Connect" (WSS-supported subset).
  2. OpenAPI (REST): https://developers.deepgram.com/openapi.yaml
  3. AsyncAPI (WSS): https://developers.deepgram.com/asyncapi.yaml
  4. Context7: library ID /llmstxt/developers_deepgram_llms_txt.
  5. Product docs:

Gotchas

  1. summarize on /v1/listen accepts a boolean OR the string "v2". Use "v2" to pin the current summarization model; True also works (maps to the default model). /v1/read is the reverse — it accepts boolean only. If you need summarization on already-transcribed text, see deepgram-python-text-intelligence.
  2. Sentiment / topics / intents / summarize / detect_language are REST-only. Don't pass them on WSS — they'll be ignored or rejected.
  3. English-only for sentiment / topics / intents / summarize.
  4. Not all models support all overlays. Flux / Base models have restrictions. Stick to nova-3 unless you have a reason.
  5. Redaction values are pci, pii, phi, numbers, etc. — not arbitrary strings.
  6. custom_topic / custom_intent need a mode ("extended" or "strict").
  7. Diarization is noisy on short / low-quality audio. Expect speaker churn on <30s clips.

Example files in this repo

  • examples/15-transcription-advanced-options.py — smart_format, punctuate, diarize
  • tests/wire/test_listen_v1_media.py — wire test covering intelligence params
  • deepgram-python-speech-to-text — same endpoint, plain transcription
  • deepgram-python-text-intelligence — same analytics, text input
  • deepgram-python-conversational-stt — Flux for turn-taking
  • deepgram-python-voice-agent — interactive assistants

Central product skills

For 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:

bash
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).

© deepgram, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in .agents/skills/deepgram-python-audio-intelligence of deepgram/deepgram-python-sdk.

Open the folder on GitHubat commit 5c2f3af

Compare with similar skills

Deepgram Audio Intelligence for Python next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Deepgram Audio Intelligence for Python compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Deepgram Audio Intelligence for Python this skilldeepgram/deepgram-python-sdk469—~2.3kAutomated safety check: PassMIT
Deepgram JS Conversational Sttdeepgram/deepgram-js-sdk276—~1.3kAutomated safety check: PassMIT
Deepgram JS Voice Agentdeepgram/deepgram-js-sdk276—~1.6kAutomated safety check: PassMIT
Audio To Textgodot-fun/gai181—~707Automated safety check: PassMIT
Transcribe Anythingswyxio/skills172—~8.5kAutomated safety check: PassMIT
Whisper Speech RecognitionOrchestra-Research/AI-Research-SKILLs13k8 repos~1.9kAutomated safety check: NotesMIT

Similar skills

  • Deepgram JS Conversational Stt

    deepgram/deepgram-js-sdk

    A skill your agent uses when writing or reviewing JavaScript/TypeScript in this repo that calls Deepgram Conversational STT v2 / Flux (/v2/listen) for turn-aware streaming transcription.

    276 GitHub stars~1.3k tokensUpdated 5 days ago
    AI & LLM EngineeringAuto-check passed
  • Deepgram JS Voice Agent

    deepgram/deepgram-js-sdk

    A skill your agent uses when writing or reviewing JavaScript/TypeScript in this repo that builds an interactive voice agent via agent.deepgram.com/v1/agent/converse.

    276 GitHub stars~1.6k tokensUpdated 5 days ago
    AI & LLM EngineeringAuto-check passed
  • Audio To Text

    godot-fun/gai

    Transcribes a single PCM16 WAV file to plain UTF-8 text locally through a standard-library Python wrapper around native SenseVoice Small F16 GGUF FunASR llama.cpp runtimes, preferring cross-vendor…

    181 GitHub stars~707 tokensUpdated today
    AI & LLM EngineeringAuto-check passed
  • Transcribe Anything

    swyxio/skills

    Transcribes audio and video files to text using pluggable ASR backends.

    172 GitHub stars~8.5k tokensUpdated 2 days ago
    AI & LLM EngineeringAuto-check passed
  • Whisper Speech Recognition

    Orchestra-Research/AI-Research-SKILLs

    Transcribes audio with OpenAI's Whisper: 99 languages, translation to English, language detection, six model sizes and word-level timestamps, from Python or the CLI.

    13k GitHub starsUsed in 8 repos~1.9k tokens
    AI & LLM EngineeringAuto-check: notes
  • 9Router Speech-to-Text

    decolua/9router

    Transcribes audio files into text or subtitles through 9Router's Whisper-compatible endpoint, using models from OpenAI, Groq, Gemini, Deepgram and others.

    30k GitHub stars~745 tokensUpdated 6 days ago
    Media & CreativeAuto-check passed

More from deepgram/deepgram-python-sdk

  • Deepgram Flux Conversational STT

    deepgram/deepgram-python-sdk

    Writes and reviews Python code for Deepgram's turn-aware streaming speech-to-text (Flux, /v2/listen), including end-of-turn detection.

    469 GitHub stars~1.8k tokensUpdated yesterday
    Auto-check passed
  • Deepgram Python Management API

    deepgram/deepgram-python-sdk

    Guides Python code that calls the Deepgram Management APIs to administer projects, keys, members, usage, billing and stored Voice Agent configurations.

    469 GitHub stars~2.3k tokensUpdated yesterday
    Auto-check passed
  • Deepgram Python Speech-to-Text

    deepgram/deepgram-python-sdk

    Covers basic transcription with the Deepgram Python SDK's listen.v1 endpoint, for one-shot REST transcription of a file or URL and live WebSocket streaming with interim results.

    469 GitHub stars~2.9k tokensUpdated yesterday
    Auto-check passed
  • Deepgram Text Intelligence

    deepgram/deepgram-python-sdk

    Uses the Deepgram Python SDK's Read API to analyze text for sentiment, summaries, topics and intents with client.read.v1.text.analyze, from raw text or a hosted URL.

    469 GitHub stars~1.4k tokensUpdated yesterday
    Auto-check passed
  • Deepgram Python Text-to-Speech

    deepgram/deepgram-python-sdk

    Guides Python code that calls Deepgram Text-to-Speech v1, covering one-shot REST, streaming WebSocket and the TextBuilder helper.

    469 GitHub stars~1.8k tokensUpdated yesterday
    Auto-check passed
  • Deepgram Python Voice Agent

    deepgram/deepgram-python-sdk

    Builds a full-duplex Python voice agent on Deepgram's agent.converse WebSocket, combining speech-to-text, an LLM and text-to-speech with interruption and function calling.

    469 GitHub stars~3.6k tokensUpdated yesterday
    Auto-check passed

Works with

Questions about Deepgram Audio Intelligence for Python

What does Deepgram Audio Intelligence for Python do?

Shows how to add Deepgram analytics such as diarization, summaries, sentiment, topics, redaction and language detection to speech transcription in Python. These are analytics overlays on the same `/v1/listen` transcription endpoint used for plain speech-to-text, switched on with request parameters: summarize, topics, intents, sentiment, language detection, diarization, redaction and entity detection.connect`.

When should I use Deepgram Audio Intelligence for Python?

Deepgram Audio Intelligence for Python fits situations like: adding speaker diarization to a Deepgram transcription call; summarizing audio or detecting sentiment, topics and intents; redacting sensitive information from a transcript; detecting the spoken language of an audio file.

How do I install Deepgram Audio Intelligence for Python in Claude Code?

Run `npx skills add deepgram/deepgram-python-sdk --skill deepgram-python-audio-intelligence -a claude-code`. Or copy the skill folder (.agents/skills/deepgram-python-audio-intelligence in deepgram/deepgram-python-sdk) into .claude/skills/deepgram-python-audio-intelligence in your project. Claude Code loads it when a task matches its description.

How do I install Deepgram Audio Intelligence for Python in Codex?

Run `npx skills add deepgram/deepgram-python-sdk --skill deepgram-python-audio-intelligence -a codex`. Or copy the skill folder (.agents/skills/deepgram-python-audio-intelligence in deepgram/deepgram-python-sdk) into .agents/skills/deepgram-python-audio-intelligence in your project. Codex loads it when a task matches its description.

Can I use Deepgram Audio Intelligence for Python in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add deepgram/deepgram-python-sdk --skill deepgram-python-audio-intelligence -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/deepgram-python-audio-intelligence, .gemini/skills/deepgram-python-audio-intelligence, .github/skills/deepgram-python-audio-intelligence and .opencode/skills/deepgram-python-audio-intelligence in your project.

What does Deepgram Audio Intelligence for Python need to run?

Going by SKILL.md and its folder, Deepgram Audio Intelligence for Python needs the command-line tools its instructions call (npx). Our summary lists: Python with the Deepgram SDK; A Deepgram API key.

Does Deepgram Audio Intelligence for Python access the network?

SKILL.md names 2 domains. In commands or code: dpgr.am; the agent is likely to contact it when it follows the instructions. As links in the text: developers.deepgram.com. This is read from the text; nothing was executed.

Is Deepgram Audio Intelligence for Python safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Deepgram Audio Intelligence for Python use?

Deepgram Audio Intelligence for Python is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Deepgram Audio Intelligence for Python use?

About 2.3k tokens (SKILL.md is roughly 9.3k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Deepgram Audio Intelligence for Python?

Skills that share tags, products or a category with Deepgram Audio Intelligence for Python: Deepgram JS Conversational Stt (deepgram/deepgram-js-sdk, 276 stars), Deepgram JS Voice Agent (deepgram/deepgram-js-sdk, 276 stars), Audio To Text (godot-fun/gai, 181 stars) and Transcribe Anything (swyxio/skills, 172 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Deepgram Audio Intelligence for Python?

deepgram (a GitHub organization) maintains it in deepgram/deepgram-python-sdk, which has 469 GitHub stars. The repository holds 7 skills in this directory. The repository was last updated on October 6, 2026.

Source: deepgram/deepgram-python-sdk on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.