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

Unified Diff: webrtc/modules/audio_processing/test/py_quality_assessment/quality_assessment/eval_scores.py

Issue 2813883002: APM QA refactoring: render stream support, echo path simulation, new export engine (Closed)
Patch Set: major refactoring Created 3 years, 7 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/quality_assessment/eval_scores.py
diff --git a/webrtc/modules/audio_processing/test/py_quality_assessment/quality_assessment/eval_scores.py b/webrtc/modules/audio_processing/test/py_quality_assessment/quality_assessment/eval_scores.py
index eec74391ad38198e155997298c3e1919e9b2e2c6..b67208bc4b793d6cf3d8e878066f2e7a2be8a5e2 100644
--- a/webrtc/modules/audio_processing/test/py_quality_assessment/quality_assessment/eval_scores.py
+++ b/webrtc/modules/audio_processing/test/py_quality_assessment/quality_assessment/eval_scores.py
@@ -24,7 +24,8 @@ class EvaluationScore(object):
NAME = None
REGISTERED_CLASSES = {}
- def __init__(self):
+ def __init__(self, score_filename_prefix):
+ self._score_filename_prefix = score_filename_prefix
self._reference_signal = None
self._reference_signal_filepath = None
self._tested_signal = None
@@ -76,8 +77,8 @@ class EvaluationScore(object):
Args:
output_path: path to the directory where the output is written.
"""
- self._output_filepath = os.path.join(output_path, 'score-{}.txt'.format(
- self.NAME))
+ self._output_filepath = os.path.join(
+ output_path, self._score_filename_prefix + self.NAME + '.txt')
try:
# If the score has already been computed, load.
self._LoadScore()
@@ -123,8 +124,8 @@ class AudioLevelScore(EvaluationScore):
NAME = 'audio_level'
- def __init__(self):
- EvaluationScore.__init__(self)
+ def __init__(self, score_filename_prefix):
+ EvaluationScore.__init__(self, score_filename_prefix)
def _Run(self, output_path):
self._LoadReferenceSignal()
@@ -146,8 +147,8 @@ class PolqaScore(EvaluationScore):
NAME = 'polqa'
- def __init__(self, polqa_bin_filepath):
- EvaluationScore.__init__(self)
+ def __init__(self, score_filename_prefix, polqa_bin_filepath):
+ EvaluationScore.__init__(self, score_filename_prefix)
# POLQA binary file path.
self._polqa_bin_filepath = polqa_bin_filepath

Powered by Google App Engine
This is Rietveld 408576698