Design & media

Gladia Troubleshooting

Try it

Diagnose and fix common Gladia API issues. Use when the user encounters errors (401, 403, 429), unexpected behavior, poor transcription quality, billing conf...

What it does

Common issues, gotchas, and their solutions when working with the Gladia API.

The skill document

Troubleshooting

Common issues, gotchas, and their solutions when working with the Gladia API.

SDK-first diagnostics: first verify the user is on the official SDK — many issues (polling, reconnection, retries) are solved automatically. See gladia-sdk-integration for setup and policy.

When to Use

  • User encounters errors (401, 403, 429, invalid format, timeout) when calling the Gladia API
  • Unexpected behavior: poor transcription quality, missing words, wrong language
  • WebSocket disconnections, polling failures, or session hangs
  • Billing confusion (multi-channel, concurrency limits, plan restrictions)
  • Verifying that an integration is correctly configured before going to production

When NOT to use: For initial SDK setup and configuration, use gladia-sdk-integration. For feature-specific guidance (options, parameters, response structure), use gladia-pre-recorded-transcription or gladia-live-transcription.

References

Consult these resources as needed:

  • ../gladia-sdk-integration/SKILL.md -- SDK setup, client config (retry, timeouts), and SDK vs raw API decision guide
  • ../gladia-sdk-integration/references/sdk-versions.md -- Current SDK versions (auto-synced by CI)
  • ../gladia-pre-recorded-transcription/SKILL.md -- Pre-recorded config options and limits
  • ../gladia-live-transcription/SKILL.md -- Live session config and WebSocket event handling
  • ../gladia-audio-intelligence/SKILL.md -- Audio intelligence feature configs and availability matrix

Authentication Errors

401 Unauthorized

  • Cause: Invalid or missing API key
  • Fix (SDK): Verify the key is passed via the apiKey (JS) / api_key (Python) constructor option, or set the GLADIA_API_KEY environment variable
  • Fix (raw REST): Verify the key is passed in the x-gladia-key header
  • Check: Go to app.gladia.io → API keys → verify the key is active

403 Forbidden

  • Cause: Key doesn't have access to the requested feature or region
  • Fix: Check your plan tier; some features are plan-restricted

Rate Limiting and Concurrency

429 Too Many Requests

Concurrency limits by plan:

PlanPre-recordedLiveNotes
Free3110 hrs/month total
Starter2530—
Growth2530—
EnterpriseUnlimitedUnlimited—

Fix: Wait for in-progress jobs to complete before starting new ones, or upgrade your plan.

Common Gotchas

1. Code switching without language list

Problem: Enabling code_switching: true with an empty languages array causes evaluation across 100+ languages and frequent misdetections.

Fix: Always provide 3-5 expected languages:

{
  "language_config": {
    "languages": ["en", "fr", "es"],
    "code_switching": true
  }
}

2. Custom vocabulary intensity too high

Problem: intensity values above 0.6 cause false positives where unrelated words get replaced by vocabulary entries.

Fix: Keep intensity at 0.4-0.6. Use pronunciations for better recognition instead of raising intensity:

{
  "vocabulary": [
    { "value": "Gladia", "pronunciations": ["gla-dee-ah"], "intensity": 0.5 }
  ]
}

3. Audio exceeding duration limits silently

Problem: Pre-recorded files over 135 minutes may fail without a clear error message.

Fix: Split long audio into chunks of ~60 minutes before uploading. For enterprise (4h15 limit), contact support.

4. Multi-channel billing surprise

Problem: Sending 2-channel (stereo) audio is billed as 2x the duration.

Fix: Merge to mono if you don't need per-channel speaker identification. Only use multi-channel intentionally for distinct audio sources.

5. WebSocket disconnection without recovery

Problem: If the WebSocket drops, creating a new session loses context.

Fix (SDK — recommended): The SDK handles reconnection automatically with configurable wsRetry. No action needed if using the SDK.

Fix (raw WebSocket): Reconnect to the same WebSocket URL to resume the session. Do NOT call /v2/live again.

6. Polling without backoff

Problem: Rapidly polling /v2/pre-recorded/:id wastes requests and may trigger rate limits.

Fix (SDK — recommended): The SDK handles polling automatically. Use transcribe() which includes built-in backoff, or configure poll() directly:

const result = await client.preRecorded().transcribe(audio, options, {
  interval: 5000, // 5 seconds between polls
});
result = client.prerecorded().transcribe(
    "audio.mp3",
    options,
    {"interval": 5000},  # 5 seconds between polls
)

Fix (raw REST): Implement exponential backoff (start at 3s, max 30s), or use webhooks/callbacks instead.

7. Forgetting to stop recording

Problem: Leaving a WebSocket open without sending stop_recording keeps the session hanging until the 3-hour timeout.

Fix: Always explicitly call session.stopRecording() (or session.stop_recording() in Python) when done. Implement cleanup in error handlers.

8. Partial transcripts not appearing

Problem: Real-time results come only as final transcripts by default.

Fix: Enable partial transcripts in session config:

{
  "messages_config": {
    "receive_partial_transcripts": true
  }
}

9. Expecting diarization in live mode

Problem: Speaker diarization is only available for pre-recorded transcription.

Fix: For live multi-speaker scenarios, use multi-channel audio with one speaker per channel and track by channel number.

10. PII redaction in live mode

Problem: pii_redaction: true is silently ignored in live transcription.

Fix: PII redaction only works for pre-recorded. For live compliance needs, implement client-side redaction on the transcript text.

Audio Format Issues

"Invalid audio format" error

  • Verify encoding, sample_rate, bit_depth, channels match your actual audio stream
  • For pre-recorded: format is auto-detected from the file; this error is live-specific
  • For supported formats and size limits, see gladia-pre-recorded-transcription and gladia-live-transcription

Transcription Quality Issues

Poor accuracy

  1. Check audio quality: Background noise, low volume, or heavy compression degrades results
  2. Enable audio enhancer: pre_processing.audio_enhancer: true (live)
  3. Specify languages: Always provide expected languages rather than relying on auto-detection
  4. Use custom vocabulary: For domain-specific terms (medical, legal, technical)
  5. Check sample rate: Higher sample rates (16kHz+) give better results than 8kHz

Wrong language detected

  1. Provide explicit languages list
  2. If multi-language, enable code_switching with 3-5 expected languages
  3. For single-language content, specify exactly one language and disable code switching

Missing words or gaps

  1. Check for silence or very low volume sections
  2. Verify audio isn't corrupted (try playing it back)
  3. For live: ensure chunks are sent continuously without large gaps

Webhook/Callback Issues

Callbacks not received

  1. Verify callback_url is publicly reachable (not localhost)
  2. Check your server returns 2xx within timeout
  3. Verify no firewall/WAF blocking incoming requests
  4. Test with a service like webhook.site first

Webhook signature verification

Webhooks are powered by Svix. Verify using the Svix libraries:

import { Webhook } from "svix";
const wh = new Webhook(webhookSecret);
wh.verify(payload, headers);

Verification Checklist

Before submitting transcription work:

  • Using the official Gladia SDK (if not, confirm there is a valid reason for raw API calls)
  • API key is valid and passed correctly (SDK constructor or GLADIA_API_KEY env var)
  • Audio file is under 1000 MB and within duration limits
  • Audio format is supported
  • If using code switching, languages list has 3-5 entries
  • If using custom vocabulary, intensity is 0.4-0.6
  • For live: session properly closed with stopRecording() / stop_recording()
  • For live: audio format config matches actual stream
  • Callbacks/webhooks are reachable if configured
  • Multi-channel audio is intentional
  • Error responses are handled (SDK throws typed errors; raw API returns status, error_message)

Further Reading

Support Resources

Related skills

Join a video meeting as an AI bot with voice, avatar, and screenshare across four operating modes.

by johnpatternai22 installs8 stars

Generate and edit Draw.io, Mermaid, and Excalidraw diagrams from natural language using a structured JSON spec.

by nssa.io1.0k installs47 stars

Stores durable facts in a categorized, plain-markdown vault on disk, alongside your agent's built-in memory.

by Iván559 installs18 stars

Fetch raw ad creative, app, ranking, and revenue data from AdMapix as structured JSON.

by fly0pants4.3k installs296 stars

Find why your productivity system keeps failing, then apply the smallest fix — capacity math, bottleneck routing, durable local notes.

by Iván855 installs69 stars

Run Git operations — commits, branches, merges, rebases, conflict resolution, and recovery — with safety rules enforced.

by Iván535 installs31 stars

More from gladiaio

Browse all skills

Gladia speech-to-text reference: endpoints, workflows, model guidance, and SDK-first integration patterns.

by gladiaio7 installs

Transcribe pre-recorded audio files or URLs with Gladia. Use when the user needs batch/async transcription, speaker diarization, subtitles (SRT/VTT), PII redaction, translation, NER, summarization, audio-to-LLM, or any audio intelligence on pre-recorded content. Always prefer the official SDK; fall back to raw REST only when SDK cannot satisfy the requirement.

by gladiaio5 installs

Install and configure the official Gladia SDKs (@gladiaio/sdk for JS/TS, gladiaio-sdk for Python). Use when the user asks about SDK setup, client initialization, API key configuration, choosing between JS and Python, browser usage, retry/timeout settings, error handling, or SDK vs raw API decisions. The SDK is the recommended default for all Gladia integrations.

by gladiaio5 installs

Real-time speech-to-text streaming with Gladia via WebSocket. Use when the user needs live transcription, builds a voice agent, meeting recorder, call center integration, live subtitles, or any application streaming audio for low-latency partial and final transcripts. Always prefer the official SDK; fall back to raw WebSocket/REST only when SDK cannot satisfy the requirement.

by gladiaio5 installs

Configure and use Gladia audio intelligence features: speaker diarization, translation, sentiment analysis, named entity recognition (NER), PII redaction, subtitles (SRT/VTT), summarization, custom vocabulary, and audio-to-LLM. Use when the user asks about any audio intelligence feature, enabling features on pre-recorded or live transcription, understanding which features are available in each mode, or combining multiple features. Always prefer the official SDK; fall back to raw REST only when SDK cannot satisfy the requirement.

by gladiaio5 installs

Terminal transcription of audio files and URLs with the Gladia CLI (gladia speech-to-text). Use when the user has gladia-cli installed, wants shell-based transcription, or asks an agent to transcribe audio then answer questions about the content. For audio intelligence features not available as CLI flags, use the SDK skills instead.

by gladiaio