Overview
Rime AI provides two TTS service implementations:RimeTTSService (WebSocket-based) with word-level timing and interruption support, and RimeHttpTTSService (HTTP-based) for simpler use cases. RimeTTSService is recommended for real-time interactive applications.
Rime TTS API Reference
Pipecat’s API methods for Rime TTS integration
Example Implementation
Complete example with word timestamps
Rime Documentation
Official Rime WebSocket and HTTP API documentation
Voice Models
Explore available voice models and features
Installation
To use Rime services, install the required dependencies:Prerequisites
Rime Account Setup
Before using Rime TTS services, you need:- Rime Account: Sign up at Rime AI
- API Key: Generate an API key from your account dashboard
- Voice Selection: Choose from available voice models
Required Environment Variables
RIME_API_KEY: Your Rime API key for authentication
Customizing Speech
RimeTTSService provides a set of helper methods for implementing Rime-specific customizations, meant to be used as part of text transformers. These include methods for spelling out text, adjusting speech rate, and modifying pitch. See the Text Transformers for TTS section in the Text-to-Speech guide for usage examples.
SPELL(text: str) -> str:
Implements Rime’s spell function to spell out text character by character.PAUSE_TAG(seconds: float) -> str:
Implements Rime’s custom pause functionality to generate a properly formatted pause tag you can insert into the text.PRONOUNCE(self, text: str, word: str, phoneme: str) -> str:
Convenience method to support Rime’s custom pronunciations feature. It takes a word and its desired phoneme representation, returning the text with the provided word replaced by the appropriate phoneme tag.INLINE_SPEED(self, text: str, speed: float) -> str:
A convenience method to support Rime’s inline speed adjustment feature. It will wrap the provided text in the[] tags and add the provided speed to the inlineSpeedAlpha field in the request metadata.