TaylorSMarks / playsound

Pure Python, cross platform, single function module with no dependencies for playing sounds.
Other
504 stars 118 forks source link

playsound freezes while trying to play #144

Open OdorousWo1f opened 1 year ago

OdorousWo1f commented 1 year ago

Hello. I have an Ubuntu Server 23.04 installation on a Raspberry Pi with Python 3.11.2 installed with pip 23.0.1. I am running into a weird issue where I try to play a sound (with the code below) and the script freezes and I cannot CTRL+C to exit. It gets stuck at "playing sound" and doesn't go any further.

from playsound import playsound

print('playing sound')
playsound('./assets/sounds/System Sounds/button-beep.mp3')
print('played sound')

Help appreciated.

SirCrocs commented 1 year ago

playsound('./assets/sounds/System Sounds/button-beep.mp3', block=False) should fix the problem so that the program keeps running while the sound is being played. However, for me it results in my program running fine but no sound being played