OLD | NEW |
1 #!/usr/bin/env python | 1 #!/usr/bin/env python |
2 # Copyright (c) 2017 The WebRTC project authors. All Rights Reserved. | 2 # Copyright (c) 2017 The WebRTC project authors. All Rights Reserved. |
3 # | 3 # |
4 # Use of this source code is governed by a BSD-style license | 4 # Use of this source code is governed by a BSD-style license |
5 # that can be found in the LICENSE file in the root of the source | 5 # that can be found in the LICENSE file in the root of the source |
6 # tree. An additional intellectual property rights grant can be found | 6 # tree. An additional intellectual property rights grant can be found |
7 # in the file PATENTS. All contributing project authors may | 7 # in the file PATENTS. All contributing project authors may |
8 # be found in the AUTHORS file in the root of the source tree. | 8 # be found in the AUTHORS file in the root of the source tree. |
9 | 9 |
10 """Export the scores computed by the apm_quality_assessment.py script into an | 10 """Export the scores computed by the apm_quality_assessment.py script into an |
(...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
139 | 139 |
140 # Add the score to the nested dictionary. | 140 # Add the score to the nested dictionary. |
141 scores[score_name][config_name][input_name][noise_name][noise_params] = { | 141 scores[score_name][config_name][input_name][noise_name][noise_params] = { |
142 'score': data_access.ScoreFile.load(score_filepath), | 142 'score': data_access.ScoreFile.load(score_filepath), |
143 'audio_in_filepath': audio_in_filepath, | 143 'audio_in_filepath': audio_in_filepath, |
144 'audio_out_filepath': audio_out_filepath, | 144 'audio_out_filepath': audio_out_filepath, |
145 'audio_ref_filepath': audio_ref_filepath, | 145 'audio_ref_filepath': audio_ref_filepath, |
146 } | 146 } |
147 | 147 |
148 # Export. | 148 # Export. |
149 exporter = export.HtmlExport( | 149 output_filepath = os.path.join(args.output_dir, _GetOutputFilename( |
150 output_path=args.output_dir, | 150 args.filename_suffix)) |
151 output_filename=_GetOutputFilename(args.filename_suffix)) | 151 exporter = export.HtmlExport(output_filepath) |
152 output_filepath = exporter.export(scores) | 152 exporter.export(scores) |
153 | 153 |
154 logging.info('output file successfully written in %s', output_filepath) | 154 logging.info('output file successfully written in %s', output_filepath) |
155 sys.exit(0) | 155 sys.exit(0) |
156 | 156 |
157 | 157 |
158 if __name__ == '__main__': | 158 if __name__ == '__main__': |
159 main() | 159 main() |
OLD | NEW |