Speech To Speech by Hugging Face is a low-latency, fully modular voice-agent pipeline - VAD -> STT -> LLM -> TTS - exposed through an OpenAI Realtime-compatible WebSocket API. Every component is swappable, and the LLM slot speaks OpenAI-compatible protocols, so you can point it at a hosted provider, at HF Inference Providers, or at a vLLM or llama.cpp server on your own hardware for a fully local, fully open stack. This pipeline runs in production as the conversation backend for thousands of Reachy Mini robots.
The pipeline supports four run modes: realtime (OpenAI Realtime protocol over WebSocket or WebRTC), local (direct microphone and speaker interaction), raw-websocket (raw PCM over WebSocket for minimal custom clients), and socket (raw PCM over TCP for remote server deployments).
Install with pip install speech-to-speech, then run speech-to-speech to start an OpenAI Realtime-compatible server at ws://localhost:8765/v1/realtime. Optional backends are installed with extras such as speech-to-speech[kokoro], speech-to-speech[pocket], speech-to-speech[chattts], and speech-to-speech[faster-whisper].