From 73e9efad9ce636a26a7c3029acddd9746edf3d8c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=80=9CNaeel=E2=80=9D?= Date: Sat, 23 May 2026 06:27:35 +0400 Subject: [PATCH] =?UTF-8?q?v83:=20Whisper=20=E2=80=94=20=D1=81=D1=8B=D1=80?= =?UTF-8?q?=D0=BE=D0=B9=20WebM,=20=D0=B1=D0=B5=D0=B7=20WAV-=D0=BA=D0=BE?= =?UTF-8?q?=D0=BD=D0=B2=D0=B5=D1=80=D1=82=D0=B0=D1=86=D0=B8=D0=B8?= 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 0c7d14c..d109483 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с в начале (щелчок) - const sendBlob = await trimStartBlob(blob); - const form = new FormData(); - form.append('file', sendBlob, sendBlob.type === 'audio/wav' ? 'audio.wav' : 'audio.webm'); + form.append('file', blob, 'audio.webm'); form.append('model', 'whisper-large-v3'); form.append('language', 'it'); - console.log('[HTTP] blob ' + (sendBlob.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', { @@ -779,7 +776,7 @@ async function doCompare(blob, originalText, duration) {