geethareddy commited on
Commit
f5b6718
·
verified ·
1 Parent(s): 36d7045

Update templates/index.html

Browse files
Files changed (1) hide show
  1. templates/index.html +2 -5
templates/index.html CHANGED
@@ -46,7 +46,7 @@
46
  };
47
 
48
  mediaRecorder.start();
49
- setTimeout(() => mediaRecorder.stop(), 5000); // Record for 5 seconds
50
  });
51
  }
52
 
@@ -60,10 +60,7 @@
60
  });
61
 
62
  const result = await response.json();
63
- if (result.error) {
64
- return "Error: " + result.error;
65
- }
66
- return result.text;
67
  }
68
 
69
  async function startInteraction() {
 
46
  };
47
 
48
  mediaRecorder.start();
49
+ setTimeout(() => mediaRecorder.stop(), 7000); // Record for 7 seconds
50
  });
51
  }
52
 
 
60
  });
61
 
62
  const result = await response.json();
63
+ return result.text || 'Error capturing speech';
 
 
 
64
  }
65
 
66
  async function startInteraction() {