mirror of
https://github.com/open-webui/open-webui.git
synced 2025-12-15 11:27:46 +01:00
refac: voice recording
This commit is contained in:
@@ -159,7 +159,7 @@
|
||||
};
|
||||
|
||||
const startRecording = async () => {
|
||||
startDurationCounter();
|
||||
loading = true;
|
||||
|
||||
stream = await navigator.mediaDevices.getUserMedia({
|
||||
audio: {
|
||||
@@ -171,6 +171,9 @@
|
||||
mediaRecorder = new MediaRecorder(stream);
|
||||
mediaRecorder.onstart = () => {
|
||||
console.log('Recording started');
|
||||
loading = false;
|
||||
startDurationCounter();
|
||||
|
||||
audioChunks = [];
|
||||
analyseAudio(stream);
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user