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