Overview
RimeSTTService transcribes speech with Rime’s streaming recognition. Rime transcribes one utterance per stream, so the service streams each VAD speech segment as its own request and pushes interim transcripts followed by one final.
Rime STT API Reference
Pipecat’s API methods for Rime STT integration
Example Implementation
Complete example with Rime STT
Rime Documentation
Official Rime API documentation
Installation
Prerequisites
Rime Account Setup
Before usingRimeSTTService, you need:
- Rime Account: Sign up at Rime AI
- API Key: Generate an API key from your account dashboard
Required Environment Variables
RIME_API_KEY: Your Rime API key for authentication
Voice Activity Detection
RimeSTTService starts a request on VADUserStartedSpeakingFrame and ends it on VADUserStoppedSpeakingFrame. Use the user aggregator’s VAD analyzer or a VADProcessor so these frames reach the service.
Configuration
RimeSTTService
str | None
default:"None"
Rime API key. When
None, the RIME_API_KEY environment variable is used.int | None
default:"None"
Audio sample rate in Hz. When
None, the pipeline’s input sample rate is
used. Rime takes 8000, 16000, 24000, and 48000 Hz; any other rate is resampled
to 16000 Hz before sending.float | None
default:"RIME_TTFS_P99"
P99 latency from speech end to final transcript, in seconds. Override it for
your deployment. See the STT
benchmark.
Settings
Runtime-configurable settings passed via thesettings constructor argument using RimeSTTService.Settings(...). These can be updated mid-conversation with STTUpdateSettingsFrame, and apply to speech segments that start afterwards. See Service Settings for details.
The constructor raises
ValueError for an invalid value or a non-empty extra. An invalid settings update pushes an ErrorFrame and leaves the settings unchanged.
Usage
Basic Setup
With Context Terms
Notes
- Segment length: A speech segment that runs about 90 to 110 seconds without a pause fails with no transcript.
- Transcript order: Finals are pushed in speech order. When the user resumes speaking before an earlier segment’s final arrives, only the latest segment’s final finalizes the turn.
- Errors: A failed request pushes a non-fatal
ErrorFramenaming the Rime error type and request ID.