Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -87,13 +87,14 @@ def home():
|
|
87 |
|
88 |
function clearTranscription() {
|
89 |
liveOutput.textContent = '';
|
|
|
90 |
}
|
91 |
|
92 |
// Start and stop functions
|
93 |
document.getElementById('start').addEventListener('click', () => {
|
94 |
recognition.start();
|
95 |
-
intervalId = setInterval(() => sendTranscriptionToServer(lastTranscription),
|
96 |
-
setInterval(clearTranscription,
|
97 |
});
|
98 |
document.getElementById('stop').addEventListener('click', () => {
|
99 |
recognition.stop();
|
|
|
87 |
|
88 |
function clearTranscription() {
|
89 |
liveOutput.textContent = '';
|
90 |
+
currentTranscription = '';
|
91 |
}
|
92 |
|
93 |
// Start and stop functions
|
94 |
document.getElementById('start').addEventListener('click', () => {
|
95 |
recognition.start();
|
96 |
+
intervalId = setInterval(() => sendTranscriptionToServer(lastTranscription), 350);
|
97 |
+
setInterval(clearTranscription, 3500); // Clear transcription every 2 seconds
|
98 |
});
|
99 |
document.getElementById('stop').addEventListener('click', () => {
|
100 |
recognition.stop();
|