red-optician-55467
10/29/2025, 4:45 PMtall-airline-16756
10/29/2025, 4:45 PMtall-airline-16756
10/29/2025, 4:46 PMuse_streaming=True. Let's work through this together! Here are some helpful steps you can try to get things back on track:
1. SSML Compatibility: Make sure enable_ssml=False when using use_streaming=True, since Google's streaming API doesn’t support SSML input. This little detail can make a big difference!
2. Audio Encoding: Double-check that your audio_encoding is set to either OGG_OPUS or PCM, as these are the formats required for streaming.
3. Authentication: It’s important to confirm your credentials are set up correctly and have the right permissions. Whether you’re using a credentials file, dictionary, or Application Default Credentials, this step ensures smooth access.
4. Location Parameter: Take a look at the location parameter. If it’s anything other than "global," remember the API endpoint changes to {location}-texttospeech.googleapis.com.
5. Input Validation: Try testing with simple plain text first and avoid SSML tags. Also, ensure your text is UTF-8 compatible and formatted properly to prevent hiccups.
6. Network Connectivity: Sometimes network issues or firewall restrictions can block the streaming API endpoint. It’s worth verifying that your connection allows this traffic.
7. Monitor Logs: Keep an eye on your logs for any warnings or errors, like encoding fallback warnings or API timeout messages. These clues can be really helpful in pinpointing the issue.
Give these a try, and please don’t hesitate to reach out if the problem continues or if you’d like me to walk you through any of these steps. I’m here to help!
Sources: examples/other/text-to-speech/rime_tts.py | Google Cloud TTS integration guide | LiveKit Docsred-optician-55467
10/29/2025, 5:17 PMtall-airline-16756
10/29/2025, 5:18 PMstreamed=False flag in the TTSMetrics is showing because the TTS plugin is switching to non-streaming mode, even though you have use_streaming=True set. This usually happens when some features that aren’t compatible with streaming are turned on:
1. SSML: Please make sure enable_ssml=False, since SSML isn’t supported in streaming mode.
2. Markup: Also, check that use_markup=False, because markup (which is used for HD voices) doesn’t work with streaming either.
Once both enable_ssml and use_markup are turned off, the plugin should work in streaming mode, and you’ll see streamed=True in your TTSMetrics logs. Also, double-check that you’re using the tts.stream() method instead of tts.synthesize(), as the former is what enables streaming explicitly.
Please feel free to reach out if this doesn’t solve the problem or if you need any more help—I’m here for you!
Sources: livekit-agents/livekit/agents/tts/fallback_adapter.py | Logs, metrics, and telemetry | LiveKit Docsred-optician-55467
10/29/2025, 5:24 PMtts.stream() or tts.synthesize() methods. I'm just using an AgentSession with the TTS configuration
google.TTS(
language=tts_data['language'],
voice_name=f"{tts_data['language']}-{tts_data['voice']}",
audio_encoding=texttospeech.AudioEncoding.OGG_OPUS,
use_streaming=True
)
As you can see the audio encoding is properly set, the streaming is set to true and the voice I will be using is Chirp3-HD-Achernar.tall-airline-16756
10/29/2025, 5:25 PMred-optician-55467
10/29/2025, 6:38 PMred-optician-55467
10/29/2025, 6:40 PM