-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
58 lines (57 loc) · 2.57 KB
/
index.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>
<title>visible speech</title>
<link rel="stylesheet" type="text/css" href="//maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css">
<link rel="stylesheet" type="text/css" href="style.css">
<script src="//ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script>
<script src="script.js"></script>
<!-- Google tag (gtag.js) -->
<script async src="https://www.googletagmanager.com/gtag/js?id=G-ELR1YNE3DE"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
gtag('config', 'G-ELR1YNE3DE');
</script>
</head>
<body>
<div class="header">
<i id="mic" class="control fa fa-microphone" aria-hidden="true" title="Toogle mic (red when listening)"></i>
<i id="zoomIn" class="control fa fa-search-plus" aria-hidden="true" title="Bigger text"></i>
<i id="zoomOut" class="control fa fa-search-minus" aria-hidden="true" title="Smaller text"></i>
<i id="clear" class="control fa fa-window-close" aria-hidden="true" title="Clear screen"></i>
<a href="https://github.com/bmamlin/visible-speech"><img class="logo" src="visible-speech.png" /></a>
<p class="help">
Say "clear screen" (or just "clear") to clear screen. Other voice commands: "new line", "new paragraph", "undo" (or "delete"), zoom in", "zoom out" (or "bigger", "smaller") and "stop listening". Tip: you can also dictate punctuation (e.g., say "question mark").
</p>
</div>
<div id="out"></div>
<div id="incompatible">
Bummer. It doesn't look like your browser is compatible with visible speech. This tool uses the speech recognition engine generously provided by the kind people at Google within the <a href="https://www.google.com/chrome/">Chrome browser</a>. Please try opening <a href="http://visiblespeech.com">visiblespeech.com</a> in a recent version of Chrome.
</div>
<script>
$(document).ready(function() {
$('#mic').click(startButton);
var zoomTimer;
var zoomInFn = function() {
increaseFont();
zoomTimer = setTimeout(zoomInFn, 100);
};
var zoomOutFn = function() {
decreaseFont();
zoomTimer = setTimeout(zoomOutFn, 100);
};
$('#zoomIn').mousedown(zoomInFn)
.mouseup(function() { clearInterval(zoomTimer); })
.mouseout(function() { clearInterval(zoomTimer); });
$('#zoomOut').mousedown(zoomOutFn)
.mouseup(function() { clearInterval(zoomTimer); })
.mouseout(function() { clearInterval(zoomTimer); });
$('#clear').click(clearScreen);
setFontSize(localStorage.getItem('visiblespeech.fontSize'));
startButton();
});
</script>
</body>
</html>