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

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

Issue 2715233003: APM Quality Generator, noise generator and evaluation score workers factory + echo noise generator (Closed)
Patch Set: rebase + style fix Created 3 years, 8 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
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 # Path to the POLQA tool.
11 if [ -z ${POLQA_PATH} ]; then # Check if defined.
12 # Default location.
13 export POLQA_PATH='/var/opt/PolqaOem64'
14 fi
15 if [ -d "${POLQA_PATH}" ]; then
16 echo "POLQA found in ${POLQA_PATH}"
17 else
18 echo "POLQA not found in ${POLQA_PATH}"
19 exit 1
20 fi
21
22 # Path to the Aechen IR database.
23 if [ -z ${AECHEN_IR_DATABASE_PATH} ]; then # Check if defined.
24 # Default location.
25 export AECHEN_IR_DATABASE_PATH='/var/opt/AIR_1_4'
26 fi
27 if [ -d "${AECHEN_IR_DATABASE_PATH}" ]; then
28 echo "AIR database found in ${AECHEN_IR_DATABASE_PATH}"
29 else
30 echo "AIR database not found in ${AECHEN_IR_DATABASE_PATH}"
31 exit 1
32 fi
33
10 # Customize probing signals, noise sources and scores if needed. 34 # Customize probing signals, noise sources and scores if needed.
11 PROBING_SIGNALS=(probing_signals/*.wav) 35 PROBING_SIGNALS=(probing_signals/*.wav)
12 NOISE_SOURCES=( \ 36 NOISE_SOURCES=( \
13 "identity" \ 37 "identity" \
14 "white" \ 38 "white" \
15 "environmental" \ 39 "environmental" \
16 "echo" \ 40 "echo" \
17 ) 41 )
18 SCORES=( \ 42 SCORES=( \
19 "polqa" \ 43 "polqa" \
(...skipping 17 matching lines...) Expand all
37 chmod +x apm_quality_assessment.py 61 chmod +x apm_quality_assessment.py
38 for probing_signal_filepath in "${PROBING_SIGNALS[@]}" ; do 62 for probing_signal_filepath in "${PROBING_SIGNALS[@]}" ; do
39 probing_signal_name="$(basename $probing_signal_filepath)" 63 probing_signal_name="$(basename $probing_signal_filepath)"
40 probing_signal_name="${probing_signal_name%.*}" 64 probing_signal_name="${probing_signal_name%.*}"
41 for noise_source_name in "${NOISE_SOURCES[@]}" ; do 65 for noise_source_name in "${NOISE_SOURCES[@]}" ; do
42 LOG_FILE="${OUTPUT_PATH}/apm_qa-${probing_signal_name}-"` 66 LOG_FILE="${OUTPUT_PATH}/apm_qa-${probing_signal_name}-"`
43 `"${noise_source_name}.log" 67 `"${noise_source_name}.log"
44 echo "Starting ${probing_signal_name} ${noise_source_name} "` 68 echo "Starting ${probing_signal_name} ${noise_source_name} "`
45 `"(see ${LOG_FILE})" 69 `"(see ${LOG_FILE})"
46 ./apm_quality_assessment.py \ 70 ./apm_quality_assessment.py \
47 -i ${probing_signal_filepath}\ 71 --polqa_path ${POLQA_PATH}\
72 --air_db_path ${AECHEN_IR_DATABASE_PATH}\
73 -i ${probing_signal_filepath} \
48 -o ${OUTPUT_PATH} \ 74 -o ${OUTPUT_PATH} \
49 -n ${noise_source_name} \ 75 -n ${noise_source_name} \
50 -c "${APM_CONFIGS[@]}" \ 76 -c "${APM_CONFIGS[@]}" \
51 -e "${SCORES[@]}" > $LOG_FILE 2>&1 & 77 -e "${SCORES[@]}" > $LOG_FILE 2>&1 &
52 done 78 done
53 done 79 done
54 80
55 # Join. 81 # Join.
56 wait 82 wait
57 83
58 # Export results. 84 # Export results.
59 chmod +x ./apm_quality_assessment_export.py 85 chmod +x ./apm_quality_assessment_export.py
60 ./apm_quality_assessment_export.py -o ${OUTPUT_PATH} 86 ./apm_quality_assessment_export.py -o ${OUTPUT_PATH}
61 87
62 # Show results in the browser. 88 # Show results in the browser.
63 RESULTS_FILE="$(realpath ${OUTPUT_PATH}/results.html)" 89 RESULTS_FILE="$(realpath ${OUTPUT_PATH}/results.html)"
64 sensible-browser "file://${RESULTS_FILE}" > /dev/null 2>&1 & 90 sensible-browser "file://${RESULTS_FILE}" > /dev/null 2>&1 &
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698