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

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

Issue 2793903006: Style fix and docstring for the APM QA Python tool (Closed)
Patch Set: _ prefix for internal use functions 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/evaluation.py
diff --git a/webrtc/modules/audio_processing/test/py_quality_assessment/quality_assessment/evaluation.py b/webrtc/modules/audio_processing/test/py_quality_assessment/quality_assessment/evaluation.py
index 016690a2c4509b3fc95b1088dafe14adea9f6e7b..e18f193bb093fe91cf4bd03537a64da4f46ae21c 100644
--- a/webrtc/modules/audio_processing/test/py_quality_assessment/quality_assessment/evaluation.py
+++ b/webrtc/modules/audio_processing/test/py_quality_assessment/quality_assessment/evaluation.py
@@ -13,28 +13,39 @@ import logging
class ApmModuleEvaluator(object):
+ """APM evaluator class.
+ """
def __init__(self):
pass
@classmethod
- def run(cls, evaluation_score_workers, apm_output_filepath,
+ def Run(cls, evaluation_score_workers, apm_output_filepath,
reference_input_filepath, output_path):
"""Runs the evaluation.
Iterates over the given evaluation score workers.
+
+ Args:
+ evaluation_score_workers: list of EvaluationScore instances.
+ apm_output_filepath: path to the audio track file with the APM output.
+ reference_input_filepath: path to the reference audio track file.
+ output_path: output path.
+
+ Returns:
+ A dict of evaluation score name and score pairs.
"""
# Init.
scores = {}
for evaluation_score_worker in evaluation_score_workers:
logging.info(' computing <%s> score', evaluation_score_worker.NAME)
- evaluation_score_worker.set_reference_signal_filepath(
+ evaluation_score_worker.SetReferenceSignalFilepath(
reference_input_filepath)
- evaluation_score_worker.set_tested_signal_filepath(
+ evaluation_score_worker.SetTestedSignalFilepath(
apm_output_filepath)
- evaluation_score_worker.run(output_path)
+ evaluation_score_worker.Run(output_path)
scores[evaluation_score_worker.NAME] = evaluation_score_worker.score
return scores

Powered by Google App Engine
This is Rietveld 408576698