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 |