ASR-prueba / templates /index.html
JPLTedCas's picture
Update templates/index.html
81af860
raw
history blame
No virus
691 Bytes
<!DOCTYPE html>
<html>
<head>
<title>WebSockets y Reconocimiento de Voz</title>
</head>
<body>
<div id="output"></div>
<button onclick="startRecognition()">Comenzar Reconocimiento</button>
<script src="https://cdnjs.cloudflare.com/ajax/libs/socket.io/4.0.1/socket.io.js"></script>
<script>
const socket = io.connect('https://' + document.domain + ':' + location.port);
socket.on('response', function (message) {
const output = document.getElementById('output');
output.innerHTML = message;
});
function startRecognition() {
socket.emit('recognize_speech');
}
</script>
</body>
</html>