Set listen duration to 20 seconds

This commit is contained in:
Chigozirim Igweamaka 2024-07-14 15:02:45 +01:00
parent f85b3f00d4
commit b52684f5af

View file

@ -153,10 +153,10 @@ function App() {
chunks.push(e.data);
};
// Stop recording after 15 seconds
// Stop recording after 20 seconds
setTimeout(function () {
mediaRecorder.stop();
}, 15000);
}, 20000);
mediaRecorder.addEventListener("stop", () => {
const blob = new Blob(chunks, { type: "audio/wav" });