Spaces:
Sleeping
Sleeping
Update templates/index.html
Browse files- templates/index.html +6 -2
templates/index.html
CHANGED
@@ -8,7 +8,7 @@
|
|
8 |
<style>
|
9 |
body {
|
10 |
font-family: 'Roboto', sans-serif;
|
11 |
-
background: linear-gradient(135deg, #f4c542, #ff8f6a);
|
12 |
margin: 0;
|
13 |
display: flex;
|
14 |
justify-content: center;
|
@@ -119,7 +119,11 @@
|
|
119 |
recognition.start();
|
120 |
|
121 |
recognition.onresult = function(event) {
|
122 |
-
|
|
|
|
|
|
|
|
|
123 |
emailInput.value = transcript;
|
124 |
recognition.stop();
|
125 |
|
|
|
8 |
<style>
|
9 |
body {
|
10 |
font-family: 'Roboto', sans-serif;
|
11 |
+
background: linear-gradient(135deg, #f4c542, #ff8f6a); /* Light gradient background */
|
12 |
margin: 0;
|
13 |
display: flex;
|
14 |
justify-content: center;
|
|
|
119 |
recognition.start();
|
120 |
|
121 |
recognition.onresult = function(event) {
|
122 |
+
let transcript = event.results[0][0].transcript.trim();
|
123 |
+
|
124 |
+
// Replace spoken variations of "at" with "@" for emails
|
125 |
+
transcript = transcript.replace(/\bat\b/g, '@');
|
126 |
+
|
127 |
emailInput.value = transcript;
|
128 |
recognition.stop();
|
129 |
|