[SKIP CI] Test-case: Test if acoustic capture of ambient is normal#972
[SKIP CI] Test-case: Test if acoustic capture of ambient is normal#972singalsu wants to merge 1 commit intothesofproject:mainfrom
Conversation
Capture sound clip from microphone endpoint and automatically analyze if recording has normal characteristic. Detected issues are only PCM zero code or DC constant DC values, large offset, duplicated channels, saturated PCM code values, or abnormal FFT spectrum. Signed-off-by: Seppo Ingalsuo <[email protected]>
|
@marc-hb Here's a draft version of ambient noise based mic capture test for try at some lab. Fan noise, speech, music etc. in background should pass while several kinds of problems should be detected. |
| @@ -0,0 +1,23 @@ | |||
| #!/bin/bash | |||
There was a problem hiding this comment.
The shell script is useful for testing the octave script in isolation but for "real" tests it's probably not needed, existing test-case/*capture*.sh tests should probably be modified instead.
There was a problem hiding this comment.
Yes, that makes sense. Also would need a way to launch this only in devices with plugged in headset and/or analog or digital microphone available. Something like /etc/defaults/has_headset, etc?
| rm -f "$WAV" | ||
| arecord -D${DEV} $FMT -d 2 "$WAV" | ||
| octave --silent --no-gui --eval "$OCTAVE_SCRIPT" | ||
| status=$? |
There was a problem hiding this comment.
This will always be zero because of set -e
| check_device_format "hw:1,6" "-c 2 -r 48000 -f S16_LE" | ||
| check_device_format "hw:1,6" "-c 2 -r 48000 -f S32_LE" | ||
| check_device_format "hw:1,7" "-c 2 -r 16000 -f S16_LE" | ||
| check_device_format "hw:1,7" "-c 2 -r 16000 -f S32_LE" |
There was a problem hiding this comment.
Not compliant with
|
@singalsu reminder to myself to proceed with this after vacation |
Capture sound clip from microphone endpoint and automatically analyze if recording has normal characteristic. Detected issues are only PCM zero code or DC constant DC values, large offset, duplicated channels, saturated PCM code values, or abnormal FFT spectrum.
Signed-off-by: Seppo Ingalsuo [email protected]