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

Unified Diff: webrtc/modules/audio_processing/test/py_quality_assessment/apm_quality_assessment.py

Issue 2715233003: APM Quality Generator, noise generator and evaluation score workers factory + echo noise generator (Closed)
Patch Set: Noise generation and evaluation score workers now instantiated through factory objects, class decor… 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 side-by-side diff with in-line comments
Download patch
Index: webrtc/modules/audio_processing/test/py_quality_assessment/apm_quality_assessment.py
diff --git a/webrtc/modules/audio_processing/test/py_quality_assessment/apm_quality_assessment.py b/webrtc/modules/audio_processing/test/py_quality_assessment/apm_quality_assessment.py
index ca7e2c3e930fb609233cf500f057df033acf0c03..8d0f10dacc4aa5a816ba29a67bce93ae16c5e1b8 100755
--- a/webrtc/modules/audio_processing/test/py_quality_assessment/apm_quality_assessment.py
+++ b/webrtc/modules/audio_processing/test/py_quality_assessment/apm_quality_assessment.py
@@ -19,6 +19,7 @@ Usage: apm_quality_assessment.py -i audio1.wav [audio2.wav ...]
import argparse
import logging
+import os
import sys
import quality_assessment.eval_scores as eval_scores
@@ -63,6 +64,20 @@ def _instance_arguments_parser():
'are saved'),
default='output')
+ default_polqa_path = None if 'POLQA_PATH' not in os.environ else (
+ os.environ['POLQA_PATH'])
+ parser.add_argument('--polqa_path', nargs='+',
+ required=default_polqa_path is None,
+ help='path to the POLQA tool',
+ default=default_polqa_path)
+
+ default_air_db_path = None if 'AECHEN_IR_DATABASE_PATH' not in (
+ os.environ) else os.environ['AECHEN_IR_DATABASE_PATH']
+ parser.add_argument('--air_db_path', nargs='+',
+ required=default_air_db_path is None,
+ help='path to the Aechen IR database',
+ default=default_air_db_path)
+
AleBzk 2017/03/06 11:29:53 @kjellander: the environment variable, if defined,
kjellander_webrtc 2017/03/09 07:49:31 That's better, but I'd still like to never even at
AleBzk 2017/03/09 11:31:19 Done. Now both paths are required and with no defa
kjellander_webrtc 2017/03/09 14:05:41 Thanks! Environment variables are the cause of muc
return parser
@@ -73,7 +88,9 @@ def main():
parser = _instance_arguments_parser()
args = parser.parse_args()
- simulator = simulation.ApmModuleSimulator()
+ simulator = simulation.ApmModuleSimulator(
+ aechen_ir_database_path=args.air_db_path,
+ polqa_tool_path=args.polqa_path)
AleBzk 2017/03/06 11:29:53 @kjellander: the required paths are now passed to
simulator.run(
config_filepaths=args.config_files,
input_filepaths=args.input_files,

Powered by Google App Engine
This is Rietveld 408576698