Python wrapper of audioproc_f
with which quality assessment can be automatized. The tool allows to simulate different noise conditions, input signals, APM configurations and it computes different scores. Once the scores are computed, the results can be easily exported to an HTML page which allows to listen to the APM input and output signals and also the reference one used for evaluation.
virtualenv
$ sudo apt-get install python-virtualenv
my_env
)$ cd ~ && virtualenv my_env
$ source ~/my_env/bin/activate
pip
(my_env)$ pip install numpy pydub scipy pandas
out/Default/py_quality_assessment
and check that apm_quality_assessment.py
existsPOLQA_PATH
environment variable$ export POLQA_PATH=/var/opt/PolqaOem64
AECHEN_IR_DATABASE_PATH
environment variable$ export AECHEN_IR_DATABASE_PATH=/var/opt/AIR_1_4
out/Default/py_quality_assessment/probing_signals
(*1)out/Default/py_quality_assessment/noise_tracks
(*1, *2)(*1) You can use custom files as long as they are mono tracks sampled at 48kHz encoded in the 16 bit signed format (it is recommended that the tracks are converted and exported with Audacity).
(*2) Adapt EnvironmentalNoiseTestDataGenerator._NOISE_TRACKS
accordingly in out/Default/py_quality_assessment/quality_assessment/test_data_generation.py
.
out/Default/py_quality_assessment
apm_quality_assessment.sh
as an example script to parallelize the experimentsapm_quality_assessment.sh
Showing all the results at once can be confusing. You therefore may want to export separate reports. In this case, you can use the apm_quality_assessment_export.py
script as follows:
--output_dir, -o
to the same value used in apm_quality_assessment.sh
--config_names, -c
--capture_names, -i
--render_names, -r
--echo_simulator_names, -e
--test_data_generators, -t
--eval_scores, -s
-f <suffix>
For instance:
$ ./apm_quality_assessment-export.py \ -o output/ \ -c "(^default$)|(.*AE.*)" \ -t \(white_noise\) \ -s \(polqa\) \ -f echo
The input wav file must be:
audioproc_f
)Depending on the license, the POLQA tool may take “breaks” as a way to limit the throughput. When this happens, the APM Quality Assessment tool is slowed down. For more details about this limitation, check Section 10.9.1 in the POLQA manual v.1.18.
In case of issues with the POLQA score computation, check py_quality_assessment/eval_scores.py
and adapt PolqaScore._parse_output_file()
. The code can be also fixed directly into the build directory (namely, out/Default/py_quality_assessment/eval_scores.py
).