v3.5.0: 실시간 음성통화 TTS 엔진을 OmniVoice로 교체 + Wake Lock 추가

XTTS는 한영 혼용 발음이 깨지고(Zoom→쭘 등) 짧은 문장에서 rambling이 발생했음.
Qwen3-TTS로 교체해봤으나 realtime factor 0.3x로 통화에 쓰기엔 너무 느려서 폐기.
최종적으로 OmniVoice(k2-fsa)로 교체 — realtime factor 1.8~2.8x로 XTTS보다도
빠르고 한영 혼용 발음도 자연스러움.

voice-call.js에는 navigator.wakeLock 추가 — 폰 화면이 꺼지면 브라우저가
백그라운드 탭을 스로틀링해서 통화가 끊기는 문제를 방지.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
kim
2026-07-09 23:14:38 +09:00
co-authored by Claude Sonnet 5
parent 22c692fec3
commit 73967d1f55
3 changed files with 65 additions and 41 deletions
+20
View File
@@ -30,6 +30,23 @@
let spokenUpTo = 0;
let pendingTts = '';
let active = false;
let wakeLock = null;
// The Wake Lock is auto-released whenever the tab loses visibility (screen off,
// app-switch) — without it, mobile browsers throttle/suspend the background tab
// and the call silently drops. Re-acquire it once the tab is visible again.
async function acquireWakeLock() {
if (!('wakeLock' in navigator)) return;
try {
wakeLock = await navigator.wakeLock.request('screen');
wakeLock.addEventListener('release', () => { wakeLock = null; });
} catch (e) {
console.warn('[voice-call] wakeLock request failed:', e.message);
}
}
document.addEventListener('visibilitychange', () => {
if (active && wakeLock === null && document.visibilityState === 'visible') acquireWakeLock();
});
function setStatus(text) {
const el = document.getElementById('voice-call-status');
@@ -54,6 +71,8 @@
try { captureCtx && captureCtx.close(); } catch {}
try { playCtx && playCtx.close(); } catch {}
captureCtx = playCtx = micStream = captureNode = playerNode = null;
try { wakeLock && wakeLock.release(); } catch {}
wakeLock = null;
ttsQueue = []; ttsBusy = false; currentTtsId = null;
const bar = document.getElementById('voice-call-bar');
if (bar) bar.style.display = 'none';
@@ -72,6 +91,7 @@
}
active = true;
acquireWakeLock();
if (btn) { btn.textContent = '📵'; btn.classList.add('recording'); }
if (bar) bar.style.display = 'flex';
setStatus('통화 연결 중…');