使用 Gladia 转录预录音频或 URL,支持批量/异步转录、说话人分离、字幕(SRT/VTT)及 PII 脱敏。
Gladia's pre-recorded API transcribes audio and video files asynchronously.
SDK-first: always use the official SDK — see gladia-sdk-integration for policy, setup, and fallback criteria.
When NOT to use: If the user needs real-time / live transcription of a stream, microphone, or ongoing audio feed, use the gladia-live-transcription skill instead. Live transcription uses WebSocket sessions, not the pre-recorded API. If the user has gladia-cli installed and wants a quick terminal workflow without writing code, use gladia-using-cli instead.
Consult these resources as needed:
get, list, getFile, deleteEndpointMethodSDK equivalent/v2/uploadPOSTtranscribe() auto-uploads local files/v2/pre-recordedPOSTcreate() / transcribe()``/v2/pre-recordedGETlist()``/v2/pre-recorded/:idGETget() / poll() / transcribe()``/v2/pre-recorded/:idDELETEdelete()``/v2/pre-recorded/:id/fileGETgetFile()
The SDK transcribe() method handles upload, job creation, and polling in one call. Use this by default.
typescript
const result = await client.preRecorded().transcribe("./audio.mp3", {
language_config: { languages: ["en"] },
diarization: true,
});
console.log(result.result?.transcription?.full_transcript);
python
result = client.prerecorded().transcribe(
"audio.mp3",
{"language_config": {"languages": ["en"]}, "diarization": True},
)
print(result.result.transcription.full_transcript)
Audio input can be a local file path, HTTP(S) URL, social/video URL, or binary file object. For full input types, see gladia-sdk-integration.
Use raw REST only when SDK use is not possible.
POST /v2/upload with multipart form data → get audio_urlPOST /v2/pre-recorded with audio_url and config → get idGET /v2/pre-recorded/:id until status: "done" (or use webhooks/callbacks)transcription, diarization, translation, etc. from responseUse SDK methods for post-processing operations:
client.preRecorded().get(id), .list(filters), .getFile(id), .delete(id)client.prerecorded().get(id), .list(filters), .get_file(id), .delete(id)For full JS/Python examples, pagination filters, and REST equivalents, see ./references/managing-jobs.md.
All options are passed as the second argument to transcribe(). Key options:
OptionDescriptionlanguage_configExpected languages, code switchingdiarizationSpeaker identification (pre-recorded only)translationTranslate to target languagessummarizationGenerate bullet points or paragraph summarysubtitlesGenerate SRT/VTT filespii_redactionRedact PII (pre-recorded only)audio_to_llmRun custom LLM prompts on transcriptcallback_urlAsync webhook delivery
For full option details, see ./references/transcription-options.md. For audio intelligence config, see gladia-audio-intelligence. For client-level retry/timeouts, see gladia-sdk-integration.
For full response JSON and event names, see ./references/delivery-and-response.md.
ConstraintValueMax file size1000 MBMax duration135 minutes (120 min for YouTube)Enterprise max duration4h15Concurrency (paid)25 concurrent jobsConcurrency (free)3 concurrent jobs
The SDK handles polling automatically — transcribe() polls until the job completes with configurable interval and timeout:
typescript
const result = await client.preRecorded().transcribe(audio, options, {
interval: 5000, // Poll every 5s
timeout: 600000, // Timeout after 10 minutes
});
If using raw REST instead of the SDK:
code_switching: true with empty languages triggers 100+ language evaluation. Always provide 3-5 expected languages./v2/pre-recorded/:id/file, not /v2/pre-recorded/:id/audio.For the full list of gotchas and diagnostics, see the gladia-troubleshooting skill.