ποΈ Wyoming System Architecture
Wyoming is designed to act as the connective tissue between small, modular services in a voice assistant system. These services communicate over simple socket-based connections using Wyoming events.
π§© Component-Based Design
A full voice assistant can be built from independent components:
[Mic] β [Wakeword] β [VAD] β [ASR] β [Intent] β [Handler] β [TTS] β [Speaker]
Each component runs independently, speaks the same protocol, and can be swapped out for another.
π Example Event Flow
Hereβs a simplified interaction flow:
- Wakeword detection triggers a pipeline start
- VAD determines when user has stopped speaking
- ASR transcribes the audio stream into text
- Intent recognizer interprets the text into structured meaning
- Handler processes the command and returns a result
- TTS converts the result back to speech
Each stage is loosely coupled, allowing fine-grained control, replacement, and scaling.
π Communication Methods
Wyoming supports multiple connection types:
| Transport | Use Case |
|---|---|
| TCP socket | Multi-host communication |
| Unix socket | Fast local communication |
| stdin/stdout | Embedded component process piping |
All transports speak the exact same protocol format.
π§± Microservice Separation
Each voice function lives in its own process:
| Component | Protocol Message Types |
|---|---|
| Wakeword | Detect, Detection |
| ASR | Transcribe, Transcript |
| TTS | Synthesize, AudioChunk |
| Intent | Recognize, Intent |
| Handle | Handled, NotHandled |
Each service can: - Be implemented in any language - Run on separate machines - Be restarted/upgraded independently
π§ Example Deployment
[ESP32 Mic] β Home Assistant Server
βββ wakeword: wyoming-openwakeword
βββ asr: wyoming-whisper
βββ tts: wyoming-piper
βββ handler: native Assist or custom
βββ speaker: USB audio or Pi audio
Everything communicates through Wyoming socket connections.
π§ͺ Test Pipelines
For development/testing, you can chain together services locally using Unix or TCP sockets, or embed components with subprocess pipes for easier control.