Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(462)

Side by Side Diff: webrtc/modules/audio_processing/test/py_quality_assessment/apm_quality_assessment.sh

Issue 2718133002: APM Quality Assessment tool, environmental noise generator (Closed)
Patch Set: comments from Per addressed Created 3 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 #!/bin/bash 1 #!/bin/bash
peah-webrtc 2017/04/03 12:15:55 Would it not be possible to do this as well in pyt
AleBzk 2017/04/03 13:41:25 Well, this is meant to be a sample bash script to
2 # Copyright (c) 2017 The WebRTC project authors. All Rights Reserved. 2 # Copyright (c) 2017 The WebRTC project authors. All Rights Reserved.
3 # 3 #
4 # Use of this source code is governed by a BSD-style license 4 # Use of this source code is governed by a BSD-style license
5 # that can be found in the LICENSE file in the root of the source 5 # that can be found in the LICENSE file in the root of the source
6 # tree. An additional intellectual property rights grant can be found 6 # tree. An additional intellectual property rights grant can be found
7 # in the file PATENTS. All contributing project authors may 7 # in the file PATENTS. All contributing project authors may
8 # be found in the AUTHORS file in the root of the source tree. 8 # be found in the AUTHORS file in the root of the source tree.
9 9
10 # Customize probing signals, noise sources and scores if needed. 10 # Customize probing signals, noise sources and scores if needed.
11 PROBING_SIGNALS=(probing_signals/*.wav) 11 PROBING_SIGNALS=(probing_signals/*.wav)
12 NOISE_SOURCES=( \ 12 NOISE_SOURCES=( \
13 "identity" \ 13 "identity" \
14 "white" \ 14 "white" \
15 "environmental" \ 15 "environmental" \
16 "echo" \ 16 "echo" \
17 ) 17 )
18 SCORES=( \ 18 SCORES=( \
19 "polqa" \ 19 "polqa" \
20 "audio_level" \ 20 "audio_level" \
21 ) 21 )
22 OUTPUT_PATH=output 22 OUTPUT_PATH=output
23 23
24 # Generate standard APM config files. 24 # Generate standard APM config files.
25 chmod +x apm_quality_assessment-gencfgs.py 25 chmod +x apm_quality_assessment_gencfgs.py
26 ./apm_quality_assessment-gencfgs.py 26 ./apm_quality_assessment_gencfgs.py
27 27
28 # Customize APM configurations if needed. 28 # Customize APM configurations if needed.
29 APM_CONFIGS=(apm_configs/*.json) 29 APM_CONFIGS=(apm_configs/*.json)
30 30
31 # Add output path if missing. 31 # Add output path if missing.
32 if [ ! -d ${OUTPUT_PATH} ]; then 32 if [ ! -d ${OUTPUT_PATH} ]; then
33 mkdir ${OUTPUT_PATH} 33 mkdir ${OUTPUT_PATH}
34 fi 34 fi
35 35
36 # Start one process for each "probing signal"-"noise source" pair. 36 # Start one process for each "probing signal"-"noise source" pair.
(...skipping 12 matching lines...) Expand all
49 -n ${noise_source_name} \ 49 -n ${noise_source_name} \
50 -c "${APM_CONFIGS[@]}" \ 50 -c "${APM_CONFIGS[@]}" \
51 -e "${SCORES[@]}" > $LOG_FILE 2>&1 & 51 -e "${SCORES[@]}" > $LOG_FILE 2>&1 &
52 done 52 done
53 done 53 done
54 54
55 # Join. 55 # Join.
56 wait 56 wait
57 57
58 # Export results. 58 # Export results.
59 chmod +x ./apm_quality_assessment-export.py 59 chmod +x ./apm_quality_assessment_export.py
60 ./apm_quality_assessment-export.py -o ${OUTPUT_PATH} 60 ./apm_quality_assessment_export.py -o ${OUTPUT_PATH}
61 61
62 # Show results in the browser. 62 # Show results in the browser.
63 RESULTS_FILE="$(realpath ${OUTPUT_PATH}/results.html)" 63 RESULTS_FILE="$(realpath ${OUTPUT_PATH}/results.html)"
64 sensible-browser "file://${RESULTS_FILE}" > /dev/null 2>&1 & 64 sensible-browser "file://${RESULTS_FILE}" > /dev/null 2>&1 &
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698