Does LiveKit provide a built-in pronunciation dict...
# ask-ai
a
Does LiveKit provide a built-in pronunciation dictionary or a similar mechanism to customize word pronunciations for Text-to-Speech (TTS) during a real-time audio stream?
t
Thanks for reaching out, Yunus. I'm an AI assistant and I'm here to help. Give me a moment while I research this topic.
LiveKit does not have a built-in pronunciation dictionary for Text-to-Speech (TTS). However, it supports customization of word pronunciations during real-time audio streaming through the use of Speech Synthesis Markup Language (SSML). This includes tags like
phoneme
for phonetic pronunciation and
lexicon
for custom dictionaries defining specific word pronunciations. Additionally, LiveKit offers a
before_tts_cb
callback in the
VoicePipelineAgent
class that lets you modify the text before sending it to the TTS engine, allowing you to replace words with preferred pronunciations. Certain TTS providers integrated with LiveKit, like ElevenLabs, also support custom pronunciations via SSML. So while LiveKit does not have a built-in dictionary, these mechanisms allow you to achieve customized and accurate pronunciations in your TTS streams. Sources: Agent speech | LiveKit Docs | VoicePipelineAgent | LiveKit Docs | VoicePipelineAgent | LiveKit Docs | ElevenLabs TTS integration guide | LiveKit Docs | Agent speech and audio | LiveKit Docs
a
Is function before_tts_cb available in the current version of LiveKit?
t
I don't have the answer you're looking for. You could also try asking your question: • in one of the other Slack channels or • to https://deepwiki.com/livekit/livekit_composite which is trained on all LiveKit source code If you find the answer, please post it here to help others!