clever-apartment-50437
09/15/2025, 2:54 PMtall-airline-16756
09/15/2025, 2:54 PMtall-airline-16756
09/15/2025, 2:55 PMpip install "livekit-agents[openai]~=1.2"
2. Set Up Authentication: Make sure to provide your OpenAI API key, either directly in your code or as an environment variable:
OPENAI_API_KEY=your_openai_api_key
3. Initialize STT: To get started with transcription, create an instance of OpenAI STT in Python like this:
from livekit.plugins import openai
stt_instance = openai.STT(
model="gpt-4o-transcribe", # or "whisper-1"
language="en"
)
4. Streaming Support: If you'd like real-time transcription, just set use_realtime=True when initializing.
5. Azure OpenAI: And if you're using Azure OpenAI, you can configure it easily with the with_azure() method to set the endpoint and API key.
For more detailed info, feel free to check out the Voice AI Quickstart Guide. If you have any questions or need a hand with anything, just let me know—I'm here to help!
Sources: OpenAI STT integration guide | LiveKit Docs | livekit-plugins/livekit-plugins-baseten/livekit/plugins/baseten/stt.py | plugins/openai/src/stt.test.ts | Azure OpenAI STT integration guide | LiveKit Docs | OpenAI STT integration guide | LiveKit Docsclever-apartment-50437
09/15/2025, 3:05 PMtall-airline-16756
09/15/2025, 3:06 PMclever-apartment-50437
09/15/2025, 3:07 PMclever-apartment-50437
09/15/2025, 3:08 PMtall-airline-16756
09/15/2025, 3:08 PMStreamAdapter. Here’s how you can do it:
from livekit.agents import Agent
from livekit.plugins import openai, silero
stt = openai.STT() # Non-streaming STT
vad = silero.VAD.load()
agent = Agent(stt=stt, vad=vad) # VAD enables streaming
2. Manually Wrap STT in a StreamAdapter: Another approach is to use a StreamAdapter yourself, which buffers the audio and simulates streaming. Here’s a quick example:
from livekit.agents import stt as lk_stt
from livekit.plugins import openai, silero
whisper_stt = openai.STT()
vad = silero.VAD.load()
stt = lk_stt.StreamAdapter(stt=whisper_stt, vad=vad)
agent = Agent(stt=stt)
If you’d like, I’m here to help you step-by-step with these solutions or answer any other questions you might have. Just let me know!
Sources: agents/src/stt/stt.ts | tests/test_stt.py | Speech-to-text (STT) integrations | LiveKit Docs | Working with plugins | LiveKit Docstall-airline-16756
09/15/2025, 3:08 PMfrom livekit.agents import Agent
from livekit.plugins import openai, silero
stt = openai.STT() # Non-streaming STT
vad = silero.VAD.load()
agent = Agent(stt=stt, vad=vad) # Enables streaming
2. Manually Wrap STT in a StreamAdapter: Another way is to use a StreamAdapter to buffer audio and process it with VAD.
from livekit.agents import stt as lk_stt
from livekit.plugins import openai, silero
whisper_stt = openai.STT()
vad = silero.VAD.load()
stt = lk_stt.StreamAdapter(stt=whisper_stt, vad=vad)
agent = Agent(stt=stt)
If you have any questions or need a hand with setting this up, please don’t hesitate to reach out—I’m here to help!clever-apartment-50437
09/15/2025, 3:34 PMtall-airline-16756
09/15/2025, 3:34 PMlivekit-plugins/livekit-plugins-speechify directory. If you have any questions or need more help, just let me know—I'm here for you!
Sources: livekit-plugins/livekit-plugins-speechify/livekit/plugins/speechify/log.py