Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

playsound freezes while trying to play #144

Open
OdorousWo1f opened this issue May 6, 2023 · 1 comment
Open

playsound freezes while trying to play #144

OdorousWo1f opened this issue May 6, 2023 · 1 comment

Comments

@OdorousWo1f
Copy link

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
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants