Install
openclaw skills install @gladiaio/gladia-documentation-autoComprehensive Gladia speech-to-text reference auto-synced from docs.gladia.io. Use as a general-purpose fallback when other specialized skills don't match, or when the user needs a broad overview of Gladia capabilities, endpoints, decision guidance, or workflows. Always prefer the official SDK; fall back to raw REST/WebSocket only when SDK cannot satisfy the requirement.
openclaw skills install @gladiaio/gladia-documentation-autoSDK-first: always use the official SDK — see gladia-sdk-integration for policy, setup, and fallback criteria.
Consult these sibling skills as needed:
Gladia is a speech-to-text (STT) API that transcribes audio and video files in two modes: pre-recorded (asynchronous, for files) and live (real-time, for streaming audio). Beyond transcription, it offers audio intelligence features like speaker diarization, translation, sentiment analysis, summarization, and named entity recognition. Use the JavaScript/TypeScript SDK (@gladiaio/sdk) or Python SDK (gladiaio-sdk) for simplified integration, or call the REST API directly. Authenticate with the x-gladia-key header. Primary docs: https://docs.gladia.io
Key endpoints:
POST /v2/pre-recorded (create job), GET /v2/pre-recorded/:id (get result)POST /v2/live (init session), WebSocket connection for streamingPOST /v2/upload (for local files)Models: solaria-3 (pre-recorded, highest quality), solaria-1 (live only)
Reach for Gladia when:
Do not use Gladia for: text-only processing, image analysis, or non-audio content.
# All requests require the x-gladia-key header
curl -H "x-gladia-key: YOUR_API_KEY" https://api.gladia.io/v2/...
const { GladiaClient } = require("@gladiaio/sdk");
const client = new GladiaClient({ apiKey: "YOUR_KEY" });
// One-call transcription
const result = await client.preRecorded().transcribe("audio.mp3", {
model: "solaria-3",
language_config: { languages: ["en"] },
diarization: true,
translation: true,
translation_config: { target_languages: ["fr"] }
});
const config = {
model: "solaria-1",
encoding: "wav/pcm",
sample_rate: 16000,
bit_depth: 16,
channels: 1,
language_config: { languages: ["en"] }
};
const session = client.liveV2().startSession(config);
session.on("message", (msg) => console.log(msg));
session.sendAudio(audioChunk);
session.stopRecording();
MP3, WAV, FLAC, OGG, OPUS, AAC, M4A, AC3, EAC3, MP2
MP4, MOV, AVI, MKV, FLV, 3GP, WMV, M4V
Use 2-letter ISO 639-1 codes: en, fr, de, es, zh, ja, etc. Full list at /chapters/language/supported-languages
| Feature | Pre-recorded | Live | Config key |
|---|---|---|---|
| Speaker diarization | ✓ | ✗ | diarization |
| Translation | ✓ | ✓ | translation |
| Sentiment analysis | ✓ | ✗ | sentiment_analysis |
| Summarization | ✓ | ✗ | summarization |
| Named entity recognition | ✓ | ✓ | named_entity_recognition |
| PII redaction | ✓ | ✗ | pii_redaction |
| Subtitles (SRT/VTT) | ✓ | ✗ | subtitles |
| Chapterization | ✓ | ✗ | chapterization |
| Custom vocabulary | ✓ | ✓ | custom_vocabulary |
| Scenario | Use pre-recorded | Use live |
|---|---|---|
| User uploads a file | ✓ | ✗ |
| Streaming microphone input | ✗ | ✓ |
| Phone call transcription | ✗ | ✓ |
| Podcast/interview processing | ✓ | ✗ |
| Real-time captions | ✗ | ✓ |
| Need diarization | ✓ | ✗ (use multi-channel instead) |
| Need sentiment/summarization | ✓ | ✗ |
| Model | Use case | Availability |
|---|---|---|
solaria-3 | Highest accuracy, best for meetings/calls/podcasts | Pre-recorded only |
solaria-1 | Real-time streaming, lower latency | Live only |
| Approach | When to use |
|---|---|
Explicit language_config.languages: ["en"] | Language is known; avoids detection overhead |
| Auto-detect (omit languages) | Language unknown or mixed; slower but flexible |
Code switching code_switching: true | Audio mixes multiple languages; requires language list |
| Approach | When to use |
|---|---|
diarization: true | Single audio stream, multiple speakers (meetings, interviews) |
| Multi-channel (channels > 1) | Separate audio tracks per speaker (phone calls with distinct channels) |
Prepare the file: Ensure audio/video is in a supported format (MP3, WAV, MP4, etc.) and under 1000 MB. For files >135 minutes, split into ~60-minute chunks.
Upload the file (if local):
curl -X POST https://api.gladia.io/v2/upload \
-H "x-gladia-key: YOUR_KEY" \
-F "audio=@audio.mp3"
Save the returned audio_url.
Create transcription job:
curl -X POST https://api.gladia.io/v2/pre-recorded \
-H "x-gladia-key: YOUR_KEY" \
-H "Content-Type: application/json" \
-d '{
"audio_url": "https://api.gladia.io/file/...",
"model": "solaria-3",
"language_config": { "languages": ["en"] },
"diarization": true
}'
Save the returned id.
Poll for results:
curl https://api.gladia.io/v2/pre-recorded/ID \
-H "x-gladia-key: YOUR_KEY"
Repeat until status: "done". Or use webhooks/callbacks instead of polling.
Extract data: Parse result.transcription.utterances for text, timing, speaker, language, and confidence.
Initialize session:
curl -X POST https://api.gladia.io/v2/live \
-H "x-gladia-key: YOUR_KEY" \
-H "Content-Type: application/json" \
-d '{
"encoding": "wav/pcm",
"sample_rate": 16000,
"bit_depth": 16,
"channels": 1
}'
Save the returned WebSocket url.
Connect WebSocket: Open a WebSocket connection to the URL.
Send audio chunks: Stream audio in the specified encoding/sample rate.
Read messages: Listen for transcript, translation, sentiment_analysis, etc. messages.
Stop recording: Send { "type": "stop_recording" } or close the socket with code 1000.
Retrieve final results: Call GET /v2/live/:id to get the complete result.
solaria-3 is pre-recorded only; solaria-1 is live only. Using the wrong model will fail.language_config.languages (e.g., ["fr"]). Do not pass multiple languages or enable code switching with solaria-3.encoding, sample_rate, bit_depth, and channels match your actual audio stream, or transcription will fail silently.number_of_speakers, min_speakers, max_speakers are hints, not hard limits. The model may detect a different count.code_switching: true and translation on the same request without a constrained language list./audio/text/audio-transcription/ no longer work. Use /v2/pre-recorded and /v2/live.Before submitting transcription work:
x-gladia-key headermodel is solaria-3; for live: model is solaria-1en, fr, de)language_config.languagesdone before reading resultsresult.transcription.utterances with text and timingFor additional documentation and navigation, see: https://docs.gladia.io/llms.txt
This file is auto-synced from https://docs.gladia.io/.well-known/agent-skills/gladia/skill.md Do not edit manually — changes will be overwritten by CI. For additional documentation and navigation, see: https://docs.gladia.io/llms.txt