How STT sends language to Turn Detection Module wh...
# ask-ai
a
How STT sends language to Turn Detection Module which makes Multilingual Model detect language?
t
Thanks for reaching out, Ali. I'm an AI assistant and I'm here to help. Give me a moment while I research this topic.
The Speech-to-Text (STT) plugin sends language information to the Turn Detection Module for the Multilingual Model through the following process: 1. STT Configuration: The STT plugin is configured with a
language
parameter. Setting it to
"multi"
enables automatic language detection. 2. Language Detection: The STT plugin detects the language of the user's speech using the underlying STT service, such as Deepgram. 3. Communication to Turn Detection Module: The detected language is passed to the MultilingualModel, which processes the text based on the identified language for accurate turn detection. Example Configuration:
Copy code
session = AgentSession(
    turn_detection=MultilingualModel(),
    stt=deepgram.STT(model="nova-3", language="multi"),
    # ... other configurations
)
This setup ensures that the STT automatically detects the language and passes it to the MultilingualModel for effective turn detection.
a
Whatif i specify langugae my self will Mulitiligual Model Also works?
t
Absolutely! The MultilingualModel will work as long as you specify a language in the STT configuration—and that language is supported by the model. It covers English plus 13 other languages like Spanish, French, German, Italian, Portuguese, Dutch, Chinese, Japanese, Korean, Indonesian, Turkish, Russian, and Hindi. Here’s a quick example of how to set it up:
Copy code
session = AgentSession(
    turn_detection=MultilingualModel(),
    stt=deepgram.STT(model="nova-3", language="es"),  # Just specify your language here
)
If you’d rather have it detect the language automatically, you can simply set the STT plugin’s language parameter to
"multi"
. Just a heads-up: if the language you pick isn’t supported or if the STT plugin doesn’t correctly identify the language, the turn detection might not work quite right. Sources: LiveKit turn detector plugin | LiveKit Docs | LiveKit turn detector plugin | LiveKit Docs
a
I have fintuned turn detector model on Urdu and added its thresold, tpr and tnr in languages.json files, and also its name as "key" and "values" , now i need to use that turn detector for Urdu and Also have STT which is finetuned on urdu. We want to make sure that language paramter is passed to Turn Detector. Guide me about this Step by Step
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!