/assemblyai-pack:assemblyai-upgrade-migrationfrom assemblyai-pack
Analyzes, plans, and executes AssemblyAI SDK upgrades with breaking change detection. Guides migration from v3 to v4, package renames, and speech model transitions.
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.
Guide for upgrading the assemblyai npm package and migrating between SDK versions, including the major v3 to v4 migration and speech model transitions.
assemblyai package installed# Check installed version
npm list assemblyai
# Check latest available version
npm view assemblyai version
# See what changed
npm view assemblyai --json | jq '.versions[-5:]'
# View release notes
open https://github.com/AssemblyAI/assemblyai-node-sdk/releases
# Or check from CLI
gh release list --repo AssemblyAI/assemblyai-node-sdk --limit 10
git checkout -b upgrade/assemblyai-sdk-v$(npm view assemblyai version)
npm install assemblyai@latest
npm test
If migrating from @assemblyai/sdk (old package) to assemblyai (current):
// BEFORE (old package — @assemblyai/sdk)
import { AssemblyAI as OldClient } from '@assemblyai/sdk';
const client = new OldClient({ apiKey: '...' });
// AFTER (current package — assemblyai)
import { AssemblyAI } from 'assemblyai';
const client = new AssemblyAI({ apiKey: '...' });
# Remove old package, install new
npm uninstall @assemblyai/sdk
npm install assemblyai
Key changes in the migration:
Old (@assemblyai/sdk) | New (assemblyai) |
|---|---|
import { AssemblyAI } from '@assemblyai/sdk' | import { AssemblyAI } from 'assemblyai' |
client.transcripts.create() | client.transcripts.transcribe() (blocks until done) |
Manual polling with client.transcripts.get() | transcribe() auto-polls, submit() for manual control |
RealtimeTranscriber class | client.streaming.createService() |
client.realtime.createTemporaryToken() | client.streaming.createTemporaryToken() |
// v3 pattern: create + poll loop
const job = await client.transcripts.create({ audio_url: url });
let transcript;
while (true) {
transcript = await client.transcripts.get(job.id);
if (transcript.status === 'completed' || transcript.status === 'error') break;
await new Promise(r => setTimeout(r, 3000));
}
// v4 pattern: transcribe() handles everything
const transcript = await client.transcripts.transcribe({
audio: url, // Note: 'audio' not 'audio_url'
});
// v4 pattern: submit() for webhook-based (no polling)
const submitted = await client.transcripts.submit({
audio: url,
webhook_url: 'https://your-app.com/webhook',
});
// v3 pattern: RealtimeTranscriber class
import { RealtimeTranscriber } from 'assemblyai';
const rt = new RealtimeTranscriber({ apiKey: '...' });
rt.on('transcript', (msg) => { /* ... */ });
await rt.connect();
// v4 pattern: client.streaming.createService()
const transcriber = client.streaming.createService({
speech_model: 'nova-3',
sample_rate: 16000,
});
transcriber.on('transcript', (msg) => { /* ... */ });
await transcriber.connect();
// Switch from legacy models to Universal-3
const transcript = await client.transcripts.transcribe({
audio: audioUrl,
speech_model: 'best', // Uses Universal-3 (highest accuracy)
// Other options: 'nano' (fastest, lowest cost)
// Note: 'best' supports word_boost (up to 1000 terms)
});
// For streaming: nova-3 or nova-3-pro
const transcriber = client.streaming.createService({
speech_model: 'nova-3-pro', // Most accurate streaming model
sample_rate: 16000,
});
import { AssemblyAI } from 'assemblyai';
async function verifyUpgrade() {
const client = new AssemblyAI({ apiKey: process.env.ASSEMBLYAI_API_KEY! });
// Test async transcription
const transcript = await client.transcripts.transcribe({
audio: 'https://storage.googleapis.com/aai-web-samples/5_common_sports_702.wav',
});
console.assert(transcript.status === 'completed', 'Transcription should complete');
console.assert(transcript.text && transcript.text.length > 0, 'Should have text');
// Test LeMUR
const { response } = await client.lemur.task({
transcript_ids: [transcript.id],
prompt: 'What is this about? Reply in one sentence.',
});
console.assert(response.length > 0, 'LeMUR should respond');
// Test transcript listing
const page = await client.transcripts.list({ limit: 1 });
console.assert(page.transcripts.length > 0, 'Should list transcripts');
console.log('All checks passed.');
}
verifyUpgrade().catch(console.error);
assemblyai package to latest version| Issue | Cause | Solution |
|---|---|---|
Cannot find module 'assemblyai' | Old package name | npm uninstall @assemblyai/sdk && npm install assemblyai |
transcripts.create is not a function | API changed in v4 | Use transcripts.transcribe() or transcripts.submit() |
audio_url not recognized | Parameter renamed | Use audio instead of audio_url |
| Streaming not connecting | API changed | Use client.streaming.createService() |
| TypeScript errors | Type definitions changed | Update imports to match new types |
For CI integration during upgrades, see assemblyai-ci-integration.
What SKILL.md sets; muted values are Claude Code's defaults
npx claudepluginhub flight505/skill-forge --plugin assemblyai-pack18 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-core-workflow-bExecute AssemblyAI streaming transcription and LeMUR workflows.
Use when implementing real-time speech-to-text, live captions,
voice agents, or LLM-powered audio analysis with LeMUR.
Trigger with phrases like "assemblyai streaming", "assemblyai real-time",
"assemblyai live transcription", "assemblyai LeMUR", "assemblyai summarize audio".
/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".
Other plugins' skills for the same job