soniox
The official Python SDK for the Soniox API (STT, REST)
What it is and what it does
Soniox is the official Python SDK for accessing Soniox's speech and audio APIs. It provides both synchronous and asynchronous clients that wrap REST and WebSocket endpoints for speech-to-text transcription, text-to-speech synthesis, voice cloning, and usage/cost reporting. The SDK handles authentication via API key, file uploads, model selection, and typed request/response objects through pydantic.
Typical workflows include transcribing audio files end-to-end in a single call, streaming realtime speech recognition or synthesis over WebSocket, cloning voices from reference audio for custom TTS, and querying daily spend and per-request logs. The package is actively maintained, supports Python 3.10 through 3.14, and has minimal dependencies (httpx, pydantic, websockets).
Use it for:
- Transcribe audio files or URLs to text in a single call with automatic cleanup.
- Stream live audio over WebSocket for low-latency speech-to-text in real-time applications.
- Generate speech from text with built-in or cloned voices, optionally streaming audio chunks as they arrive.
- Clone a custom voice from a reference audio clip and reuse it across TTS requests.
- Track API usage and costs per model and per request over a date range.
- Build async applications that handle concurrent STT/TTS operations without blocking.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Python SDK for the Soniox speech-to-text and text-to-speech API, offering sync and async clients for REST and realtime WebSocket access, plus voice cloning and usage tracking.
Yes. The SDK is actively maintained, has low install friction, no known vulnerabilities, and a permissive license. Install it if you need to integrate Soniox's STT or TTS APIs into a Python application. Avoid Python 3.13.6 specifically due to a documented ssl regression; any other 3.10–3.14 version is safe.
Install
soniox on PyPI
pip
pip install sonioxuv
uv add sonioxpoetry
poetry add sonioxInstalling soniox
Before you install
Low friction install with three lightweight runtime dependencies (httpx, pydantic, websockets). Active maintenance—last commit 2026-08-11, released 3 days ago. Supports modern Python versions (3.10–3.14). Note: avoid Python 3.13.6 due to a CPython ssl regression that hangs realtime STT/TTS.
License in practice
Apache-2.0 (permissive). No restrictions on commercial use, modification, or redistribution; attribution required.
Quickstart
from soniox import SonioxClient
client = SonioxClient()
transcript = client.stt.transcribe_and_wait_with_tokens(
file="path/to/audio.mp3",
delete_after=True,
)
print(transcript.text)
client.close()
Requires SONIOX_API_KEY environment variable or explicit API key passed to client. Avoid Python 3.13.6 for realtime operations.
Verify before relying
- Pricing model and rate limits for STT/TTS operations beyond daily cost tracking.
- Whether voice cloning quality and speed meet production requirements for your use case.
- Latency characteristics of realtime WebSocket endpoints under load.
Package facts
| License | Apache-2.0 (permissive) |
| Python support | supports the current Python release (>=3.10) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 3 — httpx, pydantic, websockets |
| Maintenance | actively maintained — 3 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 296,113/month — #7,903 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: soniox-2.9.0-py3-none-any.whl
Keywords: ai, sdk, soniox, speech-to-text, stt
Tags
More Python Modules packages
Converts domain names between Unicode and…
permissive · top 100 on PyPI
setuptoolsSetuptools is a Python build backend and…
permissive · top 100 on PyPI
PyYAMLPyYAML parses and emits YAML 1.1 data format,…
permissive · top 100 on PyPI
pydanticPydantic validates Python data structures…
permissive · top 100 on PyPI
annotated-typesProvides reusable metadata objects for use with…
permissive · top 100 on PyPI
typing-inspectionProvides runtime tools to inspect and…
permissive · top 100 on PyPI
livekit-plugins-sonioxIntegrates Soniox speech-to-text and…
permissive · top 15,000 on PyPI
fish-audio-sdkOfficial Python client for the Fish Audio API,…
permissive · top 15,000 on PyPI
kugelaudioOfficial Python SDK for KugelAudio's…
permissive · top 15,000 on PyPI
mlx-audioMLX-Audio provides text-to-speech,…
permissive · top 15,000 on PyPI
livekit-plugins-inworldIntegrates Inworld's text-to-speech and…
permissive · top 15,000 on PyPI
aws_sdk_transcribe_streamingProvides a Python client for AWS Transcribe…
permissive · top 15,000 on PyPI
rev-aiPython SDK for Rev AI's speech-to-text API,…
permissive · top 15,000 on PyPI
livekit-plugins-cartesiaIntegrates Cartesia's voice AI services…
permissive · top 5,000 on PyPI
speechmatics-rtAsync Python client for real-time…
permissive · top 15,000 on PyPI
livekit-plugins-deepgramIntegrates Deepgram's voice AI services…
permissive · top 5,000 on PyPI