|
@@ -171,7 +171,7 @@
|
|
mediaRecorder.ondataavailable = (event) => audioChunks.push(event.data);
|
|
mediaRecorder.ondataavailable = (event) => audioChunks.push(event.data);
|
|
mediaRecorder.onstop = async () => {
|
|
mediaRecorder.onstop = async () => {
|
|
console.log('Recording stopped');
|
|
console.log('Recording stopped');
|
|
- if (($settings?.audio?.stt?.engine ?? '') === 'web') {
|
|
|
|
|
|
+ if ($config.audio.stt.engine === 'web' || ($settings?.audio?.stt?.engine ?? '') === 'web') {
|
|
audioChunks = [];
|
|
audioChunks = [];
|
|
} else {
|
|
} else {
|
|
if (confirmed) {
|
|
if (confirmed) {
|
|
@@ -229,8 +229,7 @@
|
|
console.log('recognition ended');
|
|
console.log('recognition ended');
|
|
|
|
|
|
confirmRecording();
|
|
confirmRecording();
|
|
- dispatch('confirm', transcription);
|
|
|
|
-
|
|
|
|
|
|
+ dispatch('confirm', { text: transcription });
|
|
confirmed = false;
|
|
confirmed = false;
|
|
loading = false;
|
|
loading = false;
|
|
};
|
|
};
|