Paplay fails when running as sudo
metropt opened this issue · 4 comments
metropt commented
When running the script as root it fails to play the sound:
Connection failure: Connection refused
pa_context_connect() failed: Connection refused
It looks like it is not possible to run paplay with sudo.
metropt commented
I changed the subprocess.call with playsound https://pypi.org/project/playsound/ if you think it is ok I can submit a merge request.
jantman commented
Yeah, I'd be very happy if you submit a pull request for that. Thanks!