๐ Section 08 โ Advanced Deployment & Tools
This section explores strategies for deploying Wyoming-based systems in real-world environments.
๐ณ Docker Deployment
Each Wyoming-compatible service can be containerized.
๐งฑ Basic Dockerfile Template
FROM python:3.11-slim
WORKDIR /app
COPY . .
RUN pip install .
CMD ["python", "your_service.py"]
๐งช Example Compose
version: "3.9"
services:
whisper-asr:
build: ./wyoming-faster-whisper
ports:
- "10200:10200"
piper-tts:
build: ./wyoming-piper
ports:
- "5002:5002"
๐ง System Architectures
1. ๐ฅ๏ธ Local All-in-One
- All services run on one host (e.g. Raspberry Pi or NUC)
- Pros: simple, fast, no networking
- Cons: resource-limited
2. ๐ Client-Server Model
- Satellites stream to central voice server
- Each component (ASR, TTS, Wake) in separate container
3. โ๏ธ Hybrid Cloud
- Local Wakeword + VAD
- Cloud Whisper for large model accuracy
- WebSocket gateway forwards audio to cloud
๐ก Multiservice Router
You can route events between multiple services using:
- Rhasspy Hermes MQTT
- Custom Python proxies
- Home Assistant Assist pipelines
๐งช Service Discovery
Use wyoming.zeroconf to advertise services over mDNS:
from wyoming.zeroconf import publish_service
publish_service("_wyoming._tcp", 10200, name="whisper")
Use with zeroconf browser tools like:
avahi-browse _wyoming._tcp -r
๐งฐ Debugging Tools
Test Connection
echo '{"type":"describe"}' | nc localhost 10200
Log Events
from wyoming.event import read_event
while True:
event = await read_event(reader)
print("Received", event.type)
๐ Security Considerations
- Wyoming has no authentication built-in
- Use firewall rules or secure tunnel (e.g. NGINX, SSH, VPN)
- Prefer
unix://sockets for local-only communication
๐งฑ Base Image Recommendations
python:3.11-slimfor most servicesdebian:bookwormfor services needingffmpeg,espeak-ng, etc.- Always pin model files via SHA or tag
๐ง Tips
- Run ASR and TTS in separate processes to avoid blocking
- Use
asyncioortriofor concurrency - Monitor CPU/GPU usage when tuning audio latency