LiveKit
Integrate Soniox Speech-to-Text and Text-to-Speech into LiveKit Agents.

Overview
LiveKit Agents is a real-time framework for building voice, video, and multimodal AI agents. It runs on top of LiveKit's WebRTC media transport, giving agents low-latency, reliable connections to users even on unstable networks, and ships with built-in turn detection, interruption handling, and telephony support.
An AgentSession orchestrates the speech-to-text, LLM, and text-to-speech components for each conversation. Soniox plugs in as two of these components:
soniox.STTtranscribes incoming user audio in real time using the Soniox real-time STT API.soniox.TTSsynthesizes the LLM's responses into speech using the Soniox real-time TTS API.
For more details on how LiveKit Agents work, check the LiveKit Agents documentation.
Installation
Install the Soniox plugin for LiveKit Agents:
You will also need to set up your Soniox API key as an environment variable:
You can obtain a Soniox API key by signing up at the Soniox Console.
Services
Use soniox.STT to transcribe user audio in real time, with language hints, context, and speaker diarization.
Use soniox.TTS to synthesize natural speech in 60+ languages over a streaming WebSocket connection.