I’d like to do this:
playsound("/dev/shm/tts-speech.mp3")
I used to use playsound in Ubuntu 20.04. It doesn’t work in Ubuntu 22.04, so I used playsound from preferredsoundplayer
. That works fine on my pc, but doesn’t on my rpi4.
I get strange output, and no sound:
>>> import preferredsoundplayer as ps
>>> ps.playsound("/dev/shm/tts-speech.mp3")
('n', '')
What is the simplest way to play sound files on rpi4 from python (or fix preferredsoundplayer)?