steep-balloon-41261
08/06/2025, 5:29 PMtall-airline-16756
08/06/2025, 5:29 PMtall-airline-16756
08/06/2025, 5:29 PMgray-table-99495
08/06/2025, 5:33 PMtall-airline-16756
08/06/2025, 5:34 PMgray-table-99495
08/06/2025, 5:37 PMFrom user: Nineteen seventy.. Interrupted: False
tall-airline-16756
08/06/2025, 5:37 PMfrom livekit.agents import tts
from livekit.plugins import cartesia
def process_text(text):
# Uses the built-in number to words conversion
return replace_numbers_with_words(text)
This helps make sure the numbers are formatted just right for TTS. 2. Use a Fallback Adapter: You can also set up a fallback system that smoothly switches to backup TTS providers if the main one runs into trouble:
from livekit.agents import tts
session = AgentSession(
tts=tts.FallbackAdapter([
cartesia.TTS(),
# Additional fallback TTS providers
])
)
This way, it tries the backups and keeps an eye on the main provider’s health. If you want, I’m here to help you get these set up or answer any questions! Sources: tools/tts/tts.cpp | Events and error handling | LiveKit Docsgray-table-99495
08/06/2025, 5:40 PMtall-airline-16756
08/06/2025, 5:40 PM