mirror of
https://github.com/open-webui/open-webui
synced 2025-05-31 11:00:49 +00:00
refac: voice recording
This commit is contained in:
parent
79dff685ea
commit
40a3e7786b
@ -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);
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user