I had Text-To-Speech (TTW) working really well with squeezelite and Home Assistant on a Raspberry Pi 3B with max2play (which now looks sadly defunct). I thought I would pep things up a bit and use a RPi4 elsewhere as a Speaker for HA so my music was not constantly destroyed.
Getting squeezelite to work was easy but could I get TTS to work? The mp3 file was created but squeezelite looped when trying to play it. Sad times.
I worked out that it played fine when the sample speed was increased and in all my searching hit upon the concept of “Upsampling”. Hmmm. Since I had originally used “apt get install sqeezelite -y” and found it hard to find any settings at all and had not yet really understood docker I took this opportunity to move to a docker setup. Happily one of the settings allowed the magic “Eq” that got things rolling along.
version: "3"
services:
squeezelite-my-usb-dac:
image: giof71/squeezelite:latest
container_name: squeezelite
devices:
- /dev/snd:/dev/snd
environment:
- SQUEEZELITE_AUDIO_DEVICE="hdmi:CARD=vc4hdmi1,DEV=0"
- SQUEEZELITE_NAME="Kitchen Panel"
- SQUEEZELITE_SERVER_PORT=192.168.0.60
- SQUEEZELITE_LOG_CATEGORY_ALL
- SQUEEZELITE_MAC_ADDRESS="45:07:31:83:01:40"
- DISPLAY_PRESETS=Y
- SQUEEZELITE_PARAMS="80:4::"
- SQUEEZELITE_UPSAMPLING="Eq"
restart: unless-stopped