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. 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.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

rime_api-0.0.1.tar.gz (17.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

rime_api-0.0.1-py3-none-any.whl (21.3 kB view details)

Uploaded Python 3

File details

Details for the file rime_api-0.0.1.tar.gz.

File metadata

  • Download URL: rime_api-0.0.1.tar.gz
  • Upload date:
  • Size: 17.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.12.10 {"installer":{"name":"uv","version":"0.12.10","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}

File hashes

Hashes for rime_api-0.0.1.tar.gz
Algorithm Hash digest
SHA256 399985b3cfd0346f2c710a12a5ff609a7584a0e42443a690d75449958e5b6065
MD5 e54dde68c7d0df7fc782aa6207d5adce
BLAKE2b-256 6b65b56e9f8f2215cc5f53a5240debc76c6bc4b2a919a5950dd3699c4ef78814

See more details on using hashes here.

File details

Details for the file rime_api-0.0.1-py3-none-any.whl.

File metadata

  • Download URL: rime_api-0.0.1-py3-none-any.whl
  • Upload date:
  • Size: 21.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.12.10 {"installer":{"name":"uv","version":"0.12.10","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}

File hashes

Hashes for rime_api-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 75d4244a8fa3a5a828774fea853968376baa514756d779e47fb2c0a84b9d5ffe
MD5 29b512420fe84f1f22bcad943d75a65f
BLAKE2b-256 3691a90aaab25be635286ac79d2fa6b83940ea284485d83b30bb88fd66d84497

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

0.0.1 This release

2 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