From 6b62ec8dd5c665b5b9c032bb1ffe4159b76a1690 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=80=9CNaeel=E2=80=9D?= Date: Sat, 23 May 2026 06:20:18 +0400 Subject: [PATCH] =?UTF-8?q?v81:=20revert=20WAV=20=D0=B4=D0=BB=D1=8F=20Whis?= =?UTF-8?q?per=20=E2=80=94=20=D1=81=D1=8B=D1=80=D0=BE=D0=B9=20WebM=20(?= =?UTF-8?q?=D0=BE=D0=B1=D1=80=D0=B5=D0=B7=D0=BA=D0=B0=20=D1=82=D0=BE=D0=BB?= =?UTF-8?q?=D1=8C=D0=BA=D0=BE=20=D0=B4=D0=BB=D1=8F=20=E2=96=B6)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- dist/index.html | 9 +++------ js/main.js | 2 +- js/transcribe.js | 7 ++----- 3 files changed, 6 insertions(+), 12 deletions(-) diff --git a/dist/index.html b/dist/index.html index c8f98d5..fd35d3d 100644 --- a/dist/index.html +++ b/dist/index.html @@ -256,15 +256,12 @@ async function transcribe(blob) { if (!GROQ_API_KEY) return { text: '', error: 'no_key' }; const tStart = performance.now(); - // Обрезаем 0.2с в начале (щелчок) — декодируем → WAV - const trimmedBlob = await trimStartBlob(blob); - const form = new FormData(); - form.append('file', trimmedBlob, 'audio.wav'); + form.append('file', blob, 'audio.webm'); form.append('model', 'whisper-large-v3'); form.append('language', 'it'); - console.log('[HTTP] blob ' + (trimmedBlob.size/1024).toFixed(1) + 'KB → multipart POST'); + console.log('[HTTP] blob ' + (blob.size/1024).toFixed(1) + 'KB → multipart POST'); try { const r = await fetch('https://lang.kube5s.ru/openai/v1/audio/transcriptions', { @@ -764,7 +761,7 @@ async function doCompare(blob, originalText, duration) {