How to test if speaker is playing the sound programatically?

0

Is there a way to determine if speakers are playing the sound, given that there is no microphone to detect this.

I have an embedded system running Linux on ARM target board. I want to device a power on self test to detect if the speaker is playing the sound.
Please suggest if it can be done programmatically, as just a return value from loaded sound module does not confirm this always.

Thank you for any suggestions.

Bleamer

Posted 2014-08-09T10:03:53.460

Reputation: 551

Answers

0

sox stats .. seems to be one way to detect the levels, assuming you have the option to run sox.

i.e.

  1. Use software (sox?) to sample the sound output of the ARM target board,
    this might require the use of a special cable, if not a microphone.
  2. Run sox stats ... on the resulting sound file.

sox manpage


For a lower level of requirements: a simplistic level detector built on an op-amp, with level averaging and trigger level sample and hold might be possible to build from a few components.

Hannu

Posted 2014-08-09T10:03:53.460

Reputation: 4 950