Spaces:
Runtime error
Runtime error
Update templates/index.html
Browse files- templates/index.html +2 -2
templates/index.html
CHANGED
@@ -87,7 +87,7 @@
|
|
87 |
document.getElementById('status').textContent = "Listening for your name...";
|
88 |
recognition.start();
|
89 |
recognition.onresult = function(event) {
|
90 |
-
let finalTranscript = event.results[
|
91 |
document.getElementById('name').value = finalTranscript;
|
92 |
};
|
93 |
recognition.onend = function() {
|
@@ -99,7 +99,7 @@
|
|
99 |
document.getElementById('status').textContent = "Listening for your email...";
|
100 |
recognition.start();
|
101 |
recognition.onresult = function(event) {
|
102 |
-
let finalTranscript = event.results[
|
103 |
finalTranscript = finalTranscript.replace(/\bat\b|\battherate\b|\bat the rate\b/gi, '@').replace(/\bdot\b/gi, '.');
|
104 |
document.getElementById('email').value = finalTranscript;
|
105 |
};
|
|
|
87 |
document.getElementById('status').textContent = "Listening for your name...";
|
88 |
recognition.start();
|
89 |
recognition.onresult = function(event) {
|
90 |
+
let finalTranscript = event.results[0][0].transcript.replace(/\s+/g, "");
|
91 |
document.getElementById('name').value = finalTranscript;
|
92 |
};
|
93 |
recognition.onend = function() {
|
|
|
99 |
document.getElementById('status').textContent = "Listening for your email...";
|
100 |
recognition.start();
|
101 |
recognition.onresult = function(event) {
|
102 |
+
let finalTranscript = event.results[0][0].transcript.replace(/\s+/g, "");
|
103 |
finalTranscript = finalTranscript.replace(/\bat\b|\battherate\b|\bat the rate\b/gi, '@').replace(/\bdot\b/gi, '.');
|
104 |
document.getElementById('email').value = finalTranscript;
|
105 |
};
|