-
Notifications
You must be signed in to change notification settings - Fork 0
/
translate.html
58 lines (58 loc) · 1.63 KB
/
translate.html
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
<!DOCTYPE html>
<html>
<head>
<script src="https://cdnjs.cloudflare.com/ajax/libs/p5.js/0.9.0/p5.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/p5.js/0.9.0/addons/p5.dom.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/p5.js/0.9.0/addons/p5.sound.min.js"></script>
<script src="https://unpkg.com/[email protected]/dist/ml5.min.js"></script>
<style>
html,
body {
height: 100%;
margin: 0;
padding: 0;
}
body {
display: flex;
align-items: center;
justify-content: center;
flex-direction: column;
}
button {
font-size: 24px;
padding: 12px 24px;
}
select {
font-size: 16px;
padding: 8px;
height: 40px;
width: 300px;
}
</style>
<meta charset="utf-8" />
</head>
<body>
<select id="webcam-list"></select>
<div class="buttons">
<button id="stop-cam">Stop Camera</button>
<button id="play-cam">Play Camera</button>
<div id="google_translate_element"></div>
</div>
<label id="result">WAITING FOR SENTENCE...</label>
<script src="setup.js"></script>
<script src="buttons.js"></script>
<script src="classify.js"></script>
<script
type="text/javascript"
src="//translate.google.com/translate_a/element.js?cb=googleTranslateElementInit"
></script>
<script type="text/javascript">
function googleTranslateElementInit() {
new google.translate.TranslateElement(
{ pagelanguage: "en" },
"google_translate_element"
);
}
</script>
</body>
</html>