Hey everyone, I'm using SSML tags in my LiveKit ag...
# agents
f
Hey everyone, I'm using SSML tags in my LiveKit agent and it works fine for speech, but the tags are showing up in the live transcription on screen. I've tried overriding
transcription_node
like this:
Copy code
async def transcription_node(self, text_stream: AsyncIterable[str], model_settings: ModelSettings):
    async for text in super().transcription_node(text_stream, model_settings):
        if self.filter_ssml:
            text = self.ssml_tag_pattern.sub("", text)
        yield text
This works for messages sent using session.say(), but responses generated by the LLM are still not filtered. Does anyone know a way to clean or remove the SSML tags from live transcription for LLM outputs as well? Thanks a lot!
p
You should put the modified text in the top of
tts_node
instead. And remember to set _`AgentSession(use_tts_aligned_transcript=False)`_
f
thanks for the answer, it is using the same method like override transcription_node?