I'm on Raspberry pi 4 and the OS is DietPi
I configured ALSA so I could play an audio file successfully through HDMI using
aplay [an audio file]
Then launched the PyQt5 app but got
PulseAudioService: pa_context_connect() failed.
So installed PulsAaudio and enabled its service.
[Unit] Description=Sound Service [Service] Type=notify ExecStart=/usr/bin/pulseaudio --daemonize=no --exit-idle-time=-1 --disallow-exit=true Restart=always [Install] WantedBy=default.target
Now, I don't get
PulseAudioService: pa_context_connect() failed anymore, but neither
aplay nor in-app sounds work.
I should probably mention that
aplay seems playing, because the console's hold (run) time is equal to the length of the audio, but there's no sound.