Pi5 default sound from Fusion Hat i2s

I would like to get OS audio on Pi5 to go to the i2s audio built into the Fusion Hat.
The GoogleVoiceHat is already the device selected when right-clicking on the speaker icon on the desktop.
Right after boot, no sound comes out if say I play a youtube video.
However I will get sound from applications if I run a python script that does TTS first.

Ideas on how to activate audio on the fusion Hat that can be used by other apps without having to run a python script after boot?

We can create a startup script to activate the Fusion HAT audio chip.

  1. Create the service file:
    Run the following command:
    sudo nano /etc/systemd/system/wake-fusion-audio.service
    Then paste the following content into the file:

[Unit]

Description=Wake up Fusion HAT audio chip

After=sound.target multi-user.target

Wants=sound.target

[Service]

Type=oneshot

ExecStart=/usr/bin/python3 -c “from fusion_hat import device; device.enable_speaker()”

RemainAfterExit=yes

[Install]

WantedBy=multi-user.target

  1. Run these three commands to enable the script to start automatically on boot:
    sudo systemctl daemon-reload
    sudo systemctl enable wake-fusion-audio.service
    sudo systemctl start wake-fusion-audio.service

Seems crude to have to use Python to enable the speaker, but it does work.