Skip to main content

Speech Revolutions — Python SDK

Official Python client for the Speech Revolutions speech-to-text API.

Install

pip install speechrevolutions

For console progress bars, install the optional tqdm extra:

pip install "speechrevolutions[progress]"

Quick start

from speechrevolutions import SpeechRevolutions

client = SpeechRevolutions()  # reads SPEECHREVOLUTIONS_API_KEY
result = client.transcribe("meeting.mp3", speaker_labels=True)
print(result.text)

for u in result.utterances:
    print(f"{u.speaker}: {u.text}")  # e.g. "SPEAKER_1: Hello."

Async

import asyncio

from speechrevolutions import AsyncSpeechRevolutions


async def main():
    async with AsyncSpeechRevolutions() as client:
        result = await client.transcribe("meeting.mp3", speaker_labels=True)
        print(result.text)


asyncio.run(main())

From a URL (Deepgram-style)

result = client.transcribe_url("https://docs.speechrevolutions.com/samples/diamond-necklace.mp3")
# or, since transcribe() detects http(s) URLs:
# result = client.transcribe("https://docs.speechrevolutions.com/samples/diamond-necklace.mp3")

Options as kwargs or config object

# kwargs (ElevenLabs / Deepgram style). `diarize` is an alias for `speaker_labels`.
result = client.transcribe("meeting.mp3", diarize=True, output_type="json")

# config object (AssemblyAI style)
from speechrevolutions import TranscribeOptions
result = client.transcribe("meeting.mp3", options=TranscribeOptions(speaker_labels=True))

Defaults: output_type="json", word_timestamps, speaker_labels, nltk all True, tier="standard", custom_vocabulary=None, language=None.

language pins an ISO 639-1 code (e.g. language="ru") and skips language detection; None (or "auto") detects it automatically. Pinning the wrong language makes the model translate into it (Russian audio pinned to "en" comes back as English), and an unsupported code is rejected with HTTP 422.

Live progress

Unlike AssemblyAI/Deepgram (which give no percentage for pre-recorded audio), you get real-time progress — for both the file upload and the transcription — as a console bar, a callback, or both.

# 1. Console bars (uses tqdm if installed: pip install "speechrevolutions[progress]")
#    Shows an "Uploading" byte bar, then a "Transcribing" bar.
result = client.transcribe("meeting.mp3", progress=True)

# 2. Programmatic — read event.percent (0–100) to drive your own UI / API
def on_progress(event):        # transcription
    print(event.percent, event.step)      # e.g. 50.0 "chunk:0"

def on_upload(event):          # upload (event.step == "upload")
    print("upload", event.percent)

result = client.transcribe(
    "meeting.mp3",
    on_progress=on_progress,
    on_upload_progress=on_upload,
)

progress=True and the callbacks compose — the bars render and your callbacks still fire for every event. When the job completes, on_progress always receives a final event at 100 (event.step == "completed"), even for a short file that finished before reporting any progress.

Result shape

Default output_type is json. The SDK parses it into a transcript-first object:

Field Like
result.text AssemblyAI / ElevenLabs
result.transcript Deepgram alias
result.words word + start/end/speaker
result.utterances AssemblyAI speaker turns
result.to_deepgram() Deepgram-shaped dict
result.to_dict() normalized JSON
result.content / result.save() raw bytes / file
from speechrevolutions import SpeechRevolutions

client = SpeechRevolutions()
result = client.transcribe("meeting.mp3")

# Deepgram's response shape; speakers are numbered from 0.
dg = result.to_deepgram()
print(dg["results"]["channels"][0]["alternatives"][0]["transcript"])

# Save raw content to disk. Appends the output type if the path has no
# extension, e.g. "output" -> "output.json". Returns the written path.
path = result.save("output")
print(f"saved {path}")

to_deepgram() numbers speakers from 0, as Deepgram does: SPEAKER_1 becomes speaker 0, SPEAKER_2 speaker 1. (Before 1.0.0 it kept our 1-based numbers.)

Webhooks & retrieving results later

submit() uploads and enqueues a job and returns its id without waiting — ideal for batch/background work. Collect the result later via a webhook (callback_url, a signed POST — verify X-SR-Signature: sha256=… against the raw bytes) or by polling:

job_id = client.submit("meeting.mp3")       # returns immediately, no waiting
# ...or have a webhook notified instead of polling:
client.submit("meeting.mp3", callback_url="https://you.example.com/hook")

status = client.get_job_status(job_id)      # .status: processing|completed|failed
if status.is_completed:
    result = client.get_transcript(job_id)  # downloads + parses
page = client.list_jobs(limit=50)           # {"jobs": [...], "next_before": ...}

The signature is HMAC-SHA256 over the raw request body, keyed with your account's own webhook signing secret — find it under API Keys in the console. Compare it with a constant-time function, and verify against the bytes you received rather than a re-serialised copy. Worked receivers for Python, Node, Go and C# are in the webhooks guide.

See examples/ for a full submit/poll/webhook walkthrough.

Robustness

SpeechRevolutions(max_retries=3, retry_backoff=0.5, proxies={"https": "..."}). Transient 429/5xx/network errors are retried (honoring Retry-After). Errors are typed (RateLimitError, AuthenticationError, …) and carry .status_code and .request_id for correlating with support.

Auth

export SPEECHREVOLUTIONS_API_KEY=stt_...

Or SpeechRevolutions(api_key="stt_...").

Other languages

Speech Revolutions also publishes SDKs for JavaScript/TypeScript, Go, and C#/.NET — see docs.speechrevolutions.com for a cross-language feature comparison.

License

MIT

Metadata

Release files for speechrevolutions 1.0.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for speechrevolutions 1.0.0
File Size Uploaded Provenance Actions
speechrevolutions-1.0.0.tar.gz 51.0 kB With provenance Details for speechrevolutions-1.0.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for speechrevolutions 1.0.0
File Interpreter ABI Platform Actions
speechrevolutions-1.0.0-py3-none-any.whl Python 3 none any Details for speechrevolutions-1.0.0-py3-none-any.whl

Total release size: 88.1 kB

Release files / speechrevolutions-1.0.0.tar.gz

Download URL speechrevolutions-1.0.0.tar.gz
Size 51.0 kB
Tags Source
SHA-256 checksum
How to use checksums
bef0380c29fbedf3edef1655d74b6dcd6ac853e6fc1b31adeb54faaea77c02d7
BLAKE2b-256 checksum
How to use checksums
31ff58bf5fe56399c219facb1bc8f3840dd194008d9f083ed8c92ac8f1ffe5a3
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 5, 2026.

Transparency log

Release files / speechrevolutions-1.0.0-py3-none-any.whl

Download URL speechrevolutions-1.0.0-py3-none-any.whl
Size 37.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
98ca31d224a5922473d87ca95b46792922d1e15eceffdd1c45f8d7f2e1c7058a
BLAKE2b-256 checksum
How to use checksums
080d60fa67d5819d2b7fce9eff370f774636ec462896bcca60d92f990bf76d8f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 5, 2026.

Transparency log

Security for speechrevolutions 1.0.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for speechrevolutions-1.0.0.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 5, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page