-
Notifications
You must be signed in to change notification settings - Fork 36
/
emovoice.pipeline
100 lines (86 loc) · 3.36 KB
/
emovoice.pipeline
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
<?xml version="1.0" encoding="utf-16" standalone="yes"?>
<pipeline>
<register>
<load name="audio" depend="ssidialog.dll"/>
<load name="graphic" />
<load name="model"/>
<load name="ioput"/>
</register>
<gate close="$(audio:loop)">
<framework waitid="reader"/>
</gate>
<!-- audio sensor initialization -->
<gate open="$(audio:live)">
<sensor create="Audio" option="options/audio" sr="$(audio:sr)" scale="true">
<output channel="audio" pin="audio"/>
</sensor>
</gate>
<gate close="$(audio:live)">
<sensor create="WavReader:reader" path="$(audio:file)" blockInSamples="512" scale="true" loop="$(audio:loop)">
<output channel="audio" pin="audio"/>
</sensor>
</gate>
<!-- activity detection -->
<transformer create="AudioActivity" option="data\chunks\activity">
<input pin="audio" frame="0.03s" delta="0.015s"/>
<output pin="vad"/>
</transformer>
<consumer create="TriggerEventSender" option="data\chunks\trigger" address="vad@audio" minDuration="1.0" incDuration="0.5" maxDuration="5.0">
<input pin="vad" frame="0.1s"/>
</consumer>
<!-- feature extraction -->
<consumer create="TupleEventSender" address="feature@audio">
<input pin="audio" address="vad@audio">
<transformer create="Chain" path="chains\$(model:chain)"/>
</input>
</consumer>
<!-- classifier -->
<gate open="$(model:incremental)">
<object create="Classifier" path="models\$(model:type).$(model:chain)" address="emotion-raw@audio">
<listen address="feature@audio"/>
</object>
<object create="DecisionSmoother" address="emotion@audio" update="250" decay="0.01" speed="0.1" window="3.0" average="true">
<listen address="emotion-raw@audio"/>
</object>
</gate>
<gate close="$(model:incremental)">
<object create="Classifier" path="models\$(model:type).$(model:chain)" address="emotion@audio">
<listen address="feature@audio" state="completed"/>
</object>
</gate>
<!-- event sender -->
<object create="XMLEventSender:monitor" address="emovoice@xml" path="emovoice.xml" monitor="true" mname="RESULT" console="false" update="100" coldelim=" ">
<listen address="emotion@audio"/>
</object>
<!-- bar plots -->
<object create="EventPainter:eplot" title="EMOTION" type="1" fix="1.0" global="true" autoscale="false">
<listen address="emotion@audio"/>
</object>
<object create="FileEventWriter" path="result">
<listen address="emotion@audio"/>
</object>
<!-- visualization -->
<consumer create="SignalPainter:plot" title="AUDIO - RAW" size="10" type="2" autoscale="false" fix="-1.0,1.0">
<input pin="audio" frame="0.02s"/>
</consumer>
<consumer create="SignalPainter:plot" title="AUDIO - ACTIVITY" size="10" type="0">
<input pin="vad" frame="0.02s"/>
</consumer>
<!-- wav output -->
<gate close="$(audio:live)">
<consumer create="AudioPlayer" option="options\aplayer">
<input pin="audio" frame="0.1s"/>
</consumer>
</gate>
<!-- event output -->
<object create="FileEventWriter" path="emovoice">
<listen address="emotion@audio"/>
</object>
<!-- decoration -->
<object create="Decorator" icon="true" title="Pipeline">
<area pos="0,0,400,600">console</area>
<area pos="400,0,800,300">eplot*</area>
<area pos="400,300,400,300">plot*</area>
<area pos="800,300,400,300">monitor*</area>
</object>
</pipeline>