Which bash command will indicate the sound output speaker(output or no output), so I can reset my web radio when it crashes?
4 Answers
This is a really good command testing out all speakers.
speaker-test -t wav -c 6
Remarks on usage
There is no loud noise heard when running this command, except a voice saying "front left, front center, front right...". This command will continue to repeat the testing, until the user presses Ctrl+c keys to stop the testing.
- 1,466
- 539
To test a two channel (left and right) setup, this plays a voice saying "front left", "front right", then exits:
speaker-test -t wav -c 2 -l 1
For a surround sound setup, set -c to as many channels as you have:
speaker-test -t wav -c 6 -l 1
Meaning of the options:
-t,--testwavplay a voice instead of static/noise-l,--nloops1test only once-c,--channelsnumber of output channels to test
- 1,466
Assuming that all you want is to check if the there is an output on the speaker, Use
speaker-test
- 176
If you want it to exit even faster, set both voice output (-t wav) and one loop (-l 1):
speaker-test -t wav -l 1
On my setup, it defaults to one channel (-c 1), so this just speaks "front left" once and then exits.
- 951