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) {