| name | deepgram-core-workflow-a |
| description | Implement production pre-recorded speech-to-text with Deepgram.
Use when building audio transcription, batch processing,
or implementing diarization and intelligence features.
Trigger: "deepgram transcription", "speech to text", "transcribe audio",
"batch transcription", "deepgram nova", "diarize audio".
|
| allowed-tools | Read, Write, Edit, Bash(npm:*), Bash(pip:*), Grep |
| version | 1.13.0 |
| license | MIT |
| author | Jeremy Longshore <jeremy@intentsolutions.io> |
| tags | ["saas","deepgram","voice-ai","transcription","workflow","stt"] |
| compatibility | Designed for Claude Code, also compatible with Codex and OpenClaw |
Deepgram Core Workflow A: Pre-recorded Transcription
Overview
Production pre-recorded transcription service using Deepgram's REST API. Covers transcribeUrl and transcribeFile, speaker diarization, audio intelligence (summarization, topic detection, sentiment, intent), batch processing with concurrency control, and callback-based async transcription for large files.
Prerequisites
@deepgram/sdk installed, DEEPGRAM_API_KEY configured
- Audio files: WAV, MP3, FLAC, OGG, M4A, or WebM
- For batch:
p-limit package (npm install p-limit)
Instructions
Step 1: Transcription Service Class
import { createClient, DeepgramClient } from '@deepgram/sdk';
import { readFileSync } from 'fs';
interface TranscribeOptions {
model?: 'nova-3' | 'nova-2' | 'nova-2-meeting' | 'nova-2-phonecall' | 'base';
language?: string;
diarize?: boolean;
utterances?: boolean;
paragraphs?: boolean;
smart_format?: boolean;
summarize?: boolean;
detect_topics?: boolean;
sentiment?: boolean;
intents?: boolean;
?: [];
?: ;
}
{
: ;
() {
. = (apiKey);
}
() {
{ result, error } = ....(
{ url },
{
: opts. ?? ,
: opts. ?? ,
: opts. ?? ,
: opts. ?? ,
: opts. ?? ,
: opts. ?? ,
: opts. ? : ,
: opts. ?? ,
: opts. ?? ,
: opts. ?? ,
: opts.,
: opts.,
}
);
(error) ();
result;
}
() {
audio = (filePath);
mimetype = .(filePath);
{ result, error } = ....(
audio,
{
: opts. ?? ,
: opts. ?? ,
mimetype,
: opts. ?? ,
: opts. ?? ,
: opts. ? : ,
: opts. ?? ,
: opts. ?? ,
}
);
(error) ();
result;
}
(: ): {
ext = path.().()?.();
: <, > = {
: , : , : ,
: , : , : ,
};
map[ext ?? ] ?? ;
}
}