Skip to main content
The Rime SDK is a client library for your backend. It streams text-to-speech (TTS) and speech-to-text (STT) over gRPC with TLS, and one client does both. Run the SDK on your backend, where your API key stays. Browsers and mobile apps connect to your backend, not to Rime. The SDK manages the connection, sends your API key, converts audio, and tracks the protocol state of each stream. Your application captures audio, plays it, and decides when a speaker has finished. Python, Node.js, Go, and Rust each have a package. All four packages are in alpha, and a new alpha release can change the API. Pin the exact version that you tested with, as the install commands below do.

Packages and versions

This reference documents these releases. Each install tab below lists the runtime requirements for its language.

Install

Run the command for your language in your application directory. The command pins the version from the table above. The commands use macOS or Linux shell syntax.
You need Python 3.11 or later. Use uv to add the package to your project:

Set your API key

When you create the client, the SDK reads your key from RIME_API_KEY. If you pass a key in the client configuration, the SDK uses that key instead. The SDK does not read .env files. If you do not have a key, create one. Then set it in the environment that runs your backend:
The other client settings are model, endpoint, and timeout. They apply only to TTS. STT always connects to stt.api.rime.ai:443, and you set its timeout on each stream call.

Guides and examples

Start from the Rime SDK repository. Each language has a README with a quick start, and the guides and runnable examples are next to the SDK source. The reference pages here list the methods, options, defaults, and errors. To try STT on a hosted sample recording first, follow the speech-to-text quickstart.

SDK reference

STT reference

The stream call, recognition options, audio sources, partial and final results, cancellation, limits, and errors in each language.

TTS reference

The stream and synthesize calls, client and synthesis options, audio formats, voice discovery, and errors in each language.
To call Rime without the SDK, use the STT WebSocket and gRPC APIs or the TTS HTTP and WebSocket APIs.