Alessio Bazzica bc0b37c08a AGC2 RNN VAD: Spectral features extraction.
This CL defines SpectralFeaturesExtractor which is responsible for
computing the spectral features used as input for the RNN.

Bug: webrtc:9076
Change-Id: I5e1396b89eca9c13bb268e8419a16436a9c3450f
Reviewed-on: https://webrtc-review.googlesource.com/73760
Commit-Queue: Alessio Bazzica <alessiob@webrtc.org>
Reviewed-by: Alex Loiko <aleloi@webrtc.org>
Reviewed-by: Ivo Creusen <ivoc@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#23206}
2018-05-11 21:15:36 +00:00

127 lines
3.3 KiB
Plaintext

# 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")
group("rnn_vad") {
deps = [
":lib",
]
}
source_set("lib") {
sources = [
"common.h",
"fft_util.cc",
"fft_util.h",
"lp_residual.cc",
"lp_residual.h",
"pitch_info.h",
"pitch_search.cc",
"pitch_search.h",
"pitch_search_internal.cc",
"pitch_search_internal.h",
"ring_buffer.h",
"rnn.cc",
"rnn.h",
"sequence_buffer.h",
"spectral_features.cc",
"spectral_features.h",
"spectral_features_internal.cc",
"spectral_features_internal.h",
"symmetric_matrix_buffer.h",
]
deps = [
"../../../../api:array_view",
"../../../../common_audio/",
"../../../../rtc_base:checks",
"../../../../rtc_base:rtc_base_approved",
"//third_party/rnnoise:kiss_fft",
"//third_party/rnnoise:rnn_vad",
]
}
if (rtc_include_tests) {
source_set("lib_test") {
testonly = true
sources = [
"test_utils.cc",
"test_utils.h",
]
deps = [
"../../../../api:array_view",
"../../../../rtc_base:checks",
"../../../../rtc_base:ptr_util",
"../../../../test:fileutils",
"../../../../test:test_support",
]
}
unittest_resources = [
"../../../../resources/audio_processing/agc2/rnn_vad/band_energies.dat",
"../../../../resources/audio_processing/agc2/rnn_vad/fft.dat",
"../../../../resources/audio_processing/agc2/rnn_vad/pitch_buf_24k.dat",
"../../../../resources/audio_processing/agc2/rnn_vad/pitch_lp_res.dat",
"../../../../resources/audio_processing/agc2/rnn_vad/sil_features.dat",
"../../../../resources/audio_processing/agc2/rnn_vad/vad_prob.dat",
]
if (is_ios) {
bundle_data("unittests_bundle_data") {
testonly = true
sources = unittest_resources
outputs = [
"{{bundle_resources_dir}}/{{source_file_part}}",
]
}
}
rtc_source_set("unittests") {
testonly = true
sources = [
"fft_util_unittest.cc",
"lp_residual_unittest.cc",
"pitch_search_internal_unittest.cc",
"pitch_search_unittest.cc",
"ring_buffer_unittest.cc",
"rnn_unittest.cc",
"sequence_buffer_unittest.cc",
"spectral_features_internal_unittest.cc",
"spectral_features_unittest.cc",
"symmetric_matrix_buffer_unittest.cc",
]
deps = [
":lib",
":lib_test",
"../../../../api:array_view",
"../../../../common_audio/",
"../../../../rtc_base:checks",
"../../../../test:test_support",
"//third_party/rnnoise:rnn_vad",
]
data = unittest_resources
if (is_ios) {
deps += [ ":unittests_bundle_data" ]
}
}
rtc_executable("rnn_vad_tool") {
testonly = true
sources = [
"rnn_vad_tool.cc",
]
deps = [
":lib",
"../../../../api:array_view",
"../../../../common_audio:common_audio",
"../../../../rtc_base:rtc_base_approved",
"../../../../test:test_support",
]
}
}