-
Notifications
You must be signed in to change notification settings - Fork 45
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[SKIP CI] Test-case: Test if acoustic capture of ambient is normal #972
base: main
Are you sure you want to change the base?
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 <seppo.ingalsuo@linux.intel.com>
@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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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 seppo.ingalsuo@linux.intel.com