Database Reference
In-Depth Information
F
a
s
t
1
-
ch
d
e
t
e
c
t
i
on
Temp
o
r
a
l
s
elec
t
i
o
n
Detect
<emit,t1,t2>
<audio>
Audio0
<audio>
Audio1
Audio2
Audio3
sync4
<audio>
<audio>
<w[4]>
Enh
a
nce
a
n
d
c
l
assi
f
y
f
u
ll
da
t
aset
(expe
n
s
i
v
e
)
<type, id>
Beamform
Classify
<DOA, enhanced>
zip2
Output
<<DOA, combined>, <type, id>>
Figure 11.2
Marmot call detection workflow.
first as a workflow diagram and then as the equivalent WaveScript subquery.
The
marmot
function uses
detect
, a reusable detection algorithm, to iden-
tify the portions of the stream most likely to contain marmot calls, and then
extracts those segments and passes them to the rest of the workflow, which en-
hances and classifies the calls. Several streams are defined:
Ch0..3
are streams
of
SigSeg
tuples.
Type annotations (e.g., line 2) may be included for clarity, but they are op-
tional. Types are inferred from variable usage using standard techniques
18
:
<
>
, while
control
is a stream of
<
>
int16
bool,time,time
fun marmot(Ch0, Ch1, Ch2, Ch3, net) {
Ch0 : stream<SigSeg<int16>>
// Detector on sensor inputs
control : stream<bool,time,time>
control = detect(Ch0, marmotScore, <64,192>,
<16.0, 0.999, 40, 2400, 48000>);
// Control stream used to extract data windows.
windows : stream<SigSeg<int16>[4]>
windows =
sync4(filter_lapped(merge(control, net)),
Ch0, Ch1, Ch2, Ch4);
// ... and process them: enhance
beam<doa,enhanced> = beamform(windows, geometry);
// ... and classify
marmots = classify(beam.enhanced, marmotSig);
// Return tuple of control and result streams
return <control, zip2(beam, marmots)>;
}
Figure 11.3
Equivalent WaveScript subquery.