-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
119 lines (97 loc) · 4.31 KB
/
index.html
File metadata and controls
119 lines (97 loc) · 4.31 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
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Cronograma</title>
<link rel="stylesheet" href="Stiles.css">
<script src="Scriptcrono.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/jspdf/1.3.2/jspdf.min.js"></script>
<script src="jquery-3.6.0.min.js"></script>
<!-- Autor leodevfull-->
</head>
<body>
<div class="menu" >Menu </div>
<div class="page" >
<div class="sidebar">Sidebar
<div style="width:200px;">
<select id="miSelect" onchange="agregar()">
<option value="0">Seleccione Mes:</option>
<option value="1">Enero</option>
<option value="2">Febrero</option>
<option value="3">Marzo</option>
<option value="4">Abril</option>
<option value="5">Mayo</option>
<option value="6">Junio</option>
<option value="7">Julio</option>
<option value="8">Agosto</option>
<option value="9">Septiembre</option>
<option value="10">Octubre</option>
<option value="11">Novienbre</option>
<option value="12">Diciembre</option>
</select>
</div> <br> <br>
Fecha: <input id="fec" style="margin:10px" type="date"><br><br>
Actividad:<input id="act" style="margin:4px" type="text"><br><br>
Responsable: <input id="res" style="margin:20px"type="text" value="Catequista"><br><br>
Lugar: <input id="lug" style="margin:25px" type="text"value="Salón parroquial"><br><br>
<button id="btn_guardar" onclick="guardar()">Guardar</button><br><br>
<button id="btn_enviar" onclick="enviarpdf()">Guardar en pdf</button><br><br>
<p><button type="button" onclick="runSpeechRecognition()">Speech to Text</button> <span id="action"></span></p>
<div id="output" class="hide"></div>
</div>
<div class="content" >
</div>
</div>
<div id="corazon">
<table id="tbl" >
<thead >
<tr id="mes"></tr>
<tr>
<th>Fecha</th>
<th>Actividad</th>
<th>Responsable</th>
<th>Lugar</th>
</tr>
</thead>
<tbody id="tablecrono">
</tbody>
</table>
</div>
<script>
/* JS comes here */
function runSpeechRecognition() {
// get output div reference
var output = document.getElementById("output");
// get action element reference
var action = document.getElementById("action");
// new speech recognition object
var SpeechRecognition = SpeechRecognition || webkitSpeechRecognition;
var recognition = new SpeechRecognition();
// This runs when the speech recognition service starts
function init(){
recognition.onstart = function() {
action.innerHTML = "<small>listening, please speak...</small>";
};
}
setTimeout(init(),5000);
recognition.onspeechend = function() {
action.innerHTML = "<small>stopped listening, hope you are done...</small>";
recognition.stop();
}
// This runs when the speech recognition service returns result
recognition.onresult = function(event) {
var act = document.getElementById("act");
var transcript = event.results[0][0].transcript;
var confidence = event.results[0][0].confidence;
output.innerHTML = "<b>Text:</b> " + transcript + "<br/> <b>Confidence:</b> " + confidence*100+"%";
output.classList.remove("hide");
act.value=transcript;
};
// start recognition
recognition.start();
}
</script>
</body>
</html>