On 21/01/2022 13.44, Simon Becherer wrote:
Am 21.01.22 um 13:21 schrieb Carlos E. R.:
Hi,
I want to play a sound from a script, for example to signal it finished, but I can't.
First problem: I can't find a CLI command able to play the sound files I want, found in the default installed system:
try: for gstreamer cli:
gst123
have no oga file to try, but gst123 plays all gstreamer is able to.
cer@Erebor4:~> gst-play-1.0 /usr/share/sounds/freedesktop/stereo/bell.oga Press 'k' to see a list of keyboard shortcuts. Now playing /usr/share/sounds/freedesktop/stereo/bell.oga Redistribute latency... 0:00:00.1 / 0:00:00.1 Reached end of play list. cer@Erebor4:~> (silence...) cer@Erebor4:~> gst123 /usr/share/sounds/freedesktop/stereo/bell.oga Playing file:///usr/share/sounds/freedesktop/stereo/bell.oga Time: 0:00:00.12 of 0:00:00.13 | Bitrate: 192.0 kbit/sec cer@Erebor4:~> gst123 /usr/share/sounds/freedesktop/stereo/bell.oga Playing file:///usr/share/sounds/freedesktop/stereo/bell.oga Time: 0:00:00.12 of 0:00:00.13 | Bitrate: 192.0 kbit/sec cer@Erebor4:~> (silence...) gst123 /usr/share/sounds/freedesktop/stereo/dialog-warning.oga can be heard. cer@Erebor4:~> gst123 --volume=100 /usr/share/sounds/freedesktop/stereo/bell.oga Playing file:///usr/share/sounds/freedesktop/stereo/bell.oga Time: 0:00:00.11 of 0:00:00.13 | Bitrate: 192.0 kbit/sec cer@Erebor4:~> (silence...) cer@Erebor4:~> gst123 --volume=100 /usr/share/sounds/freedesktop/stereo/dialog-warning.oga Playing file:///usr/share/sounds/freedesktop/stereo/dialog-warning.oga Time: 0:00:00.38 of 0:00:00.49 | Bitrate: 160.0 kbit/sec cer@Erebor4:~> gst123 /usr/share/sounds/freedesktop/stereo/dialog-warning.oga Playing file:///usr/share/sounds/freedesktop/stereo/dialog-warning.oga Time: 0:00:00.38 of 0:00:00.49 | Bitrate: 160.0 kbit/sec cer@Erebor4:~> (silence...) As root: Erebor4:~ # su - cer -c "gst123 /usr/share/sounds/freedesktop/stereo/dialog-warning.oga" Playing file:///usr/share/sounds/freedesktop/stereo/dialog-warning.oga Cannot connect to server socket err = No such file or directory Cannot connect to server request channel jack server is not running or cannot be started JackShmReadWritePtr::~JackShmReadWritePtr - Init not done for -1, skipping unlock JackShmReadWritePtr::~JackShmReadWritePtr - Init not done for -1, skipping unlock AL lib: (EE) ALCplaybackAlsa_open: Could not open playback device 'default': Connection refused AL lib: (EE) ALCplaybackAlsa_open: Could not open playback device 'default': Connection refused Time: 0:00:00.42 of 0:00:00.49 | Bitrate: 160.0 kbit/sec Erebor4:~ # (silence...) -- Cheers / Saludos, Carlos E. R. (from oS Leap 15.3 x86_64 (Erebor-4))