/
route.go
49 lines (44 loc) · 945 Bytes
/
route.go
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
package main
import (
"gottb.io/goru"
"gottb.io/goru/route"
"gottb.io/goru/web"
)
func speak(c *web.Context) {
w := web.GetWriter(c)
w.Render("speak.html", goru.Data{
"Sentences": []string{
"Hello",
"Goodbye",
"Help",
"Help me",
"List",
"Yes",
"No",
"Start",
"Next",
"Back",
"Stop",
"Start",
"Open photography",
"Add photography",
"Remove photography",
"Show me cute kittens",
"Show me Arches National Park!",
"This specification defines a JavaScript API to enable web developers to incorporate speech recognition and synthesis into their web pages.",
},
})
}
func recognition(c *web.Context) {
w := web.GetWriter(c)
w.Render("recognition.html", &goru.Data{})
}
func gesture(c *web.Context) {
w := web.GetWriter(c)
w.Render("gesture.html", &goru.Data{})
}
func init() {
route.Get("/speak", speak)
route.Get("/gesture", gesture)
route.Get("/recognition", recognition)
}