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.
$ sudo apt-get install python-virtualenv
$ cd ~ && virtualenv my_env
$ source ~/my_env/bin/activate
(my_env)$ pip install numpy pydub scipy pandas
out/Default/py_quality_assessmentand check that
$ 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).
EnvironmentalNoiseTestDataGenerator._NOISE_TRACKS accordingly in
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
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,