bumpy-florist-37019
11/13/2025, 7:31 PMtall-airline-16756
11/13/2025, 7:31 PMtall-airline-16756
11/13/2025, 7:32 PMstream() method available through TTS plugins. This feature allows for low-latency audio synthesis over WebSocket connections, and it plays nicely alongside the traditional synthesize() method for non-streaming use cases.
Here are some important tips to make the integration as seamless as possible:
• Dual Modes: Feel free to use synthesize() when you want full-text synthesis, and switch to stream() whenever real-time streaming is your goal.
• Fallback Tokenization: If your provider doesn’t support native streaming, LiveKit cleverly uses a sentence tokenizer to mimic streaming behavior.
• Automatic Stream Pacing: You can enable text_pacing=True or customize timing with a SentenceStreamPacer to keep the audio flowing naturally between segments.
• Provider-Specific Implementations: For example, providers like ElevenLabs support WebSocket-based streaming, while others such as Google Cloud TTS use HTTP chunked streaming.
To ensure everything runs smoothly, it’s best to reserve streaming for real-time applications, handle any errors with care, and keep an eye on resource usage to prevent connection leaks. If you’d like, I’m here to provide more details or examples tailored to your specific provider—just let me know!
Sources: livekit-plugins/livekit-plugins-inworld/livekit/plugins/inworld/tts.py | Pipeline nodes and hooks | LiveKit docs | plugins/cartesia/src/tts.tsbumpy-florist-37019
11/13/2025, 7:34 PMtall-airline-16756
11/13/2025, 7:35 PMStreamAdapter class. Here’s a simple way to get started:
• Install the Rime Plugin: Just run pip install livekit-plugins-rime to get the plugin you need.
• Set Up Authentication: Make sure you have your Rime API key handy, and set it as an environment variable like this: export RIME_API_KEY=your_api_key_here.
• Simulate Streaming: By using StreamAdapter along with a sentence tokenizer, you can process text in chunks to mimic streaming. This works well with Rime’s current setup since it doesn’t support native streaming.
If you’d like, I’m happy to share detailed code examples or help you tailor this to your specific needs—just let me know!
Sources: livekit-plugins/livekit-plugins-rime/pyproject.toml | Rime TTS plugin guide | LiveKit docs | plugins/rime/src/models.ts | Rime TTS | LiveKit docs