Spaces:
Sleeping
Sleeping
Update templates/index.html
Browse files- templates/index.html +8 -1
templates/index.html
CHANGED
@@ -124,6 +124,10 @@
|
|
124 |
currentName += transcript + " "; // Space between letters for readability
|
125 |
nameInput.value = currentName.trim(); // Display the updated name
|
126 |
};
|
|
|
|
|
|
|
|
|
127 |
}
|
128 |
|
129 |
function startListeningForEmail() {
|
@@ -131,7 +135,6 @@
|
|
131 |
const emailInput = document.getElementById('email');
|
132 |
|
133 |
// Reset recognition for email input
|
134 |
-
recognition.stop();
|
135 |
recognition = new webkitSpeechRecognition();
|
136 |
recognition.continuous = false;
|
137 |
recognition.interimResults = false;
|
@@ -161,6 +164,10 @@
|
|
161 |
currentEmail += transcript + " ";
|
162 |
emailInput.value = currentEmail.trim();
|
163 |
};
|
|
|
|
|
|
|
|
|
164 |
}
|
165 |
|
166 |
function startProcess() {
|
|
|
124 |
currentName += transcript + " "; // Space between letters for readability
|
125 |
nameInput.value = currentName.trim(); // Display the updated name
|
126 |
};
|
127 |
+
|
128 |
+
recognition.onspeechend = function() {
|
129 |
+
recognition.stop(); // Stop after input ends
|
130 |
+
};
|
131 |
}
|
132 |
|
133 |
function startListeningForEmail() {
|
|
|
135 |
const emailInput = document.getElementById('email');
|
136 |
|
137 |
// Reset recognition for email input
|
|
|
138 |
recognition = new webkitSpeechRecognition();
|
139 |
recognition.continuous = false;
|
140 |
recognition.interimResults = false;
|
|
|
164 |
currentEmail += transcript + " ";
|
165 |
emailInput.value = currentEmail.trim();
|
166 |
};
|
167 |
+
|
168 |
+
recognition.onspeechend = function() {
|
169 |
+
recognition.stop(); // Stop after input ends
|
170 |
+
};
|
171 |
}
|
172 |
|
173 |
function startProcess() {
|