ringglabs Python SDK can transcribe a complete audio file in a single REST request, or stream live audio over a WebSocket and receive transcripts as the speaker talks. Every feature is available with a synchronous Client and an AsyncClient.
Parrot STT is in beta (SDK
v0.1.x, MIT licensed, Python 3.10+). Parameters and event fields may change before general availability.
To try transcription without writing code, upload a file or record from your microphone on the Parrot STT dashboard.
Quickstart
1
Install
Add the SDK to your environment:
2
Get an API key
In the Ringg dashboard open Settings → API Key and generate a workspace key (a UUID). Store it as
RINGG_API_KEY. Details: Authentication.The workspace needs at least one minute of credit to start a transcription.3
First call
Transcribe a local audio file:
SDK implementation
Pick the example that matches your audio source and execution model. The streaming examples read a WAV file and send it in 20 ms chunks. They use two small helpers, defined in Audio helpers below.- Sync stream
- Async stream
- On-final
- Offline
- Bytes / IO
Audio helpers
The streaming examples import these fromaudio_helpers.py. They use only the Python standard library.
audio_helpers.py
audio_helpers.py
ffmpeg -i input.mp3 -ac 1 -ar 16000 -sample_fmt s16 sample.wav.Client initialization
Client(...) and AsyncClient(...) share the same constructor. Both can be used as context managers (with / async with), which close the underlying connections on exit.
transcribe() (offline / REST)
Single-shot transcription of a complete audio file. Available on bothClient and AsyncClient (await client.transcribe(...)).
Response: RestTranscriptionResult
stream() (real-time / WebSocket)
Open a streaming session, send audio chunks, and receive transcript events. Use it as a context manager so the session is opened on entry and closed on exit.Stream and on-final modes
stream: the server detects pauses with its own voice activity detection (VAD) and sends a finaltranscriptevent for each spoken segment. Join the segments to build the full transcript. The session’s closingtranscriptevent can have an emptytranscription, so skip blank ones.on_final: you mark each turn withstart_speaking()andstop_speaking()(requiresaccept_client_vad_events=True). The server sends partial transcripts (is_final=False) that grow as the turn continues, then one final transcript (is_final=True) afterstop_speaking().
Session methods
The async session is identical, with
await on every call and async for on events().
WebSocket event types
Transcript event fields
Fields that don’t apply to an event are
None.
Timeouts
Pass aTimeoutConfig to Client(timeout=...). All values are in seconds.
Errors
All SDK exceptions are importable fromringglabs.stt and inherit from RinggLabsError.
Files larger than 10 MB are rejected with an
ApiError (status_code=413). Streaming sessions are limited to one hour.
Recommended practices
- Reuse client instances in long-running services.
- Set explicit timeout budgets via
TimeoutConfig. - Log
result.rawandevent.rawfor observability. - Use retries only for idempotent operations and transport failures.
- Keep sync and async execution models separate.
Next steps
Authentication
Generate and store your workspace API key.
Parrot STT dashboard
Try transcription in the browser and view logs, usage, and pricing.