future-ocean-83972
03/03/2026, 3:20 PMtall-airline-16756
03/03/2026, 3:20 PMtall-airline-16756
03/03/2026, 3:21 PMgpt-4o-transcribe or gpt-4o-transcribe-diarize as the STT model for your LiveKit agent.
Below are the practical steps to get this working, plus a few tips and options you can tune.
1) Install the OpenAI plugin for LiveKit Agents
• Run:
uv add "livekit-agents[openai]~=1.4"
2) Configure Azure credentials and API version
• Set these environment variables:
◦ AZURE_OPENAI_API_KEY=<your-azure-openai-api-key>
◦ AZURE_OPENAI_ENDPOINT=https://<your-resource>.<http://openai.azure.com|openai.azure.com>
◦ OPENAI_API_VERSION=2024-08-01-preview (or the version that supports the transcribe models)
3) Create the STT plugin pointing at your Azure deployment
• Use openai.STT.with_azure() to connect the plugin to your Azure-hosted model.
• Example (Python):
from livekit.plugins import openai
from livekit import agents
stt = openai.STT.with_azure(
model="gpt-4o-transcribe", # or "gpt-4o-transcribe-diarize"
azure_endpoint="${AZURE_OPENAI_ENDPOINT}",
api_key="${AZURE_OPENAI_API_KEY}",
api_version="${OPENAI_API_VERSION}",
# optional: azure_deployment="your_deployment_name",
# optional: language="en"
)
session = agents.AgentSession(
stt=stt,
# ... configure llm, tts, etc.
)
4) Which model to pick
• gpt-4o-transcribe — standard transcription.
• gpt-4o-transcribe-diarize — includes speaker diarization when that feature is enabled for your Azure deployment. Use this if you need speaker separation.
5) Deployment name vs model name
• If your Azure deployment uses a different deployment name than the model identifier, provide that name with an `azure_deployment`/`azure_deployment_name` option (check your plugin syntax). If you don’t specify it, the plugin may try to use the model string directly—so pass your actual deployment name if different.
6) Optional parameters worth checking
• language — explicitly set the input audio language if you want to force a language.
• Diarization settings — diarization support depends on your Azure deployment configuration. If diarization is required, ensure the Azure deployment has diarization enabled and use the gpt-4o-transcribe-diarize model.
7) Realtime / low-latency use
• For real-time streaming use cases, consider the Realtime API integration path. The same models can be used through the Realtime flow when Azure and the plugin support it.
Quick checklist to verify if something doesn’t work
• Is the Azure deployment active and accessible from your environment?
• Does your API key have permission to call that deployment?
• Are you using the correct OPENAI_API_VERSION matching support for the transcribe models?
• If using diarization, is diarization enabled on the Azure deployment and are you using the gpt-4o-transcribe-diarize model name or deployment name?
If you want, tell me:
• Which language(s) you’ll transcribe,
• Whether you need diarization and real-time streaming,
• The SDK/language you’re using (Python, JS, etc.), and
I’ll give the exact code snippet or configuration for that case.
Sources: OpenAI STT plugin guide | LiveKit Documentation | Azure OpenAI STT plugin guide | LiveKit Documentation | Azure OpenAI Realtime API and LiveKit | LiveKit Documentationfuture-ocean-83972
03/03/2026, 3:27 PMtall-airline-16756
03/03/2026, 3:27 PMgpt-4o-transcribe STT model in Python for real-time transcription of Estonian, Russian, and English, and whether you need to set output="text".
Short answers
• Use the LiveKit OpenAI plugin and connect via openai.STT.with_azure(...) pointing at your Azure endpoint and key.
• Real-time streaming is supported when you run the STT inside an AgentSession; audio frames are streamed and transcriptions are produced in real time.
• Specify the language parameter for best accuracy (especially for Estonian). If you know the speaker’s language, set it explicitly.
• You do NOT need to set output="text" — plain text transcription is the default output.
What to configure (practical checklist)
• Environment:
◦ AZURE_OPENAI_API_KEY — your Azure OpenAI key
◦ AZURE_OPENAI_ENDPOINT — e.g. https://<your-resource>.openai.azure.com
◦ OPENAI_API_VERSION — e.g. 2024-08-01-preview (match a version that supports transcribe models)
• Model / deployment:
◦ Use model="gpt-4o-transcribe" for standard transcription.
◦ You can use gpt-4o-transcribe-diarize only if you require diarization (you said you don’t), and diarization must be enabled in your Azure deployment.
◦ If your Azure deployment uses a custom deployment name, pass that deployment name via the plugin option (e.g., azure_deployment).
• Language:
◦ For best Estonian accuracy, set language="et".
◦ Use language="ru" for Russian and language="en" for English.
◦ If you must handle mixed-language sessions dynamically, route audio to the appropriate STT instance or language-aware flow — the plugin expects a language code for best results.
Python example
from livekit.plugins import openai
from livekit.agents import AgentSession
# Example: Estonian transcription
stt_et = openai.STT.with_azure(
model="gpt-4o-transcribe",
azure_endpoint="https://<your-resource>.<http://openai.azure.com|openai.azure.com>",
api_key="<YOUR_AZURE_OPENAI_API_KEY>",
api_version="2024-08-01-preview",
language="et",
# azure_deployment="your_deployment_name" # include if deployment name != model name
)
# Create session (real-time streaming is handled when audio frames arrive)
session = AgentSession(
stt=stt_et,
# configure llm, tts, etc.
)
Notes about multilingual realtime usage
• If you know each user’s language beforehand, initialize the STT with that language for each user/session.
• If you expect frequent language switches within a single stream, you’ll need a strategy to detect language (a lightweight detection step) and switch routing to the correct STT instance. The plugin requires a language code for best results and does not auto-detect reliably for multilingual streams.
• For your voice bot latency needs, real-time streaming with AgentSession will provide interim/final transcripts as audio is streamed.
About output format
• The STT model returns plain text transcripts by default. There’s no output="text" parameter you must set for basic transcription — text is the standard output.
If you want, next I can:
• Provide a ready-made Python example showing how to switch STT instances per participant language in a LiveKit session.
• Show an example that handles interim vs final transcripts and integrates them into a voice-bot turn flow.
• Help verify the exact azure_deployment name and required environment variables for your setup.
Which of those would you like next?
Sources: Azure OpenAI STT plugin guide | LiveKit Documentation