Spaces:
Sleeping
Sleeping
Update templates/index.html
Browse files- templates/index.html +2 -2
templates/index.html
CHANGED
@@ -32,7 +32,7 @@
|
|
32 |
|
33 |
async function recordAudio() {
|
34 |
const stream = await navigator.mediaDevices.getUserMedia({ audio: true });
|
35 |
-
const mediaRecorder = new MediaRecorder(stream
|
36 |
let audioChunks = [];
|
37 |
|
38 |
return new Promise(resolve => {
|
@@ -46,7 +46,7 @@
|
|
46 |
};
|
47 |
|
48 |
mediaRecorder.start();
|
49 |
-
setTimeout(() => mediaRecorder.stop(),
|
50 |
});
|
51 |
}
|
52 |
|
|
|
32 |
|
33 |
async function recordAudio() {
|
34 |
const stream = await navigator.mediaDevices.getUserMedia({ audio: true });
|
35 |
+
const mediaRecorder = new MediaRecorder(stream);
|
36 |
let audioChunks = [];
|
37 |
|
38 |
return new Promise(resolve => {
|
|
|
46 |
};
|
47 |
|
48 |
mediaRecorder.start();
|
49 |
+
setTimeout(() => mediaRecorder.stop(), 10000); // Wait for user to speak for 10 seconds
|
50 |
});
|
51 |
}
|
52 |
|