echoing-lamp-18687
01/02/2026, 7:05 AMtall-airline-16756
01/02/2026, 7:05 AMtall-airline-16756
01/02/2026, 7:05 AMechoing-lamp-18687
01/02/2026, 7:06 AMtall-airline-16756
01/02/2026, 7:06 AMechoing-lamp-18687
01/02/2026, 10:00 AMtall-airline-16756
01/02/2026, 10:00 AMpip install "livekit-agents[whisper]"
Steps (high level)
1. Start your Whisper server and confirm the transcription endpoint (example: `http://localhost:8000/v1/audio/transcriptions`).
2. Create a Whisper STT plugin instance that points to your endpoint.
3. Create an AgentSession with that STT instance and start the session in your LiveKit room.
4. Optionally add VAD (Silero) for better turn-detection and to reduce unnecessary transcriptions.
Minimal Python example
import asyncio
from livekit.agents import AgentServer, AgentSession, JobContext
from livekit.plugins import whisper
server = AgentServer()
# Point to your self-hosted Whisper endpoint
stt = whisper.WhisperSTT(endpoint="<http://localhost:8000/v1/audio/transcriptions>")
@server.rtc_session()
async def entrypoint(ctx: JobContext):
session = AgentSession(stt=stt)
@session.on("user_input_transcribed")
def on_transcript(transcript):
if transcript.is_final:
print("Final transcript:", transcript.text)
await session.start(room=ctx.room)
await ctx.connect()
if __name__ == "__main__":
server.run()
Notes and tips
• Endpoint shape: if your server uses a non‑standard API, extend the STT base class or wrap requests so the plugin can POST audio and parse responses.
• Streaming/latency: use a Whisper server that supports streaming or chunked requests for lower latency; quantized models or GPU inference reduce latency.
• Language and model: choose a Whisper model size appropriate for accuracy vs CPU/GPU cost. Larger models give better Hindi/Hinglish accuracy.
• Authentication: if your Whisper server requires auth, ensure your wrapper adds headers (you may need to modify the plugin instance to pass auth).
• VAD: adding Silero VAD improves efficiency by sending audio only when voice is detected.
If you want, tell me:
• which Whisper server you’re running (whisper.cpp, faster-whisper, or a specific wrapper),
• the endpoint URL and whether it needs auth,
and I’ll give the exact config snippet or a small custom STT adapter you can drop into your Agent.
Sources: An open source stack for real-time multimodal AI | Agents Framework | livekit/livekit_composite | DeepWiki | Transcriber | LiveKit docs | STT Metrics | LiveKit docs | LiveKit Docs