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

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

Issue 2811953002: APM QA unit tests, fake POLQA binary and minor fixes (Closed)
Patch Set: comments addressed Created 3 years, 8 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 e1f1a94324836ad4e3fcc918aeac96ae2bdc4814..eec74391ad38198e155997298c3e1919e9b2e2c6 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
@@ -145,21 +145,19 @@ class PolqaScore(EvaluationScore):
"""
NAME = 'polqa'
- _BIN_FILENAME = 'PolqaOem64'
- def __init__(self, polqa_tool_path):
+ def __init__(self, polqa_bin_filepath):
EvaluationScore.__init__(self)
- # Path to the POLQA directory with binary and license files.
- self._polqa_tool_path = polqa_tool_path
-
# POLQA binary file path.
- self._polqa_bin_filepath = os.path.join(
- self._polqa_tool_path, self._BIN_FILENAME)
+ self._polqa_bin_filepath = polqa_bin_filepath
if not os.path.exists(self._polqa_bin_filepath):
logging.error('cannot find POLQA tool binary file')
raise exceptions.FileNotFoundError()
+ # Path to the POLQA directory with binary and license files.
+ self._polqa_tool_path, _ = os.path.split(self._polqa_bin_filepath)
+
def _Run(self, output_path):
polqa_out_filepath = os.path.join(output_path, 'polqa.out')
if os.path.exists(polqa_out_filepath):

Powered by Google App Engine
This is Rietveld 408576698