v74: откат WAV — WebM для Groq, trimSilence в памяти для локального

This commit is contained in:
“Naeel”
2026-05-22 21:30:35 +04:00
parent f2762b4f0a
commit c0658f6c20
4 changed files with 22 additions and 84 deletions
+1 -2
View File
@@ -5,7 +5,7 @@ async function transcribe(blob) {
const tStart = performance.now();
const form = new FormData();
form.append('file', blob, blob.type === 'audio/wav' ? 'audio.wav' : 'audio.webm');
form.append('file', blob, 'audio.webm');
form.append('model', 'whisper-large-v3');
form.append('language', 'it');
@@ -22,7 +22,6 @@ async function transcribe(blob) {
return data.error ? { text: '', error: data.error } : { text: data.text || '', error: null };
} catch(e) {
console.log('[HTTP] ERR', e);
alert('Ошибка транскрипции: ' + (e.message || e));
return { text: '', error: 'network' };
}
}