Skip to main content
Parrot STT is Ringg’s speech-to-text engine. The 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.

Audio helpers

The streaming examples import these from audio_helpers.py. They use only the Python standard library.
To convert another file to this format, run ffmpeg -i input.mp3 -ac 1 -ar 16000 -sample_fmt s16 sample.wav.
For live audio, such as a microphone or a call leg, send each chunk as it is captured instead of reading a file. Chunks of 20 to 40 ms work best.

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 both Client 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 final transcript event for each spoken segment. Join the segments to build the full transcript. The session’s closing transcript event can have an empty transcription, so skip blank ones.
  • on_final: you mark each turn with start_speaking() and stop_speaking() (requires accept_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) after stop_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 a TimeoutConfig to Client(timeout=...). All values are in seconds.

Errors

All SDK exceptions are importable from ringglabs.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.
  • Reuse client instances in long-running services.
  • Set explicit timeout budgets via TimeoutConfig.
  • Log result.raw and event.raw for 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.