forked from awslabs/aws-lex-browser-audio-capture
-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
63 lines (56 loc) · 2.51 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
59
60
61
62
63
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>AmazonLex</title>
<meta name="author" content="lafranch">
<meta name="description" content="Lex Runtime example from the browser.">
<meta name="keywords" content="Amazon Lex, SDK, Runtime, Browser, JavaScript">
<link rel="icon" type="image/png" href="images/favicon-32x32.png" sizes="32x32" />
<link rel="icon" type="image/png" href="images/favicon-16x16.png" sizes="16x16" />
<link rel="stylesheet" href="css/style.css">
</head>
<body class="wrapper">
<div class="align-center audio-control">
<p id="audio-control" class="white-circle rel">
<i class="icon-applaud-bullhorn button button-circle txt-xxlarge marg zindex-hi rel "></i>
<canvas class="visualizer abs pos-right width100 height100"></canvas>
</p>
<p><span id="message">Click and talk</span></p>
Send to mbaas
<input type="checkbox" id="SEND_MBAAS" name="SEND TO MBAAS" >
<div>
<p>
<input type="text" id="ACCESS_KEY_ID" name="ACCESS KEY ID" placeholder="Access Key Id" value="">
</p>
<p>
<input type="text" id="SECRET_KEY" name="SECRET KEY" placeholder="Secret Key" value="">
</p>
<p>
<input type="text" id="BOT" name="BOT" placeholder="Bot Name" value="AskApplaud">
</p>
<p>
<input type="text" id="userId" name="userId" placeholder="User id" value="1234">
</p>
</div>
</div>
<script src="https://cdnjs.cloudflare.com/ajax/libs/then-request/2.2.0/request.js"></script>
<script src="https://sdk.amazonaws.com/js/aws-sdk-2.48.0.min.js"></script>
<script type="text/javascript">
window.lexaudio = {};
</script>
<script src="scripts/control.js" type="text/javascript"></script>
<script src="scripts/recorder.js" type="text/javascript"></script>
<script src="scripts/renderer.js" type="text/javascript"></script>
<script src="scripts/conversation.js" type="text/javascript"></script>
<script type="text/javascript">
//this needs to load on doc ready!!
setTimeout(function(){
console.log('ready!!?')
if (window.addEventListener) window.addEventListener("load", new lexaudio.example(), false);
else if (window.attachEvent) window.attachEvent("onload", setup(new lexaudio.example()));
else window.onload = new lexaudio.example();
}, 11000)
</script>
</body>
</html>