Debian Codegraph @

micro_vad/tensorflow/lite/experimental/microfrontend/lib/BUILD

raw
1 # Library for generating feature vectors from audio data
2 package(
3 default_visibility = ["//visibility:public"],
4 licenses = ["notice"],
5 )
6
7 cc_library(
8 name = "bits",
9 hdrs = ["bits.h"],
10 )
11
12 cc_library(
13 name = "kiss_fft_int16",
14 srcs = [
15 "kiss_fft_int16.cc",
16 ],
17 hdrs = [
18 "kiss_fft_common.h",
19 "kiss_fft_int16.h",
20 ],
21 deps = [
22 "@kissfft//:kiss_fftr",
23 ],
24 )
25
26 cc_library(
27 name = "fft",
28 srcs = [
29 "fft.cc",
30 "fft_util.cc",
31 ],
32 hdrs = [
33 "fft.h",
34 "fft_util.h",
35 ],
36 deps = [
37 ":kiss_fft_int16",
38 ],
39 )
40
41 cc_library(
42 name = "filterbank",
43 srcs = [
44 "filterbank.c",
45 "filterbank_util.c",
46 ],
47 hdrs = [
48 "filterbank.h",
49 "filterbank_util.h",
50 ],
51 deps = [
52 ":bits",
53 ":fft",
54 ],
55 )
56
57 cc_library(
58 name = "frontend",
59 srcs = [
60 "frontend.c",
61 "frontend_util.c",
62 ],
63 hdrs = [
64 "frontend.h",
65 "frontend_util.h",
66 ],
67 deps = [
68 ":bits",
69 ":fft",
70 ":filterbank",
71 ":log_scale",
72 ":noise_reduction",
73 ":pcan_gain_control",
74 ":window",
75 ],
76 )
77
78 cc_library(
79 name = "log_scale",
80 srcs = [
81 "log_lut.c",
82 "log_scale.c",
83 "log_scale_util.c",
84 ],
85 hdrs = [
86 "log_lut.h",
87 "log_scale.h",
88 "log_scale_util.h",
89 ],
90 deps = [
91 ":bits",
92 ],
93 )
94
95 cc_library(
96 name = "noise_reduction",
97 srcs = [
98 "noise_reduction.c",
99 "noise_reduction_util.c",
100 ],
101 hdrs = [
102 "noise_reduction.h",
103 "noise_reduction_util.h",
104 ],
105 )
106
107 cc_library(
108 name = "pcan_gain_control",
109 srcs = [
110 "pcan_gain_control.c",
111 "pcan_gain_control_util.c",
112 ],
113 hdrs = [
114 "pcan_gain_control.h",
115 "pcan_gain_control_util.h",
116 ],
117 deps = [
118 ":bits",
119 ],
120 )
121
122 cc_library(
123 name = "window",
124 srcs = [
125 "window.c",
126 "window_util.c",
127 ],
128 hdrs = [
129 "window.h",
130 "window_util.h",
131 ],
132 )
133
134 cc_test(
135 name = "fft_test",
136 srcs = ["fft_test.cc"],
137 deps = [
138 ":fft",
139 "//tensorflow/lite/micro/testing:micro_test",
140 ],
141 )
142
143 cc_test(
144 name = "filterbank_test",
145 srcs = ["filterbank_test.cc"],
146 # Setting copts for experimental code to [], but this code should be fixed
147 # to build with the default copts (micro_copts())
148 copts = [],
149 deps = [
150 ":filterbank",
151 "//tensorflow/lite/micro/testing:micro_test",
152 ],
153 )
154
155 cc_test(
156 name = "frontend_test",
157 srcs = ["frontend_test.cc"],
158 # Setting copts for experimental code to [], but this code should be fixed
159 # to build with the default copts (micro_copts())
160 copts = [],
161 deps = [
162 ":frontend",
163 "//tensorflow/lite/micro/testing:micro_test",
164 ],
165 )
166
167 cc_test(
168 name = "log_scale_test",
169 srcs = ["log_scale_test.cc"],
170 # Setting copts for experimental code to [], but this code should be fixed
171 # to build with the default copts (micro_copts())
172 copts = [],
173 deps = [
174 ":log_scale",
175 "//tensorflow/lite/micro/testing:micro_test",
176 ],
177 )
178
179 cc_test(
180 name = "noise_reduction_test",
181 srcs = ["noise_reduction_test.cc"],
182 # Setting copts for experimental code to [], but this code should be fixed
183 # to build with the default copts (micro_copts())
184 copts = [],
185 deps = [
186 ":noise_reduction",
187 "//tensorflow/lite/micro/testing:micro_test",
188 ],
189 )
190
191 cc_test(
192 name = "pcan_gain_control_test",
193 srcs = ["pcan_gain_control_test.cc"],
194 # Setting copts for experimental code to [], but this code should be fixed
195 # to build with the default copts (micro_copts())
196 copts = [],
197 deps = [
198 ":pcan_gain_control",
199 "//tensorflow/lite/micro/testing:micro_test",
200 ],
201 )
202
203 cc_test(
204 name = "window_test",
205 srcs = ["window_test.cc"],
206 # Setting copts for experimental code to [], but this code should be fixed
207 # to build with the default copts (micro_copts())
208 copts = [],
209 deps = [
210 ":window",
211 "//tensorflow/lite/micro/testing:micro_test",
212 ],
213 )