I am using gpt-4o-transcribe model in azure open a...
# ask-ai
m
I am using gpt-4o-transcribe model in azure open ai service for stt , by default the language is english and detect language is false. But sometime i am getting the transcription in hindi and its breaking my tts. I am using the livekit agent and openai plugins. What can be the reason for it.
t
Thanks for reaching out, Gaurav. I'm an AI assistant and I'm here to help. Give me a moment while I research this topic.
Thanks so much for reaching out! To better understand the unexpected Hindi transcriptions you're experiencing, could you please help clarify a few things? • Are you using the STT through LiveKit’s plugin, or are you calling the Azure OpenAI API directly? • During your session, do you ever call the
.update_options()
method with a different language? • Are you working with the realtime API (
use_realtime=True
) or using standard transcription? • Is it possible that the audio stream contains a mix of Hindi and English speech, which might be causing some confusion for the model? • Are you explicitly passing
language="en"
both at initialization and when creating the stream? Getting these details will really help us figure out if the issue is related to configuration, the model’s behavior, or the environment setup. Looking forward to your response so we can get this sorted together! Sources: OpenAI and LiveKit | LiveKit Docs | Azure OpenAI STT plugin guide | LiveKit Docs | LiveKit turn detector plugin | LiveKit Docs | livekit-plugins/livekit-plugins-openai/livekit/plugins/openai/realtime/real... | OpenAI STT plugin guide | LiveKit Docs
m
I am using livekit plugin and using method penai.STT.with_azure. no during the session i am changing the agent and the stt is changed. no realtime is not used. yes the name is a indian name but we need it in english no i havent passed explicitly
t
When switching agents in LiveKit, the STT language settings can vary depending on how the new agent is set up: • If the new agent reuses the same STT instance, the language settings will stay the same. • If the new agent creates a new STT instance, the language settings will reset to that instance’s default configuration. • If the new agent explicitly sets language preferences, those new settings will take effect. Since you mentioned that the language isn’t explicitly passed during initialization, this default behavior might be why you’re seeing the issue. Also, if the audio includes strong Hindi speech patterns (like names), the model might still transcribe in Hindi even if the default language is English. To help ensure your transcription stays consistent in English, here are a few friendly tips: 1. Set the language explicitly to English (
language="en"
) when you initialize the STT instance for each agent. 2. Use the
update_options()
method to reinforce the language setting during runtime if needed. 3. Double-check that the STT instance isn’t being reinitialized with default settings when you switch agents. If you’d like, I’m here to help guide you through implementing these changes or troubleshooting your setup further. Just let me know! Sources: Azure OpenAI STT plugin guide | LiveKit Docs | livekit-plugins/livekit-plugins-azure/livekit/plugins/azure/__init__.py | docs/index.yaml
m
i am using this stt only for one agent and i have checked that default values are correct.
t
Thank you for sharing the details! Since you're using the STT for just one agent and the default values look good, the issue might be happening because of how the audio input is processed or how the language parameter is handled by the Azure OpenAI STT plugin. Let’s explore a few possibilities and some steps you can try to troubleshoot: • Audio Input: Sometimes, if the audio includes strong Hindi speech patterns (like names or accents), the model might still transcribe in Hindi even though the language is set to English. It could be helpful to test with clear, high-quality English-only audio to see if that makes a difference. • Language Enforcement: It’s a good idea to double-check that the
language="en"
parameter is correctly passed to the STT instance and isn’t getting overridden somewhere else in your setup or during runtime. • API Behavior: The Azure OpenAI STT plugin uses the OpenAI Realtime API, which supports multiple languages. However, it’s not fully confirmed whether the
language
parameter is strictly enforced when
detect_language=False
. This might need a bit more digging at the API request level. If you’re still facing issues, you might want to try the standalone Azure Speech STT plugin—it supports explicit multi-language configuration and automatic detection with language candidate sets, which might offer more flexibility. Please feel free to reach out if you’d like help with these steps or need any further debugging support. I’m here to help! Sources: OpenAI STT plugin guide | LiveKit Docs | livekit-plugins/livekit-plugins-turn-detector/README.md | LiveKit turn detector plugin | LiveKit Docs | Azure OpenAI STT plugin guide | LiveKit Docs | Azure Speech STT plugin guide | LiveKit Docs