Spaces:
Sleeping
Sleeping
Update templates/index.html
Browse files- templates/index.html +6 -0
templates/index.html
CHANGED
@@ -123,6 +123,12 @@
|
|
123 |
function startListeningForEmail() {
|
124 |
const status = document.getElementById('status');
|
125 |
const emailInput = document.getElementById('email');
|
|
|
|
|
|
|
|
|
|
|
|
|
126 |
status.textContent = "Listening for your email...";
|
127 |
recognition.start();
|
128 |
recognition.onresult = function(event) {
|
|
|
123 |
function startListeningForEmail() {
|
124 |
const status = document.getElementById('status');
|
125 |
const emailInput = document.getElementById('email');
|
126 |
+
recognition.stop(); // Stop the previous recognition
|
127 |
+
recognition = new webkitSpeechRecognition(); // Recreate a new recognition object
|
128 |
+
recognition.continuous = false; // Reset to stop after capturing each input
|
129 |
+
recognition.interimResults = false;
|
130 |
+
recognition.lang = 'en-US'; // Reset language
|
131 |
+
|
132 |
status.textContent = "Listening for your email...";
|
133 |
recognition.start();
|
134 |
recognition.onresult = function(event) {
|