narrow-engineer-85614
09/24/2025, 6:33 PMtall-airline-16756
09/24/2025, 6:33 PMtall-airline-16756
09/24/2025, 6:34 PMtranslation_enabled=True and specifying your target languages with translation_target_languages. This way, the translation happens smoothly within the STT provider itself.
• Custom Translation Pipeline: Alternatively, you can create your own translation step. For example, after breaking the STT output into sentences using a sentence tokenizer, you can send each sentence to a custom translation function or class that leverages an LLM for translation.
Please feel free to reach out if you’d like me to share detailed examples or if you need any help implementing either of these methods—I’m here to support you!
Sources: Gladia integration guide | LiveKit Docs | livekit-plugins/livekit-plugins-gladia/README.md | VoicePipelineAgent | LiveKit Docs | Gladia integration guide | LiveKit Docsnarrow-engineer-85614
09/24/2025, 6:37 PMtall-airline-16756
09/24/2025, 6:38 PMtts_node method within a custom Agent class. This lets you gently intercept the text stream coming from the LLM, apply the translation you need, and then send the translated text on to the TTS engine for synthesis.
Here’s a friendly overview of how you can approach this:
• Override the tts_node method in your custom agent.
• Use an external translation API (like Google Translate) to translate the text chunks streamed from the LLM.
• Keep the streaming smooth by handling AsyncIterable[str], so you avoid any lag.
• Then, pass the translated text stream to the default TTS node for synthesis.
If you’d like, I’d be happy to walk you through a detailed code example to help you implement this. Just let me know!
Sources: Docs::Agents | livekit-plugins/livekit-plugins-gladia/livekit/plugins/gladia/stt.py | chain-of-thought-tts/agent.py | Agents 0.x migration guide | LiveKit Docsnarrow-engineer-85614
09/24/2025, 6:41 PMtall-airline-16756
09/24/2025, 6:41 PM