/assemblyai-pack:assemblyai-core-workflow-bfrom assemblyai-pack
Implements AssemblyAI real-time streaming transcription via WebSocket for live captions and voice agents, plus LeMUR for LLM-powered transcript analysis including summarization, Q&A, and action items.
Ships in assemblyai-pack. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
Two advanced workflows: (1) real-time streaming transcription via WebSocket for live captioning and voice agents, and (2) LeMUR for applying LLMs to transcripts — summarization, Q&A, action items, and custom tasks.
assemblyai package installed (npm install assemblyai)ASSEMBLYAI_API_KEYimport { AssemblyAI } from 'assemblyai';
const client = new AssemblyAI({
apiKey: process.env.ASSEMBLYAI_API_KEY!,
});
const transcriber = client.streaming.createService({
// Model options: 'nova-3' (default), 'nova-3-pro' (highest accuracy)
speech_model: 'nova-3',
sample_rate: 16000,
});
transcriber.on('open', ({ sessionId }) => {
console.log('Session opened:', sessionId);
});
transcriber.on('transcript', (message) => {
// message_type: 'PartialTranscript' or 'FinalTranscript'
if (message.message_type === 'FinalTranscript') {
console.log('[Final]', message.text);
} else {
process.stdout.write(`\r[Partial] ${message.text}`);
}
});
transcriber.on('error', (error) => {
console.error('Streaming error:', error);
});
transcriber.on('close', (code, reason) => {
console.log('Session closed:', code, reason);
});
await transcriber.connect();
// Send audio chunks (16-bit PCM, 16kHz mono)
// transcriber.sendAudio(audioBuffer);
// When done:
// await transcriber.close();
import { AssemblyAI } from 'assemblyai';
import { spawn } from 'child_process';
const client = new AssemblyAI({
apiKey: process.env.ASSEMBLYAI_API_KEY!,
});
const transcriber = client.streaming.createService({
speech_model: 'nova-3',
sample_rate: 16000,
});
transcriber.on('transcript', (msg) => {
if (msg.message_type === 'FinalTranscript' && msg.text) {
console.log(msg.text);
}
});
await transcriber.connect();
// Use SoX to capture microphone audio as raw PCM
const mic = spawn('sox', [
'-d', // default audio device
'-t', 'raw', // raw PCM output
'-b', '16', // 16-bit
'-r', '16000', // 16kHz sample rate
'-c', '1', // mono
'-e', 'signed-integer',
'-', // pipe to stdout
]);
mic.stdout.on('data', (chunk: Buffer) => {
transcriber.sendAudio(chunk);
});
mic.on('close', async () => {
await transcriber.close();
});
// Handle Ctrl+C
process.on('SIGINT', async () => {
mic.kill();
await transcriber.close();
process.exit(0);
});
// Server-side: generate a short-lived token for the browser
const token = await client.streaming.createTemporaryToken({
expires_in_seconds: 300, // 5 minutes
});
// Send `token` to your frontend
// Client-side uses token instead of API key:
// const transcriber = new StreamingTranscriber({ token: receivedToken });
const transcriber = client.streaming.createService({
speech_model: 'nova-3-pro',
sample_rate: 16000,
word_boost: ['AssemblyAI', 'LeMUR', 'transcription'],
enable_extra_session_information: true,
});
transcriber.on('turn', (turn) => {
// Speaker-labeled turns (available with nova-3-pro)
console.log(`Speaker ${turn.speaker}: ${turn.transcript}`);
});
// First transcribe (or use an existing transcript_id)
const transcript = await client.transcripts.transcribe({
audio: 'https://example.com/meeting.mp3',
});
// Summarize with LeMUR
const { response } = await client.lemur.summary({
transcript_ids: [transcript.id],
context: 'This is a weekly engineering standup meeting.',
answer_format: 'bullet points',
});
console.log('Summary:', response);
const { response: answers } = await client.lemur.questionAnswer({
transcript_ids: [transcript.id],
questions: [
{ question: 'What decisions were made?', answer_format: 'list' },
{ question: 'Were there any blockers discussed?', answer_format: 'short sentence' },
{ question: 'Who owns the next action items?', answer_format: 'list' },
],
});
for (const qa of answers) {
console.log(`Q: ${qa.question}`);
console.log(`A: ${qa.answer}\n`);
}
const { response: actionItems } = await client.lemur.actionItems({
transcript_ids: [transcript.id],
context: 'This is a product planning meeting.',
answer_format: 'Each action item should include the owner and deadline.',
});
console.log('Action Items:', actionItems);
const { response } = await client.lemur.task({
transcript_ids: [transcript.id],
prompt: `Analyze this customer support call and provide:
1. Customer sentiment (positive/neutral/negative)
2. Issue category
3. Resolution status
4. CSAT prediction (1-5)
Format as JSON.`,
});
const analysis = JSON.parse(response);
console.log(analysis);
// LeMUR can analyze up to 100 hours of audio in a single request
const transcriptIds = [
'transcript-1', 'transcript-2', 'transcript-3',
];
const { response } = await client.lemur.task({
transcript_ids: transcriptIds,
prompt: 'Compare themes across these three customer interviews. What patterns emerge?',
});
console.log(response);
| Spec | Value |
|---|---|
| Audio format | 16-bit PCM, mono |
| Sample rates | 8000, 16000, 22050, 44100, 48000 Hz |
| Latency (P50) | ~300ms |
| Max concurrent streams (free) | 5 new/min |
| Max concurrent streams (paid) | 100 new/min, auto-scales 10%/60s |
| Languages | 99+ (with Universal-3) |
| Models | nova-3 (default), nova-3-pro (highest accuracy) |
| Error | Cause | Solution |
|---|---|---|
Session limit reached | Too many concurrent streams | Wait or upgrade plan |
Invalid audio encoding | Wrong PCM format | Use 16-bit signed integer, mono |
WebSocket disconnected | Network interruption | Implement reconnection logic |
LeMUR context too long | >100 hours of audio | Split into smaller batches |
transcript not found | Invalid transcript_id | Verify ID exists via client.transcripts.get() |
For error troubleshooting, see assemblyai-common-errors.
What SKILL.md sets; muted values are Claude Code's defaults
18 skills in this plugin
/assemblyai-ci-integrationConfigure AssemblyAI CI/CD integration with GitHub Actions and testing.
Use when setting up automated testing, configuring CI pipelines,
or integrating AssemblyAI transcription tests into your build process.
Trigger with phrases like "assemblyai CI", "assemblyai GitHub Actions",
"assemblyai automated tests", "CI assemblyai".
/assemblyai-common-errorsDiagnose and fix AssemblyAI common errors and exceptions.
Use when encountering AssemblyAI errors, debugging failed transcriptions,
or troubleshooting streaming and LeMUR issues.
Trigger with phrases like "assemblyai error", "fix assemblyai",
"assemblyai not working", "debug assemblyai", "transcription failed".
/assemblyai-core-workflow-aExecute AssemblyAI primary workflow: async transcription with audio intelligence.
Use when transcribing audio/video files, enabling speaker diarization,
sentiment analysis, entity detection, PII redaction, or content moderation.
Trigger with phrases like "assemblyai transcribe", "assemblyai transcription",
"transcribe audio", "speaker diarization assemblyai".
/assemblyai-cost-tuningOptimize AssemblyAI costs through model selection, feature budgeting, and usage monitoring.
Use when analyzing AssemblyAI billing, reducing transcription costs,
or implementing usage monitoring and budget alerts.
Trigger with phrases like "assemblyai cost", "assemblyai billing",
"reduce assemblyai costs", "assemblyai pricing", "assemblyai budget".
/assemblyai-debug-bundleCollect AssemblyAI debug evidence for support tickets and troubleshooting.
Use when encountering persistent issues, preparing support tickets,
or collecting diagnostic information for AssemblyAI problems.
Trigger with phrases like "assemblyai debug", "assemblyai support bundle",
"collect assemblyai logs", "assemblyai diagnostic".
/assemblyai-deploy-integrationDeploy AssemblyAI integrations to Vercel, Cloud Run, and Fly.io platforms.
Use when deploying AssemblyAI-powered transcription services to production,
configuring platform-specific secrets, or setting up webhook endpoints.
Trigger with phrases like "deploy assemblyai", "assemblyai Vercel",
"assemblyai production deploy", "assemblyai Cloud Run", "assemblyai Fly.io".
npx claudepluginhub flight505/skill-forge --plugin assemblyai-packOther plugins' skills for the same job