• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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
9import("../../../../webrtc.gni")
10
11group("py_quality_assessment") {
12  testonly = true
13  deps = [
14    ":scripts",
15    ":unit_tests",
16  ]
17}
18
19copy("scripts") {
20  testonly = true
21  sources = [
22    "README.md",
23    "apm_quality_assessment.py",
24    "apm_quality_assessment.sh",
25    "apm_quality_assessment_boxplot.py",
26    "apm_quality_assessment_export.py",
27    "apm_quality_assessment_gencfgs.py",
28    "apm_quality_assessment_optimize.py",
29  ]
30  outputs = [ "$root_build_dir/py_quality_assessment/{{source_file_part}}" ]
31  deps = [
32    ":apm_configs",
33    ":lib",
34    ":output",
35    "../../../../resources/audio_processing/test/py_quality_assessment:probing_signals",
36    "../../../../rtc_tools:audioproc_f",
37  ]
38}
39
40copy("apm_configs") {
41  testonly = true
42  sources = [ "apm_configs/default.json" ]
43  visibility = [ ":*" ]  # Only targets in this file can depend on this.
44  outputs = [
45    "$root_build_dir/py_quality_assessment/apm_configs/{{source_file_part}}",
46  ]
47}  # apm_configs
48
49copy("lib") {
50  testonly = true
51  sources = [
52    "quality_assessment/__init__.py",
53    "quality_assessment/annotations.py",
54    "quality_assessment/audioproc_wrapper.py",
55    "quality_assessment/collect_data.py",
56    "quality_assessment/data_access.py",
57    "quality_assessment/echo_path_simulation.py",
58    "quality_assessment/echo_path_simulation_factory.py",
59    "quality_assessment/eval_scores.py",
60    "quality_assessment/eval_scores_factory.py",
61    "quality_assessment/evaluation.py",
62    "quality_assessment/exceptions.py",
63    "quality_assessment/export.py",
64    "quality_assessment/export_unittest.py",
65    "quality_assessment/external_vad.py",
66    "quality_assessment/input_mixer.py",
67    "quality_assessment/input_signal_creator.py",
68    "quality_assessment/results.css",
69    "quality_assessment/results.js",
70    "quality_assessment/signal_processing.py",
71    "quality_assessment/simulation.py",
72    "quality_assessment/test_data_generation.py",
73    "quality_assessment/test_data_generation_factory.py",
74  ]
75  visibility = [ ":*" ]  # Only targets in this file can depend on this.
76  outputs = [ "$root_build_dir/py_quality_assessment/quality_assessment/{{source_file_part}}" ]
77  deps = [ "../../../../resources/audio_processing/test/py_quality_assessment:noise_tracks" ]
78}
79
80copy("output") {
81  testonly = true
82  sources = [ "output/README.md" ]
83  visibility = [ ":*" ]  # Only targets in this file can depend on this.
84  outputs =
85      [ "$root_build_dir/py_quality_assessment/output/{{source_file_part}}" ]
86}
87
88group("unit_tests") {
89  testonly = true
90  visibility = [ ":*" ]  # Only targets in this file can depend on this.
91  deps = [
92    ":apm_vad",
93    ":fake_polqa",
94    ":lib_unit_tests",
95    ":scripts_unit_tests",
96    ":vad",
97  ]
98}
99
100rtc_executable("fake_polqa") {
101  testonly = true
102  sources = [ "quality_assessment/fake_polqa.cc" ]
103  visibility = [ ":*" ]  # Only targets in this file can depend on this.
104  output_dir = "${root_out_dir}/py_quality_assessment/quality_assessment"
105  deps = [
106    "../../../../rtc_base:checks",
107    "../../../../rtc_base:rtc_base_approved",
108  ]
109}
110
111rtc_executable("vad") {
112  testonly = true
113  sources = [ "quality_assessment/vad.cc" ]
114  deps = [
115    "../../../../common_audio",
116    "../../../../rtc_base:rtc_base_approved",
117    "//third_party/abseil-cpp/absl/flags:flag",
118    "//third_party/abseil-cpp/absl/flags:parse",
119  ]
120}
121
122rtc_executable("apm_vad") {
123  testonly = true
124  sources = [ "quality_assessment/apm_vad.cc" ]
125  deps = [
126    "../..",
127    "../../../../common_audio",
128    "../../../../rtc_base:rtc_base_approved",
129    "../../vad",
130    "//third_party/abseil-cpp/absl/flags:flag",
131    "//third_party/abseil-cpp/absl/flags:parse",
132  ]
133}
134
135rtc_executable("sound_level") {
136  testonly = true
137  sources = [ "quality_assessment/sound_level.cc" ]
138  deps = [
139    "../..",
140    "../../../../common_audio",
141    "../../../../rtc_base:rtc_base_approved",
142    "//third_party/abseil-cpp/absl/flags:flag",
143    "//third_party/abseil-cpp/absl/flags:parse",
144  ]
145}
146
147copy("lib_unit_tests") {
148  testonly = true
149  sources = [
150    "quality_assessment/annotations_unittest.py",
151    "quality_assessment/echo_path_simulation_unittest.py",
152    "quality_assessment/eval_scores_unittest.py",
153    "quality_assessment/fake_external_vad.py",
154    "quality_assessment/input_mixer_unittest.py",
155    "quality_assessment/signal_processing_unittest.py",
156    "quality_assessment/simulation_unittest.py",
157    "quality_assessment/test_data_generation_unittest.py",
158  ]
159  visibility = [ ":*" ]  # Only targets in this file can depend on this.
160  outputs = [ "$root_build_dir/py_quality_assessment/quality_assessment/{{source_file_part}}" ]
161}
162
163copy("scripts_unit_tests") {
164  testonly = true
165  sources = [ "apm_quality_assessment_unittest.py" ]
166  visibility = [ ":*" ]  # Only targets in this file can depend on this.
167  outputs = [ "$root_build_dir/py_quality_assessment/{{source_file_part}}" ]
168}
169