brash-barista-66564
08/05/2025, 5:49 PMtall-airline-16756
08/05/2025, 5:49 PMtall-airline-16756
08/05/2025, 5:51 PMsonic-2-2025-03-07) when initializing the TTS instance with a custom voice ID. Example:
tts = cartesia.TTS(voice="your_custom_voice_id", model="sonic-2-2025-03-07")
• Error Handling: For the errors you mentioned:
◦ APIError: no audio frames were pushed for text: This occurs when no audio is generated. Verify the voice ID, ensure the text is valid, and check API quotas.
◦ RuntimeError: BufferedSentenceStream is closed: This happens if the stream is improperly managed. Ensure proper stream lifecycle management by closing and recreating streams as needed.
• Dynamic Updates: Use update_options to change the voice dynamically during runtime if needed.
If these steps do not resolve the issue, let me know, and we can explore further troubleshooting or alternative solutions.
Sources: livekit-plugins/livekit-plugins-elevenlabs/livekit/plugins/elevenlabs/tts.p...