Files
baji-vc/gateway/web/debug.html
T

2 lines
4.1 KiB
HTML
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
<!doctype html><html lang="zh-CN"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width,initial-scale=1"><title>LAN Voice 硬件模拟器</title><style>body{font:16px system-ui;max-width:1000px;margin:24px auto;padding:16px;background:#111827;color:#e5e7eb}button,input,select{padding:10px;margin:5px;border-radius:6px}section{background:#1f2937;padding:15px;margin:12px 0;border-radius:8px}pre{white-space:pre-wrap;overflow-wrap:anywhere}canvas{width:100%;height:70px}#status{color:#93c5fd}label{display:inline-block}button:disabled{opacity:.4}</style></head><body><h1>LAN Voice 浏览器硬件模拟器</h1><p>自定义 PCM 协议,不是完全小智兼容。请用耳机。自动模式使用 batch SenseVoice;服务端VAD不消回声。</p><section><label>共享 token <input id="token" type="password" autocomplete="off" placeholder="仅内存,不保存"></label><select id="codec"><option value="pcm16">PCM16</option><option disabled>Opus:浏览器真实编码链路未实现</option></select><label>合成策略(重连生效)<select id="synthesisMode"><option value="balanced">平衡默认:240ms音频缓冲,少碎句</option><option value="low_latency">低延迟:100ms缓冲,欠供风险较高</option></select></label><label>声音生成(重连生效)<select id="voiceMode"><option value="continuous_voice">默认每轮单generator:等全文</option><option value="fragment">实验分片:音色/韵律跳变风险</option></select></label><label>已登记固定音色<select id="voiceId" disabled></select></label><p id="voiceInfo">默认登记reference;开始前选择,开始后锁定。</p><label>角色(重连;角色强制新会话)<select id="persona"><option value="default">普通助手</option><option value="lvbu">吕布:固定clone+lore</option><option value="yangmi_fiction">杨密(原创测试角色)</option></select></label><p>杨密为原创角色:已使用用户确认许可的普通女生前7秒参考clone,非杨幂仿声;仅本地非商用测试,听感相似未验证。</p><label><input type="checkbox" id="ttsDebug" checked>下一轮记录TTS debug(保存合成台词与音频,限额本地测试)</label><button id="markDebug">标记上一轮异常</button><button id="replayDebug">回放上一轮debug WAV</button><button id="metadataDebug">下载上一轮metadata</button><audio id="debugPlayer" controls></audio><p id="debugInfo">旧轮未保存不能恢复。debug不保存麦克风/token/reference。</p><button id="connect">连接</button><button id="auto">开始持续对话(耳机)</button><button id="manual">按住说话(调试)</button><button id="abort">打断</button><button id="disconnect">断开</button><label><input type="checkbox" id="barge" checked>双工语音打断(默认;关闭仅半双工调试)</label><label>起声debounce<select id="debounce"><option value="3">96ms默认</option><option value="2">64ms</option></select></label><p>默认计算/播放期间持续收音。全双工存在播放自回声自激风险;实际AEC/NS设置不是效果证明,请用耳机。</p><button id="newConversation">新会话</button><button id="clearHistory">清空当前会话历史</button><p id="conversation"></p><div id="history"></div><p id="status">未连接</p></section><section><canvas id="wave" width="900" height="70"></canvas><p id="level">麦克风音量:0</p><pre id="settings">麦克风未请求;HTTPS或安全localhost需要录音权限。AEC设置不保证实际效果。</pre></section><section><h3>ASR</h3><p id="stt"></p><h3>LLM正文</h3><p id="llm"></p><h3>当前句字幕</h3><p id="sentence"></p></section><section><p>平衡缓冲会增加首音等待(不是免费优化),240ms是累计音频量不是固定墙钟等待;模型持续供给慢仍可能卡顿。</p><h3>延迟(不同机器时钟不相减)</h3><pre id="metrics"></pre><button id="export">导出计时(无音频/token)</button><p>rendered=AudioWorklet首次呈现样本,不是硬件实际听到;voiced只是−40dBFS近似,不保证语义有效。</p></section><script type="module" src="/static/client.js"></script></body></html>