Skip to main content

Rime API

Generated message definitions for Rime text-to-speech. Python and JavaScript packages use the same schema and release version.

Python

uv add rime-api
from rime_api import text_to_speech_pb2 as proto

request = proto.WebSocketRequest(context_id='turn-42', text='Hello.')
encoded = request.SerializeToString()

Python 3.10 or newer is required. The package includes type stubs. Its only runtime dependency is protobuf>=5.29.6. It does not require gRPC.

JavaScript and TypeScript

npm install @rimelabs/api @bufbuild/protobuf@^2.11.0
import { create, toBinary } from "@bufbuild/protobuf";
import { WebSocketRequestSchema } from "@rimelabs/api";
import type { WebSocketRequest } from "@rimelabs/api";

const request: WebSocketRequest = create(WebSocketRequestSchema, {
  contextId: "turn-42",
  payload: { case: "text", value: "Hello." },
});
const encoded = toBinary(WebSocketRequestSchema, request);

The package supports ESM and CommonJS and includes TypeScript declarations. Consumers that import @bufbuild/protobuf directly should declare it as a direct dependency too. Use its fromJson and toJson functions for the Rime JSON protocol. JSON.stringify does not implement the protobuf JSON mapping.

Scope and compatibility

These packages contain the full public TTS schema, including synthesis, normalization, language and speaker queries, and WebSocket envelopes. Framework adapters own connections, authentication, cancellation, and audio I/O. Service descriptors are included; gRPC client stubs are not included.

The protobuf package remains rime. The Python generator uses a virtual source path, rime_api/text_to_speech.proto, to obtain the Python import name. This changes the Python descriptor's file name, but preserves message names, service names, field numbers, and both wire formats. Do not load independently generated definitions of these same rime messages in one Python process.

The Python wheel, source archive, and npm archive include the exact Protobuf and AsyncAPI definitions and their SHA-256 hashes in SOURCE.json. In the wheel, the definitions are under rime_api/schema/. The other archives use schema/. Generated code is part of the distribution; installation requires no protobuf compiler or access to the Rime repository.

License

Copyright 2026 Rime. Licensed under the Apache License, Version 2.0. See LICENSE and NOTICE included in each distribution.

This license covers the public Protobuf and AsyncAPI definitions and the Rime-owned generated code and documentation in these distributions. It does not apply to other Rime monorepo components. Dependencies retain their own licenses.

Metadata

Release files for rime-api 0.0.2

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

Source distribution (sdist)

Source distribution for rime-api 0.0.2
File Size Uploaded
rime_api-0.0.2.tar.gz 17.1 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for rime-api 0.0.2
File Interpreter ABI Platform
rime_api-0.0.2-py3-none-any.whl Python 3 none any Details

Total release size: 38.4 kB

Release files / rime_api-0.0.2.tar.gz

Download URL rime_api-0.0.2.tar.gz
Size 17.1 kB
Tags Source
SHA-256 checksum
How to use checksums
28ab7af0a6b9020e39aad02a83b9ba74913393ef4ef6d7582b5707557098ffa1
BLAKE2b-256 checksum
How to use checksums
cf50d197d4d390b005db01ab1eb90008a3424fb4eecae7d63f7c4083cdd299ed
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.12.19 {"installer":{"name":"uv","version":"0.12.19","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release files / rime_api-0.0.2-py3-none-any.whl

Download URL rime_api-0.0.2-py3-none-any.whl
Size 21.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
04859b204e8a8cec64e6aa84e6399e0744849f37d6ac975b25a6963db38adfe3
BLAKE2b-256 checksum
How to use checksums
1e0091ed386c84d47d0e61821603a047d583196a055dfc5953cdf25817c32ecb
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.12.19 {"installer":{"name":"uv","version":"0.12.19","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release history Release notifications | RSS feed

0.4.0

2 release files

0.3.0

2 release files

0.2.0

2 release files

0.1.0

2 release files

This release

0.0.2 This release

2 release files

0.0.1

2 release files

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