assemblyai-common-errors
Diagnose 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".
- License 许可
- MIT
- 最近更新
- 2026-07-13
- Stars
- ★ 1
- Forks
- 0
01 前言 Front Matter
- name
- assemblyai-common-errors
- tags
- [ "saas", "ai", "speech-to-text", "assemblyai", "transcription" ]
- author
- Jeremy Longshore <jeremy@intentsolutions.io>
- license
- MIT
- version
- 1.0.0
- description
- Diagnose 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".
- allowed-tools
- Read, Grep, Bash(curl:*)
- compatible-with
- claude-code
03 SKILL.md 正文
AssemblyAI Common Errors
Overview
Quick reference for the most common AssemblyAI errors across transcription, streaming, and LeMUR APIs with real error messages and solutions.
Prerequisites
assemblyaipackage installed- API key configured
- Access to application logs or console
Instructions
Error 1: Authentication Failed
Error: Authentication error: Invalid API key
Status: 401
Cause: API key is missing, invalid, or revoked.
Solution:
# Verify key is set
echo $ASSEMBLYAI_API_KEY
# Test directly
curl -H "Authorization: $ASSEMBLYAI_API_KEY" \
https://api.assemblyai.com/v2/transcript \
-X GET
Error 2: Transcription Status Error
{ "status": "error", "error": "Download error: unable to download..." }
Cause: The audio URL is not publicly accessible, has expired, or returned non-audio content.
Solution:
// Verify URL is accessible
const response = await fetch(audioUrl, { method: 'HEAD' });
console.log('Content-Type:', response.headers.get('content-type'));
console.log('Status:', response.status);
// Content-Type should be audio/* or video/*
// For private files, upload directly
const transcript = await client.transcripts.transcribe({
audio: './local-file.mp3', // SDK handles upload
});
Error 3: Could Not Process Audio
{ "status": "error", "error": "Audio file could not be processed" }
Cause: Corrupted file, unsupported codec, file too short (<200ms), or audio is entirely silent.
Solution:
# Check file with ffprobe
ffprobe -v quiet -print_format json -show_format -show_streams input.mp3
# Convert to a known-good format
ffmpeg -i input.unknown -ar 16000 -ac 1 -f wav output.wav
Error 4: Rate Limit Exceeded
Error: Rate limit exceeded
Status: 429
Header: Retry-After: 30
Cause: Too many concurrent requests. Free tier: 5 streams/min. Paid: 100 streams/min (auto-scales).
Solution:
import { AssemblyAI } from 'assemblyai';
async function transcribeWithBackoff(audioUrl: string, retries = 3) {
const client = new AssemblyAI({ apiKey: process.env.ASSEMBLYAI_API_KEY! });
for (let attempt = 0; attempt <= retries; attempt++) {
try {
return await client.transcripts.transcribe({ audio: audioUrl });
} catch (err: any) {
if (err.status !== 429 || attempt === retries) throw err;
const delay = Math.pow(2, attempt) * 1000 + Math.random() * 500;
console.warn(`Rate limited. Retrying in ${delay.toFixed(0)}ms...`);
await new Promise(r => setTimeout(r, delay));
}
}
}
Error 5: Streaming WebSocket Errors
WebSocket error: 4001 Not Authorized
WebSocket error: 4008 Session limit reached
WebSocket error: 4100 Endpoint not found
| Code | Meaning | Solution |
|---|---|---|
4001 |
Bad API key or expired token | Refresh token via client.streaming.createTemporaryToken() |
4008 |
Max concurrent streams reached | Wait for existing streams to close |
4100 |
Wrong WebSocket URL | Use wss://api.assemblyai.com/v2/realtime/ws |
4010 |
Audio too short/no speech | Ensure microphone is capturing audio |
Error 6: LeMUR Errors
{ "error": "Transcript not found" }
{ "error": "Input text exceeds maximum length" }
Cause: Invalid transcript_ids or total audio exceeds 100-hour limit.
Solution:
// Verify transcript exists before LeMUR call
const transcript = await client.transcripts.get(transcriptId);
if (transcript.status !== 'completed') {
throw new Error(`Transcript ${transcriptId} status: ${transcript.status}`);
}
// For large inputs, chunk transcript_ids
const chunks = [];
for (let i = 0; i < transcriptIds.length; i += 10) {
chunks.push(transcriptIds.slice(i, i + 10));
}
for (const chunk of chunks) {
const { response } = await client.lemur.task({
transcript_ids: chunk,
prompt: 'Summarize key points.',
});
}
Error 7: Unsupported Language
{ "status": "error", "error": "Language not supported" }
Cause: Specified language_code is not available for the selected model.
Solution:
// Use automatic language detection (recommended)
const transcript = await client.transcripts.transcribe({
audio: audioUrl,
language_detection: true, // Auto-detect from 99+ languages
});
console.log('Detected language:', transcript.language_code);
Error 8: Word Boost Not Working
Symptom: Custom terms are still transcribed incorrectly despite word_boost.
Solution:
const transcript = await client.transcripts.transcribe({
audio: audioUrl,
word_boost: ['LeMUR', 'AssemblyAI', 'Nova-3'], // Max 1000 terms
boost_param: 'high', // 'low' | 'default' | 'high'
speech_model: 'best', // Word boost works with Best model tier
});
Quick Diagnostic Commands
# Check API status
curl -s https://status.assemblyai.com/api/v2/status.json | jq '.status.description'
# Test API connectivity
curl -s -o /dev/null -w "%{http_code}" \
-H "Authorization: $ASSEMBLYAI_API_KEY" \
https://api.assemblyai.com/v2/transcript
# Check installed SDK version
npm list assemblyai
# Verify env variable
node -e "console.log(process.env.ASSEMBLYAI_API_KEY ? 'SET' : 'NOT SET')"
Error Handling
| Error | HTTP Code | Retryable | Action |
|---|---|---|---|
| Auth error | 401 | No | Fix API key |
| Not found | 404 | No | Check transcript ID |
| Rate limit | 429 | Yes | Exponential backoff |
| Server error | 500-503 | Yes | Retry after delay |
| Download error | N/A | Maybe | Check audio URL accessibility |
Resources
Next Steps
For comprehensive debugging, see assemblyai-debug-bundle.
04 同仓库更多 Skills
zustand-store-creator
Create zustand store creator operations. Auto-activating skill for Frontend Development. Triggers on: zustand store creator, zustand store creator Part of the Frontend Development skill category. Use when working with zustand store creator functionality. Trigger with phrases like "zustand store creator", "zustand creator", "zustand".
zero-trust-config-helper
Configure with zero trust config helper operations. Auto-activating skill for Security Advanced. Triggers on: zero trust config helper, zero trust config helper Part of the Security Advanced skill category. Use when configuring systems or services. Trigger with phrases like "zero trust config helper", "zero helper", "zero".
zapier-integration-helper
Assist with zapier integration helper operations. Auto-activating skill for Business Automation. Triggers on: zapier integration helper, zapier integration helper Part of the Business Automation skill category. Use when working with APIs or building integrations. Trigger with phrases like "zapier integration helper", "zapier helper", "zapier".
yaml-config-validator
Validate yaml config validator operations. Auto-activating skill for DevOps Basics. Triggers on: yaml config validator, yaml config validator Part of the DevOps Basics skill category. Use when configuring systems or services. Trigger with phrases like "yaml config validator", "yaml validator", "yaml".
xvary-stock-research
Thesis-driven equity analysis from public SEC EDGAR and market data; /analyze, /score, /compare workflows with bundled Python tools (Claude Code, Cursor, Codex).
xss-vulnerability-scanner
Scan xss vulnerability scanner operations. Auto-activating skill for Security Fundamentals. Triggers on: xss vulnerability scanner, xss vulnerability scanner Part of the Security Fundamentals skill category. Use when working with xss vulnerability scanner functionality. Trigger with phrases like "xss vulnerability scanner", "xss scanner", "xss".