Spaces:
Running
Running
Update index.js
Browse files
index.js
CHANGED
|
@@ -305,7 +305,11 @@ async function initMedia() {
|
|
| 305 |
if (audioUrl) window.URL.revokeObjectURL(audioUrl);
|
| 306 |
audioUrl = window.URL.createObjectURL(blob);
|
| 307 |
audioChunks = [];
|
| 308 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
| 309 |
sendQuery({audioSource: audioUrl});
|
| 310 |
};
|
| 311 |
} catch (error) {
|
|
|
|
| 305 |
if (audioUrl) window.URL.revokeObjectURL(audioUrl);
|
| 306 |
audioUrl = window.URL.createObjectURL(blob);
|
| 307 |
audioChunks = [];
|
| 308 |
+
// HACK FOR TESTING
|
| 309 |
+
const audioElement = new Audio();
|
| 310 |
+
audioElement.src = audioUrl;
|
| 311 |
+
audioElement.play();
|
| 312 |
+
// HACK
|
| 313 |
sendQuery({audioSource: audioUrl});
|
| 314 |
};
|
| 315 |
} catch (error) {
|