lokesh341 commited on
Commit
d6d83af
·
verified ·
1 Parent(s): 19b4f7c

Update templates/index.html

Browse files
Files changed (1) hide show
  1. templates/index.html +4 -2
templates/index.html CHANGED
@@ -121,8 +121,10 @@
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, '@').trim();
 
 
126
 
127
  // Remove unwanted spaces from the email input
128
  emailInput.value = transcript;
 
121
  recognition.onresult = function(event) {
122
  let transcript = event.results[0][0].transcript.trim();
123
 
124
+ // If name is captured, we now capture email
125
+ if (isNameCaptured && !isEmailCaptured) {
126
+ // Correct email input format by removing spaces and handling @ properly
127
+ const cleanedEmail = transcript.replace(/\s/g, '').replace('@', ' @ '); // Keep space around '@' properly
128
 
129
  // Remove unwanted spaces from the email input
130
  emailInput.value = transcript;