assemblyai
AssemblyAI Python SDK
What it is and what it does
AssemblyAI's Python SDK wraps the company's cloud-based audio transcription and understanding API, offering multiple transcriber classes for different use cases: prerecorded transcription with audio intelligence features (speaker labels, chapters, sentiment), synchronous batch transcription for short clips, and real-time streaming transcription for live audio. The SDK handles authentication, request/response serialization via pydantic, HTTP communication through httpx, and WebSocket streaming via websockets. It supports both synchronous and asynchronous workflows.
You provide audio as a local file path, URL, or binary data, configure transcription options (speech models, language detection, speaker labels), and receive a transcript object with the text and metadata. The SDK also provides utilities to export subtitles (SRT/VTT), extract sentences and paragraphs, and search for words within transcripts. Configuration defaults can be set globally or overridden per request.
Use it for:
- Transcribe recorded meetings, interviews, or podcasts with speaker identification and chapter detection.
- Build a real-time transcription feature for live calls or voice agent applications using the streaming transcriber.
- Extract and export subtitles from video or audio files in SRT or VTT format for accessibility.
- Analyze sentiment, detect language, and extract structured insights from audio content at scale.
- Integrate transcription into AI coding agents or chatbots that need current API context for audio processing.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Python SDK for transcribing and understanding audio using AssemblyAI's AI models, supporting prerecorded files, URLs, real-time streaming, and synchronous batch transcription.
Yes. The SDK is actively maintained, has low install friction, carries a permissive MIT license, and provides a straightforward interface to a production-grade transcription service. Choose it if you need to transcribe audio programmatically and are willing to use AssemblyAI's cloud API. The main prerequisite is an API key and associated costs.
Install
assemblyai on PyPI
pip
pip install assemblyaiuv
uv add assemblyaipoetry
poetry add assemblyaiInstalling assemblyai
Before you install
Low install friction with standard dependencies. Active maintenance as of 2026-08-14 with recent release. Supports Python 3.8 through 3.14.
License in practice
MIT License permits commercial and private use with minimal restrictions—suitable for most projects.
Quickstart
pip install assemblyai
import assemblyai as aai
aai.settings.api_key = "YOUR_API_KEY"
transcript = aai.Transcriber().transcribe("./audio.mp3")
print(transcript.text)
Requires an AssemblyAI API key (sign up at assemblyai.com/dashboard/signup).
Verify before relying
- Specific model names and capabilities beyond 'universal-3-5-pro' and 'universal-2' mentioned in examples
- Latency and throughput characteristics for different transcriber classes
- Audio format support and file size limits for each transcriber variant
- Cost and rate-limiting details for the API
Package facts
| License | MIT License (permissive) |
| Python support | supports the current Python release (>=3.8) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 5 — httpx, typing-extensions, websockets, pydantic, pydantic-settings |
| Maintenance | actively maintained — 0 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 2,412,915/month — #3,076 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: assemblyai-1.0.0-py3-none-any.whl
Tags
More Libraries packages
urllib3 is an HTTP client library that provides…
permissive · top 100 on PyPI
requestsRequests is a Python HTTP library that…
permissive · top 100 on PyPI
pluggyPluggy provides a plugin system that lets you…
permissive · top 100 on PyPI
python-dateutilProvides parsing, arithmetic, and recurrence…
permissive · top 100 on PyPI
sixSix provides utility functions to write Python…
permissive · top 100 on PyPI
pytestpytest is a testing framework that lets you…
permissive · top 100 on PyPI
rev-aiPython SDK for Rev AI's speech-to-text API,…
permissive · top 15,000 on PyPI
aws_sdk_transcribe_streamingProvides a Python client for AWS Transcribe…
permissive · top 15,000 on PyPI
deepgram-sdkOfficial Python SDK for Deepgram's speech…
permissive · top 5,000 on PyPI
SpeechRecognitionPerforms speech recognition and transcription…
permissive · top 5,000 on PyPI
amazon-transcribeStreams audio to Amazon Transcribe and receives…
permissive · top 15,000 on PyPI
speechmatics-rtAsync Python client for real-time…
permissive · top 15,000 on PyPI
livekit-plugins-azureIntegrates Azure AI services, particularly…
permissive · top 15,000 on PyPI
openai-whisperWhisper performs multilingual speech…
permissive · top 5,000 on PyPI
youtube-transcript-apiFetches transcripts and subtitles from YouTube…
permissive · top 1,000 on PyPI
gladiaio-sdkA Python SDK for the Gladia speech-to-text API,…
unclear · top 15,000 on PyPI