diff --git a/backend/open_webui/routers/audio.py b/backend/open_webui/routers/audio.py index 3156078326..65d17d53dd 100644 --- a/backend/open_webui/routers/audio.py +++ b/backend/open_webui/routers/audio.py @@ -492,7 +492,7 @@ async def speech(request: Request, user=Depends(get_verified_user)): region = request.app.state.config.TTS_AZURE_SPEECH_REGION or "eastus" base_url = request.app.state.config.TTS_AZURE_SPEECH_BASE_URL language = request.app.state.config.TTS_VOICE - locale = "-".join(request.app.state.config.TTS_VOICE.split("-")[:1]) + locale = "-".join(request.app.state.config.TTS_VOICE.split("-")[:2]) output_format = request.app.state.config.TTS_AZURE_SPEECH_OUTPUT_FORMAT try: