skillfed

soniox

The official Python SDK for the Soniox API (STT, REST)

soniox v2.9.0 296.1K downloads/30d#7,903 on PyPI11
Permissive license Apache-2.0 Active released

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 soniox

uv

uv add soniox

poetry

poetry add soniox

Installing 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

Intended Audience :: DevelopersLicense :: OSI Approved :: Apache Software LicenseOperating System :: MacOSOperating System :: Microsoft :: WindowsOperating System :: OS IndependentOperating System :: POSIXOperating System :: POSIX :: LinuxProgramming Language :: Python :: 3Programming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.14Topic :: Software Development :: Libraries :: Python ModulesTyping :: Typed

Tags

speech to text python sdktext to speech api clientstt tts realtime streamingvoice cloning sdksoniox python clientasync speech recognitionwebsocket audio streaming
speech-recognitiontext-to-speechrealtime-streaming

More Python Modules packages