-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathenglish.vxml
153 lines (135 loc) · 5.07 KB
/
english.vxml
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
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
<vxml version="2.1" xml:lang="en-US" application="root.vxml">
<link event="help">
<grammar src="grammar-english/ayuda.jsgf"/>
</link>
<script src="scripts/calculaPrecio.js"/>
<var name="edificio_global"/>
<var name="horario_global"/>
<var name="movilidad_reducida_global" expr="'no'"/>
<var name="otra_discapacidad_global" expr="'no'"/>
<var name="precio" expr="7.5"/>
<form id="informacion_entradas">
<block>
<prompt bargein="false"> Welcome to the Alhambra ticket information service. </prompt>
<break time="500ms"/>
</block>
<field name="edificio">
<grammar src="grammar-english/edificio.jsgf"/>
<prompt count="1"> Which building of the Alhambra do you want to get information about the tickets? </prompt>
<prompt count="3"> Please, say help to know the available options. </prompt>
<help>
<throw event="help_edificios_eng"/>
</help>
<noinput>
<throw event="help_edificios_eng"/>
</noinput>
</field>
<field name="horario">
<grammar src="grammar-english/horario.jsgf"/>
<prompt count="1"> What schedule are you interested in? </prompt>
<prompt count="3"> Please, say help to know the available options. </prompt>
<help>
<throw event="help_horarios_eng"/>
</help>
<noinput>
<throw event="help_horarios_eng"/>
</noinput>
</field>
<field name="confirmar_ed_hor" type="boolean">
<prompt>
You said you want information about
<value expr="edificio"/>
<value expr="horario"/> schedule.
Is the information provided correct?
</prompt>
<filled>
<if cond="confirmar_ed_hor && confirmar_ed_hor$.confidence > 0.6">
Very well. Let's continue.
<assign name="edificio_global" expr="edificio"/>
<assign name="horario_global" expr="horario"/>
<else/>
Very well. I shall ask you again.
<clear namelist="edificio horario confirmar_ed_hor"/>
</if>
</filled>
</field>
<field name="confirmar_asistencia" type="boolean">
<prompt>Do you have any kind of <emphasis> disability </emphasis>? </prompt>
<filled>
<if cond="confirmar_asistencia && confirmar_asistencia$.confidence > 0.6">
We will try to offer you better information about ticket prices.
<goto next="#asistencia"/>
<elseif cond="confirmar_asistencia==false && confirmar_asistencia$.confidence > 0.6"/>
<goto next="#precios"/>
<else/>
<prompt> I didn't understand you.</prompt>
<clear namelist="confirmar_asistencia"/>
</if>
</filled>
</field>
</form>
<form id="asistencia">
<field name="movilidad_reducida" type="boolean">
<prompt> Do you have reduced mobility or need any kind of assistance?</prompt>
<filled>
<if cond="movilidad_reducida && movilidad_reducida$.confidence > 0.6">
<prompt> All right. </prompt>
<assign name="movilidad_reducida_global" expr="'si'"/>
</if>
</filled>
</field>
<field name="otra_discapacidad" type="boolean">
<prompt> Do you have any other kind of disability, such as blindness or deafness?</prompt>
<filled>
<if cond="otra_discapacidad && otra_discapacidad$.confidence > 0.6">
<assign name="otra_discapacidad_global" expr="'si'"/>
<prompt> All right. </prompt>
<goto next="#precios"/>
<else/>
<goto next="#precios"/>
</if>
</filled>
</field>
</form>
<form id="precios">
<block>
With all the information you have provided me, the entrance will cost you <emphasis level="strong">
<say-as type="currency">EUR<value expr="calcularPrecioFinal(precio, edificio_global, horario_global, movilidad_reducida_global, otra_discapacidad_global)"/>
</say-as> </emphasis>
<break time="200ms"/>
</block>
<field name="opcion">
<grammar src="grammar-english/salir.jsgf"/>
<prompt count="1"> Do you want to check the price of another ticket or leave any feedback? </prompt>
<prompt count="3"> Please, say help to know the available options. </prompt>
<filled>
<if cond="opcion=='check another ticket' && opcion$.confidence > 0.5">
<clear namelist="edificio horario confirmar_ed_hor movilidad_reducida otra_discapacidad"/>
<assign name="movilidad_reducida_global" expr="'no'"/>
<assign name="otra_discapacidad_global" expr="'no'"/>
<goto next="#informacion_entradas"/>
<elseif cond="opcion=='feedback' && opcion$.confidence > 0.5"/>
<goto next="#sugerencias"/>
<elseif cond="(opcion=='no' || opcion=='exit')&& opcion$.confidence > 0.5"/>
<throw event="exit_english"/>
<else/>
<prompt> I don't understand. Could you repeat it? </prompt>
<clear namelist="opcion"/>
</if>
</filled>
<help>
<throw event="help_exit"/>
</help>
<noinput>
<throw event="exit_engl"/>
</noinput>
</field>
</form>
<form id="sugerencias">
<record name="sugerencia" beep="true" maxtime="10s" finalsilence="4000ms" dtmfterm="true" type="audio/x-wav">
<prompt> Record your message after listening to the beep </prompt>
<noinput> I didn't hear anything, please try again. </noinput>
</record>
<throw event="exit_engl"/>
</form>
</vxml>