what is the paramters for using azure stt, i have ...
# ask-ai
l
what is the paramters for using azure stt, i have the key and region and i want to set it to mutilingual with english and arabic, show me how to
t
Thanks for reaching out, Computer. I'm an AI assistant and I'm here to help. Give me a moment while I research this topic.
You're asking how to configure Azure STT in LiveKit to use English and Arabic. Below are the parameters and a concise example you can use. Parameters •
speech_key
— your Azure Speech API key (string) •
speech_region
— Azure region for the resource (string), e.g.,
eastus
•
languages
— list of language codes to enable multilingual detection (list[string]), e.g.,
["en-US","ar-EG"]
Python example
Copy code
from livekit.plugins import azure
from livekit.agents import AgentSession

stt = azure.STT(
    speech_key="<YOUR_SPEECH_KEY>",
    speech_region="<YOUR_SPEECH_REGION>",
    languages=["en-US","ar-EG"]
)

session = AgentSession(
    stt=stt,
    # other components...
)
Environment variable alternative • Set
AZURE_SPEECH_KEY
and
AZURE_SPEECH_REGION
in env, then instantiate with only `languages`:
Copy code
stt = azure.STT(languages=["en-US","ar-EG"])
Notes • Provide the
languages
list to enable multilingual detection; otherwise a monolingual (English) model is used. • Use the specific Arabic locale you need (e.g.,
ar-EG
) if you want regional accuracy. Would you like the same example in another language (JS) or help testing a sample audio file? Sources: Azure Speech STT plugin guide | LiveKit Docs
l
do we have kuwait arabic?
t
I checked — the LiveKit docs confirm Azure Speech supports Arabic generally, but they do not list specific regional dialects like Kuwaiti Arabic (
ar-KW
). To confirm whether Azure Speech-to-Text specifically supports Kuwaiti Arabic, check Microsoft's supported languages page for Speech-to-Text: https://learn.microsoft.com/en-us/azure/ai-services/speech-service/language-support If
ar-KW
isn't listed, use a nearby Arabic locale (for example
ar-EG
or
ar-SA
) in
languages
— Azure will transcribe Modern Standard Arabic and many regional variants, though dialect accuracy can vary. Would you like me to test with
ar-EG
in your LiveKit config example? Sources: Azure Speech STT plugin guide | LiveKit Docs
l
TypeError: STT.__init__() got an unexpected keyword argument 'languages'. Did you mean 'language'? 102812.727 ERROR livekit.agents unhandled exception while running the job task Traceback (most recent call last): File "C:\Users\AaronFrancis\Desktop\my work\vscode\research\arabic agent\.venv\Lib\site-packages\opentelemetry\util\_decorator.py", line 71, in async_wrapper return await func(*args, **kwargs) # type: ignore ^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\AaronFrancis\Desktop\my work\vscode\research\arabic agent\.venv\Lib\site-packages\livekit\agents\ipc\job_proc_lazy_main.py", line 284, in _traceable_entrypoint await self._job_entrypoint_fnc(job_ctx) File "C:\Users\AaronFrancis\Desktop\my work\vscode\research\arabic agent\agent.py", line 129, in entrypoint await session.start(agent=KuwaitiAgent(azure_client), room=ctx.room) ~~~~~~~~~~~~^^^^^^^^^^^^^^ File "C:\Users\AaronFrancis\Desktop\my work\vscode\research\arabic agent\agent.py", line 62, in init stt=azure.STT( ~~~~~~~~~^ languages=["en-US", "ar-EG"] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ), ^ TypeError: STT.__init__() got an unexpected keyword argument 'languages'. Did you mean 'language'?
t
You're seeing that TypeError because the Azure STT plugin expects the parameter named
speech_languages
(not
languages
). Use
speech_languages
and you can include
ar-KW
for Kuwaiti Arabic. Corrected example:
Copy code
from livekit.plugins import azure
from livekit.agents import AgentSession

stt = azure.STT(
    speech_key="<YOUR_SPEECH_KEY>",
    speech_region="<YOUR_SPEECH_REGION>",
    speech_languages=["en-US", "ar-KW"]
)

session = AgentSession(stt=stt)
If you prefer env vars, set
AZURE_SPEECH_KEY
and
AZURE_SPEECH_REGION
and instantiate with only
speech_languages
. If you still get errors, please tell me: • your livekit-agents package version • the exact init call you now have (redact keys) Sources: Azure Speech STT plugin guide | LiveKit Docs