diff --git a/modules/audio_processing/BUILD.gn b/modules/audio_processing/BUILD.gn index 597bbf64d5..f7837101c8 100644 --- a/modules/audio_processing/BUILD.gn +++ b/modules/audio_processing/BUILD.gn @@ -206,26 +206,6 @@ rtc_static_library("audio_processing") { "transient/wpd_tree.h", "typing_detection.cc", "typing_detection.h", - "vad/common.h", - "vad/gmm.cc", - "vad/gmm.h", - "vad/noise_gmm_tables.h", - "vad/pitch_based_vad.cc", - "vad/pitch_based_vad.h", - "vad/pitch_internal.cc", - "vad/pitch_internal.h", - "vad/pole_zero_filter.cc", - "vad/pole_zero_filter.h", - "vad/standalone_vad.cc", - "vad/standalone_vad.h", - "vad/vad_audio_proc.cc", - "vad/vad_audio_proc.h", - "vad/vad_audio_proc_internal.h", - "vad/vad_circular_buffer.cc", - "vad/vad_circular_buffer.h", - "vad/voice_activity_detector.cc", - "vad/voice_activity_detector.h", - "vad/voice_gmm_tables.h", "voice_detection_impl.cc", "voice_detection_impl.h", ] @@ -251,7 +231,7 @@ rtc_static_library("audio_processing") { "../../system_wrappers:cpu_features_api", "../../system_wrappers:field_trial_api", "../../system_wrappers:metrics_api", - "../audio_coding:isac", + "vad", ] if (aec_untrusted_delay_for_testing) { @@ -573,14 +553,6 @@ if (rtc_include_tests) { "transient/wpd_tree_unittest.cc", "utility/block_mean_calculator_unittest.cc", "utility/delay_estimator_unittest.cc", - "vad/gmm_unittest.cc", - "vad/pitch_based_vad_unittest.cc", - "vad/pitch_internal_unittest.cc", - "vad/pole_zero_filter_unittest.cc", - "vad/standalone_vad_unittest.cc", - "vad/vad_audio_proc_unittest.cc", - "vad/vad_circular_buffer_unittest.cc", - "vad/voice_activity_detector_unittest.cc", ] deps = [ @@ -607,6 +579,7 @@ if (rtc_include_tests) { "../audio_coding:neteq_input_audio_tools", "aec_dump:mock_aec_dump_unittests", "test/conversational_speech:unittest", + "vad:vad_unittests", "//testing/gtest", ] @@ -876,6 +849,7 @@ if (rtc_include_tests) { deps = [ ":audio_processing", ":audioproc_test_utils", + "../../common_audio", "../../rtc_base:rtc_base_approved", "../../system_wrappers:metrics_default", "../../test:test_support", diff --git a/modules/audio_processing/test/py_quality_assessment/BUILD.gn b/modules/audio_processing/test/py_quality_assessment/BUILD.gn index 45e5f30760..6a4e31f4a4 100644 --- a/modules/audio_processing/test/py_quality_assessment/BUILD.gn +++ b/modules/audio_processing/test/py_quality_assessment/BUILD.gn @@ -143,6 +143,7 @@ rtc_executable("apm_vad") { "../../../../common_audio", "../../../../rtc_base:rtc_base_approved", "../../../../system_wrappers:metrics_default", + "../../vad", ] } diff --git a/modules/audio_processing/vad/BUILD.gn b/modules/audio_processing/vad/BUILD.gn new file mode 100644 index 0000000000..c924d5e167 --- /dev/null +++ b/modules/audio_processing/vad/BUILD.gn @@ -0,0 +1,69 @@ +# Copyright (c) 2018 The WebRTC project authors. All Rights Reserved. +# +# Use of this source code is governed by a BSD-style license +# that can be found in the LICENSE file in the root of the source +# tree. An additional intellectual property rights grant can be found +# in the file PATENTS. All contributing project authors may +# be found in the AUTHORS file in the root of the source tree. + +import("../../../webrtc.gni") +rtc_static_library("vad") { + visibility = [ + "../*", + "../../../rtc_tools:*", + ] + sources = [ + "common.h", + "gmm.cc", + "gmm.h", + "noise_gmm_tables.h", + "pitch_based_vad.cc", + "pitch_based_vad.h", + "pitch_internal.cc", + "pitch_internal.h", + "pole_zero_filter.cc", + "pole_zero_filter.h", + "standalone_vad.cc", + "standalone_vad.h", + "vad_audio_proc.cc", + "vad_audio_proc.h", + "vad_audio_proc_internal.h", + "vad_circular_buffer.cc", + "vad_circular_buffer.h", + "voice_activity_detector.cc", + "voice_activity_detector.h", + "voice_gmm_tables.h", + ] + deps = [ + "../..:module_api", + "../../..:typedefs", + "../../../audio/utility:audio_frame_operations", + "../../../common_audio", + "../../../rtc_base:checks", + "../../audio_coding:isac", + ] +} + +if (rtc_include_tests) { + rtc_static_library("vad_unittests") { + testonly = true + sources = [ + "gmm_unittest.cc", + "pitch_based_vad_unittest.cc", + "pitch_internal_unittest.cc", + "pole_zero_filter_unittest.cc", + "standalone_vad_unittest.cc", + "vad_audio_proc_unittest.cc", + "vad_circular_buffer_unittest.cc", + "voice_activity_detector_unittest.cc", + ] + deps = [ + ":vad", + "../..:module_api", + "../../../common_audio", + "../../../test:test_support", + "//testing/gmock", + "//testing/gtest", + ] + } +} diff --git a/modules/audio_processing/vad/pole_zero_filter_unittest.cc b/modules/audio_processing/vad/pole_zero_filter_unittest.cc index aef07a6e44..38ee10fc46 100644 --- a/modules/audio_processing/vad/pole_zero_filter_unittest.cc +++ b/modules/audio_processing/vad/pole_zero_filter_unittest.cc @@ -53,7 +53,7 @@ class PoleZeroFilterTest : public ::testing::Test { kCoeffDenominator, kFilterOrder)) {} - ~PoleZeroFilterTest() {} + ~PoleZeroFilterTest() override {} void FilterSubframes(int num_subframes); diff --git a/rtc_tools/BUILD.gn b/rtc_tools/BUILD.gn index 8fc07bf3be..f04bd2dc3b 100644 --- a/rtc_tools/BUILD.gn +++ b/rtc_tools/BUILD.gn @@ -289,6 +289,7 @@ if (rtc_include_tests) { deps = [ "../modules:module_api", "../modules/audio_processing", + "../modules/audio_processing/vad", "../rtc_base:rtc_base_approved", "../system_wrappers:metrics_default", "../test:test_support",