Moses for LiveKit Agents
livekit-plugins-moses adds Moses realtime speech-to-text and text-to-speech to LiveKit Agents. Audio, text and transcripts are processed in Germany and not stored. Keys: API console (with the TTS and STT scopes). Prices: pricing.
Install
pip install livekit-plugins-moses
Use
from livekit.agents import AgentSession
from livekit.plugins import moses, openai, silero
session = AgentSession(
vad=silero.VAD.load(),
stt=moses.STT(language="de"), # None detects the language
llm=openai.LLM(model="gpt-4.1-mini"),
tts=moses.TTS(voice="german/juergen", language="de"),
)
The key is read from MOSES_API_KEY unless you pass api_key.
- Speech to text: partial transcripts, start and end of speech, and the final as soon as the agent's turn handling flushes the stream: about 0.12 s later (measured from Germany, network included).
stt.recognize()transcribes whole recordings. - Text to speech: the LLM's text streams in as it is generated; first audio about 0.13 s after the first text. Connections are pooled and warmed up, so the next answer starts without a new handshake.
tts.synthesize()speaks a whole text. - Languages: STT
bg cs da de el en es et fi fr hr hu it lt lv mt nl pl pt ro ru sk sl sv uk; TTSen de fr it pt es nlwith 27 built-in voices and your own recorded voices (clone:<name>). - Runtime changes:
stt.update_options(language=…)applies to open streams;tts.update_options(voice=…)to the next answer.
Limits
Each agent session uses one STT stream and one TTS connection. Accounts start with 2 of each at once; ask via Support for more. A wrong key, a key without the needed scope or no credit raises a non-retryable error. Without the plugin, LiveKit's OpenAI plugin works too: OpenAI compatibility.
Source and example
Source, a complete agent example (python examples/agent.py console talks in the terminal) and the changelog: PyPI and GitHub. Tested with LiveKit Agents 1.9. Apache 2.0.