forked from Xbot-me/voice-based-emailing-system
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathrepeat-instructions.php
More file actions
75 lines (64 loc) · 2.68 KB
/
Copy pathrepeat-instructions.php
File metadata and controls
75 lines (64 loc) · 2.68 KB
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
<?php
header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); # Date In The Past
header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT"); # Always Modified
header("Cache-Control: no-store, no-cache, must-revalidate"); # HTTP/1.1
header("Cache-Control: post-check=0, pre-check=0", false);
header("Pragma: no-cache"); # HTTP/1.0
if (isset($_POST["answer"])) {
$answer = $_POST["answer"];
if ($answer === 'yes') {
header('location:repeat-instructions.php');
} else if ($answer === 'no') {
header('location:question3.php');
} else {
header('location:error.php');
}
}
?>
<!DOCTYPE html>
<html lang="en" >
<head>
<meta http-equiv="cache-control" content="max-age=0">
<meta http-equiv="cache-control" content="no-cache">
<meta http-equiv="expires" content="-1">
<meta http-equiv="expires" content="Tue, 01 Jan 1980 11:00:00 GMT">
<meta http-equiv="pragma" content="no-cache">
<meta name="pragma" content="no-cache">
<meta charset="UTF-8">
<meta http-equiv="refresh" content="30;url=" />
<title>Building a Speech enabled text field</title>
<link rel='stylesheet' href='http://fonts.googleapis.com/css?family=Roboto'>
<link rel="stylesheet" href="css/style.css">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<style>
body{
background-image: url("images/heart.gif"); /* The image used */
background-repeat: no-repeat; /* Do not repeat the image */
background-size: cover; /* Resize the background image to cover the entire container */
}
</style>
</head>
<body onload="startDictation()">
<div style="display: none">
<iframe src="sounds/repeat_instruction.mp3" allow="autoplay" id="iframeAudio"></iframe>
<audio autoplay loop id="playAudio">
<source src="sounds/instructions.mp3">
</audio>
<form id="labnol" method="POST" action="">
<div class="speech">
<input type="text" name="answer" id="transcript" placeholder="Speak" />
<img src="//i.imgur.com/cHidSVu.gif" />
</div>
</form>
</div>
<script src="js/index.js"></script>
<script>
var isChrome = /Chrome/.test(navigator.userAgent) && /Google Inc/.test(navigator.vendor);
if (!isChrome) {
$('#iframeAudio').remove()
} else {
$('#playAudio').remove() //just to make sure that it will not have 2x audio in the background
}
</script>
</body>
</html>