Skip to content

๐Ÿš€ 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:


๐Ÿงช 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-slim for most services
  • debian:bookworm for services needing ffmpeg, espeak-ng, etc.
  • Always pin model files via SHA or tag

๐Ÿง  Tips

  • Run ASR and TTS in separate processes to avoid blocking
  • Use asyncio or trio for concurrency
  • Monitor CPU/GPU usage when tuning audio latency