Can't hear any sounds on Pop! OS 20.04
dchen327 opened this issue · 7 comments
Steps I took
- install in venv with
pip3 install chime
- open python3 shell
import chime
and runchime.success()
- can't hear anything at all (no other audio is playing, audio is definitely working)
I can definitely help test some stuff if needed!
Can you:
- Run
chime.success(silent=False)
and tell me what that outputs. - Check that the
afplay
program is available in your command-line.
Cheers! :)
Yep that seems to be it! I don't have afplay.
returned non-zero exit status 127. stderr: /bin/sh: 1: afplay: not found
Seems like afplay isn't installed by default on Linux, maybe it is for macOS?
Yeah I actually took a guess there, because I'm using MacOS and I don't have access to a Linux machine.
Guess I (we) have to find some universal program for playing sounds on Linux!
Seems like aplay
is installed on Linux for me!
Running the command afplay /home/.../python3.8/site-packages/themes/chime/success.wav
plays a sound. I can maybe submit a PR to use aplay if platform is Linux? I'm not sure if all Linux distros have it, but it seems many do.
Ahah! So it's afplay
on MacOS and aplay
on Linux.
Running the command
afplay /home/.../python3.8/site-packages/themes/chime/success.wav
plays a sound.
I assume that's a typo right? Surely you mean aplay
and not afplay
:)
I can maybe submit a PR to use aplay if platform is Linux?
Yes please!
Okay I've published a new version that uses aplay
. Thanks for the suggestion and the PR. I've added your name to the README.
I've also added a section to the README about the silent
parameter.
Cheers!
Note for posterity: I've released a new version where the silent
parameter is replaced by sync
, which has the opposite behaviour and is in my opinion more intuitive. The README has been updated in consequence.