Spaces:
Runtime error
Runtime error
Update templates/index.html
Browse files- templates/index.html +2 -5
templates/index.html
CHANGED
@@ -46,7 +46,7 @@
|
|
46 |
};
|
47 |
|
48 |
mediaRecorder.start();
|
49 |
-
setTimeout(() => mediaRecorder.stop(),
|
50 |
});
|
51 |
}
|
52 |
|
@@ -60,10 +60,7 @@
|
|
60 |
});
|
61 |
|
62 |
const result = await response.json();
|
63 |
-
|
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() {
|