Rime
Text-to-speech service implementation using Rime AI
Overview
RimeHttpTTSService
provides text-to-speech capabilities using Rime AI’s TTS service. It supports streaming audio output and various speech customization options.
You can obtain a Rime API key by signing up at Rime.
Configuration
Constructor Parameters
Rime API key
Rime voice identifier. See Rime’s documentation for supported voices.
Choose mist
for hyper-realistic conversational voices or v1
for Rime’s
first-gen model.
The value, if provided, must be between 4000 and 44100. Default: 24000
Speech generation parameters
Output Frames
Control Frames
Signals start of speech synthesis
Signals completion of speech synthesis
Audio Frames
Contains generated audio data with: - PCM audio format - Specified sample rate
- Single channel (mono)
Error Frames
Contains Rime TTS error information
Usage Example
Frame Flow
Metrics Support
The service collects processing metrics:
- Time to First Byte (TTFB)
- Character usage statistics
Notes
- Supports streaming audio output
- Configurable speech speed
- Latency optimization options
- Bracket-based text processing
- Thread-safe processing
- Automatic error handling
- Chunked audio delivery