OLD | NEW |
(Empty) | |
| 1 # Copyright (c) 2017 The WebRTC project authors. All Rights Reserved. |
| 2 # |
| 3 # Use of this source code is governed by a BSD-style license |
| 4 # that can be found in the LICENSE file in the root of the source |
| 5 # tree. An additional intellectual property rights grant can be found |
| 6 # in the file PATENTS. All contributing project authors may |
| 7 # be found in the AUTHORS file in the root of the source tree. |
| 8 |
| 9 import logging |
| 10 |
| 11 class ApmModuleEvaluator(object): |
| 12 |
| 13 def __init__(self): |
| 14 pass |
| 15 |
| 16 @classmethod |
| 17 def run(cls, evaluation_score_workers, apm_output_filepath, |
| 18 reference_input_filepath, output_path): |
| 19 # Init. |
| 20 scores = {} |
| 21 |
| 22 for evaluation_score_worker in evaluation_score_workers: |
| 23 logging.info(' computing <%s> score', evaluation_score_worker.NAME) |
| 24 evaluation_score_worker.set_reference_signal_filepath( |
| 25 reference_input_filepath) |
| 26 evaluation_score_worker.set_tested_signal_filepath( |
| 27 apm_output_filepath) |
| 28 |
| 29 evaluation_score_worker.run(output_path) |
| 30 scores[evaluation_score_worker.NAME] = evaluation_score_worker.score |
| 31 |
| 32 return scores |
OLD | NEW |