Moses for Pipecat
pipecat-moses adds Moses realtime speech-to-text and text-to-speech to Pipecat voice agents. Audio, text and transcripts are processed in Germany and not stored. Keys: API console (with the TTS and STT scopes). Prices: pricing.
Install
uv add pipecat-moses # or: pip install pipecat-moses
Use
import os
from pipecat_moses import MosesSTTService, MosesTTSService
stt = MosesSTTService(
api_key=os.environ["MOSES_API_KEY"],
settings=MosesSTTService.Settings(language="de"), # None detects the language
)
tts = MosesTTSService(
api_key=os.environ["MOSES_API_KEY"],
settings=MosesTTSService.Settings(voice="german/juergen", language="de"),
)
pipeline = Pipeline([transport.input(), stt, user_aggregator, llm, tts, transport.output(), assistant_aggregator])
- Speech to text: partial transcripts while the user speaks. When Pipecat's VAD hears the end of the turn, the service sends
flushand the final comes at once, about 0.15 s later (measured from Germany, network included). - Text to speech: the LLM's tokens are streamed as they arrive; Moses cuts clauses and sentences itself. First audio about 0.12 s after the first text. Interruptions stop the audio at once.
- 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: language, voice and endpoint through
STTUpdateSettingsFrame/TTSUpdateSettingsFrame, without reconnecting.
Settings
| Service | Setting | Default |
|---|---|---|
| STT | language | None (detect). Set it when you know it. |
| STT | endpoint_ms | 300: the server's own end-of-utterance pause (100–3000) |
| STT | flush_on_vad_stop (argument) | True |
| TTS | voice | alba; list: GET /tts/v1/voices |
| TTS | language | the voice's language |
| TTS | warmup (argument) | True: a voice worker is reserved for the connection |
Limits
Each bot 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 stops the service with an error instead of reconnecting. Without the plugin, Pipecat's OpenAI services work too: OpenAI compatibility.
Source and example
Source, a complete voice-agent example and the changelog: PyPI and GitHub. Tested with Pipecat 1.17. BSD 2-Clause.