main
🔊 3D Printed Multi-Room Smart Speaker
A complete guide to building a custom-designed, 3D-printed smart speaker. This project leverages a Raspberry Pi Zero 2 W for the client hardware and uses Music Assistant with Snapcast for sub-millisecond multi-room audio synchronization.
✨ Features
- Acoustically Optimized: Custom 3D printed enclosures designed to eliminate standing waves.
- Perfectly Synced: Snapcast integration ensures multi-room audio with zero echo.
- Centralized Control: Managed via Music Assistant and Home Assistant.
- Low Power: Client nodes run on highly efficient Raspberry Pi Zero 2 W boards.
🛠️ Hardware Prerequisites
The Client (Speaker Node)
- SBC: Raspberry Pi Zero 2 W
- Audio Output: HiFiBerry AMP2 (or similar I2S DAC/Amp HAT)
- Drivers: Raw speaker drivers (T/S parameters required for volume calculation)
- Power: High-quality 5V power supply
- Hardware: M3 heat-set brass inserts, M3 machine screws, Poly-fil (pillow stuffing), and adhesive weather-stripping (or TPU for a printed gasket).
🖨️ 3D Printing the Enclosure
To achieve true high-fidelity sound rather than a hollow plastic echo, the enclosure must be rigid, airtight, and acoustically tuned.
Acoustic Design
- Calculate Volume: Start with a sealed enclosure. Use the Thiele/Small (T/S) parameters of your chosen speaker driver to calculate the exact internal volume required.
- Ditch the Cube: Model the enclosure with swept curves, spheres, or teardrops. Curves prevent internal standing waves and add massive structural rigidity.
- Thick Baffle: Design the front face (where the speaker mounts) to be 15mm - 20mm thick.
Slicer Settings
- Material: PETG, ABS, or ASA. (Avoid PLA as it creeps under screw pressure and warps in heat).
- Walls over Infill: Aim for 3-4 perimeters to achieve a 2mm-3mm solid shell. Total wall thickness should be roughly 8mm-10mm.
- Infill: 15% - 40% Gyroid or Cubic infill for multi-directional strength.
Assembly
- Melt heat-set inserts into the mounting holes to prevent screws from backing out under vibration.
- Apply a gasket between the driver and the printed baffle to ensure an airtight seal.
- Loosely pack the interior with Poly-fil to slow internal sound waves and improve bass response.
💻 Software Deployment
1. The Server (Control Plane)
Music Assistant handles both the media library and the Snapcast server. Deploying via Docker Compose is the cleanest method for a dedicated server environment like TrueNAS.
Crucial Note: You must use network_mode: "host" so Music Assistant can dynamically allocate TCP ports for incoming audio streams without Docker bridge bottlenecks.
services:
music-assistant:
image: ghcr.io/music-assistant/server
container_name: music-assistant
restart: unless-stopped
network_mode: "host"
volumes:
- /path/to/your/appdata/music-assistant:/data
# Mount your local media directories (e.g., from your ZFS pool)
- /path/to/your/media:/media:ro
2. The Client (Pi Zero 2 W)
- Flash the Pi Zero 2 W with a lightweight OS like Raspberry Pi OS Lite.
- Install the Snapcast client daemon:
sudo apt update sudo apt install snapclient - Configure
snapclientto point to your Music Assistant server IP, connecting on port1704. - Configure your
/boot/config.txtto enable the I2S overlay for your specific DAC/Amp HAT.
🌐 Network Requirements
- Server: Wired Ethernet is highly recommended.
- Clients: A strong, stable 2.4GHz Wi-Fi connection.
- Ports: TCP
1704(Audio Stream) and TCP1705(Control/JSON-RPC) must be open.