Spaces:
Sleeping
Sleeping
Update templates/index.html
Browse files- templates/index.html +1 -4
templates/index.html
CHANGED
@@ -128,6 +128,7 @@
|
|
128 |
// Handle recognition results
|
129 |
recognition.onresult = function(event) {
|
130 |
const transcript = event.results[event.resultIndex][0].transcript.trim();
|
|
|
131 |
if (event.results[event.resultIndex].isFinal) {
|
132 |
if (!nameInput.value) {
|
133 |
// If name is empty, fill it with the recognized text
|
@@ -151,10 +152,6 @@
|
|
151 |
status.textContent = 'Error recognizing speech. Please try again.';
|
152 |
};
|
153 |
}
|
154 |
-
|
155 |
-
// Event listener for button to start listening
|
156 |
-
document.getElementById('status').addEventListener('click', startListening);
|
157 |
</script>
|
158 |
</body>
|
159 |
</html>
|
160 |
-
|
|
|
128 |
// Handle recognition results
|
129 |
recognition.onresult = function(event) {
|
130 |
const transcript = event.results[event.resultIndex][0].transcript.trim();
|
131 |
+
console.log('Recognized Text:', transcript); // Debugging line
|
132 |
if (event.results[event.resultIndex].isFinal) {
|
133 |
if (!nameInput.value) {
|
134 |
// If name is empty, fill it with the recognized text
|
|
|
152 |
status.textContent = 'Error recognizing speech. Please try again.';
|
153 |
};
|
154 |
}
|
|
|
|
|
|
|
155 |
</script>
|
156 |
</body>
|
157 |
</html>
|
|