Python wrapper of APM simulators (e.g.,
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.
$ sudo apt-get install python-virtualenv
$ cd ~ && virtualenv my_env
$ source ~/my_env/bin/activate
(my_env)$ pip install enum34 numpy pydub scipy pandas pyquery jsmin \
out/Default/py_quality_assessmentand check that
python -m unittest discover -p "*_unittest.py"
$ export POLQA_PATH=/var/opt/PolqaOem64
$ export AECHEN_IR_DATABASE_PATH=/var/opt/AIR_1_4
(*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).
apm_quality_assessment.shas an example script to parallelize the experiments
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, -oto the same value used in
$ ./apm_quality_assessment_export.py \ -o output/ \ -c "(^default$)|(.*AE.*)" \ -t \(white_noise\) \ -s \(polqa\) \ -f echo
After generating stats, it can help to visualize how a score depends on a certain APM simulator parameter. The
apm_quality_assessment_boxplot.py script helps with that, producing plots similar to this one.
Suppose some scores come from running the APM simulator
audioproc_f with or without the level controller:
--lc=0. Then two boxplots side by side can be generated with
$ ./apm_quality_assessment_boxplot.py \ -o /path/to/output -v <score_name> -n /path/to/dir/with/apm_configs -z lc
The input wav file must be:
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,