deepgram-webhooks
БесплатноЗапускает вложенные скриптыНе проверенReceive and verify Deepgram webhooks (callbacks). Use when setting up Deepgram webhook handlers, processing transcription callbacks, or handling asynchronous…
от hookdeck★ 104 звезды на GitHubОб этом скилле
Deepgram Webhooks
When to Use This Skill
- Setting up Deepgram callback handlers for transcription results
- Processing asynchronous transcription results from Deepgram
- Implementing webhook authentication for Deepgram callbacks
- Handling transcription completion events
Essential Code
Deepgram webhooks (callbacks) are used to receive transcription, text-to-speech and Text Intelligence results asynchronously. When you provide a callback URL in your transcription request, Deepgram immediately responds with a request_id and sends the transcription results to your callback URL when processing is complete.
Basic Webhook Handler
// Express.js example
const crypto = require('crypto');
function safeEqual(a, b) {
const ab = Buffer.from(a || '', 'utf8');
const bb = Buffer.from(b || '', 'utf8');
return ab.length === bb.length && crypto.timingSafeEqual(ab, bb);
}
app.post('/webhooks/deepgram', express.raw({ type: 'application/json' }), (req, res) => {
// 1. Basic Auth credentials you embedded in the callback URL
// (https://user:[email protected]/webhooks/deepgram)
const auth = req.headers['authorization'] || '';
const decoded = auth.startsWith('Basic ')
? Buffer.from(auth.slice(6), 'base64').toString('utf8')
: '';
const sep = decoded.indexOf(':');
if (
sep === -1 ||
!safeEqual(decoded.slice(0, sep), process.env.DEEPGRAM_CALLBACK_USERNAME) ||
!safeEqual(decoded.slice(sep + 1), process.env.DEEPGRAM_CALLBACK_PASSWORD)
) {
return res.status(401).send('Unauthorized');
}
// The callback body is the normal /v1/listen response: { metadata, results }
const payload = JSON.parse(req.body.toString());
// 2. Optional (speech-to-text): a secret you sent as extra=callback_secret:VALUE
// comes back in metadata.extra.callback_secret
const secret = process.env.DEEPGRAM_CALLBACK_SECRET;
if (secret && !safeEqual(payload.metadata?.extra?.callback_secret, secret)) {
return res.status(401).send('Invalid callback secret');
}
const requestId = payload.metadata?.request_id;
const transcript = payload.results?.channels?.[0]?.alternatives?.[0]?.transcript;
console.log('Received transcription:', requestId, transcript);
// Return success to prevent retries
res.status(200).send('OK');
});
Authentication Methods
Deepgram doesn't sign callbacks. Its callback docs describe:
- Basic Auth (recommended, all APIs): Embed credentials in the callback URL. Deepgram includes them when it sends results, and they arrive as an
Authorization: Basicheader. This is the only documented check for text-to-speech and Text Intelligence callbacks - Secret in Extra Metadata (speech-to-text only): Send a random secret as
extra=callback_secret:VALUE. Deepgram returns it inmetadata.extra.callback_secretin the callback body. Use a hex secret (openssl rand -hex 32): a+arrives as a space
The dg-token header is no longer a supported way to verify callbacks (changelog, 27 October 2026). Don't check it.
// Basic Auth in callback URL (percent-encode special characters in the credentials)
// https://username:[email protected]/webhooks/deepgram
// Optional extra secret (speech-to-text):
// https://api.deepgram.com/v1/listen?callback=https://your-domain.com/webhooks/deepgram&extra=callback_secret:YOUR_SECRET_VALUE
Making a Request with Callback
curl \
--request POST \
--header 'Authorization: Token YOUR_DEEPGRAM_API_KEY' \
--header 'Content-Type: audio/wav' \
--data-binary @audio.wav \
--url 'https://api.deepgram.com/v1/listen?callback=https://username:[email protected]/webhooks/deepgram'
Common Event Types
Deepgram callbacks carry no event-type field. The body is the same JSON a synchronous /v1/listen request returns: a metadata object and a results object. The structure of results varies based on the features enabled in your request:
| Field | Description | Always Present |
|---|---|---|
metadata.request_id |
Unique identifier for the transcription request (matches the request_id returned when you submitted it) |
Yes |
metadata.created |
Timestamp when transcription was created | Yes |
metadata.duration |
Length of the audio in seconds | Yes |
metadata.channels |
Number of audio channels | Yes |
metadata.extra |
Key-value pairs you passed with extra=KEY:VALUE |
Only if extra was sent |
results.channels[].alternatives |
Transcription alternatives | Yes |
results.channels[].alternatives[].transcript |
The transcribed text | Yes |
results.channels[].alternatives[].confidence |
Confidence score (0-1) | Yes |
Environment Variables
# Your Deepgram API Key (for making requests)
DEEPGRAM_API_KEY=your_api_key_here
# Basic Auth credentials you
Установить deepgram-webhooks в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
Вложенные файлы
FAQ
Что делает скилл deepgram-webhooks?
Receive and verify Deepgram webhooks (callbacks). Use when setting up Deepgram webhook handlers, processing transcription callbacks, or handling asynchronous transcription results.
Как установить скилл deepgram-webhooks?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл deepgram-webhooks запускает скрипты?
Да, скилл несёт исполняемые скрипты. Проверь исходник перед установкой.
Похожие скиллы
theme-factory
Toolkit for styling artifacts with a theme. These artifacts can be slides, docs, reportings, HTML landing pages, etc. There are 10 pre-set themes with…
от Anthropicaccess
Manage Discord channel access — approve pairings, edit allowlists, set DM/group policy. Use when the user asks to pair, approve someone, check who's allowed…
от Anthropicconfigure
Set up the Discord channel — save the bot token and review access policy. Use when the user pastes a Discord bot token, asks to configure Discord, asks "how…
от Anthropicaccess
Manage iMessage channel access — approve pairings, edit allowlists, set DM/group policy. Use when the user asks to pair, approve someone, check who's allowed…
от Anthropic