Gladia SDK for Python
Actively maintained. Last release 5 weeks ago. A safe choice.
pip install gladiaio-sdkGladia Python SDK
A Python SDK for the Gladia API.
Requirements
You need Python 3.10+ for this package.
Installation
pip install gladiaio-sdk
# or with uv
uv add gladiaio-sdk
Usage
Import GladiaClient and create an instance.
Provide an API key with api_key or the GLADIA_API_KEY environment variable. Get your API key in under a minute.
You can also set GLADIA_API_URL. For live sessions, GLADIA_REGION (eu-west / us-west) is passed only on session creation (POST /v2/live).
Sync client
from gladiaio_sdk import GladiaClient
gladia_client = GladiaClient(api_key="your-api-key")
Pre-recorded transcription
transcribe() accepts a path, Path, binary file object, or http(s) URL. It uploads when needed, then polls until the job completes.
from gladiaio_sdk import GladiaClient
gladia_client = GladiaClient(api_key="your-api-key")
transcription = gladia_client.prerecorded().transcribe(
"audio.mp3",
{
"language_config": {
"languages": ["en"],
},
},
)
print(transcription.result.transcription.full_transcript)
See all the supported languages here!
Pass the options as the second argument to enable all the features from Audio intelligence — diarization, translation, PII redaction, and more.
Async pre-recorded
Use prerecorded_async() and await the same methods. Options match the sync API.
import asyncio
from gladiaio_sdk import GladiaClient
async def main() -> None:
gladia_client = GladiaClient(api_key="your-api-key")
transcription = await gladia_client.prerecorded_async().transcribe(
"audio.mp3",
{
"language_config": {
"languages": ["en"],
},
},
)
print(transcription.result.transcription.full_transcript)
asyncio.run(main())