Compare commits

...
Author SHA1 Message Date
xiaomoandmultica-agent 407fc8158c HEL-910: real-call retest window record — web text interrupt, wait chain, budgets, cleanup evidence
Co-authored-by: multica-agent <github@multica.ai>
2026-10-29 20:24:52 +08:00
xiaomoandmultica-agent 958c6962fb HEL-908 R1/R2 rework (HEL-909 review): whole-turn reasoning gate + cg.interrupt data channel
R1 — reasoning separation truly closed. The streaming hold leaked wholesale
on real token arrival (review A1: 'private reasoning '*20 beyond the 128-char
bound, no sentence ender; review A2: a Chinese sentence ender released the
hold) AND the adapter consumed the stray closer, so the app-level turn split
could never recover — the previous 'persistence and receipt always clean'
claim was false and is retracted. Per the engineering ruling the adapter now
has two explicit endpoint modes (GOV-006, no heuristics, no new engine):
buffer_turn (TurnReasoningGate) emits NOTHING during generation, splits the
whole turn at stream end and only then delivers the clean visible text; it
is set explicitly for all tiers in config/models.yaml (first visible text
waits for the full generation; cancelled/timed-out turns emit nothing and
end exactly as before — recorded and test-pinned, low latency NOT claimed).
stream (default, backward compatible) keeps explicit-tag/field semantics and
passes stray closers through unmodified so the turn-level split keeps its
signal. Both review strings and the recorded id=12 stream replay clean at
every chunk size through the real adapter and the real app into chat.delta,
the archive and the receipt; normal zh/en preserved byte-for-byte; unclosed
explicit thinking still fails honestly.

R2 — an authoritative interrupt when the LLM already finalized and TTS is
still playing (review evidence C: zero interrupts, old audio played out).
The page's existing hush() entry (ChatPanel untouched) now also publishes
{"v":1} on the room's own reliable data channel topic cg.interrupt
(fire-and-forget: a dropped publish never blocks or breaks the text send);
the worker subscribes data_received, validates topic/sender/payload and
calls session.interrupt(force=True) — the SDK's own programmatic interrupt,
force confirmed against the installed 1.8.8 source (non-force raises
RuntimeError on allow_interruptions=False speech). Failures log loudly; the
listener is unloaded via add_shutdown_callback; the server-cancel path in
llm_chat_api also interrupts with force and logs failures.

Verification (offline, zero real requests): real-SDK harness 8/8 including a
real SpeechHandle with a genuinely pending playout wait released by the
cg.interrupt message after a clean chat.final (evidence-C shape) plus the
full validation matrix; .venv311 full suite 480 passed / 8 skipped (2
test_r3 failures pre-exist at 5625de6); web npm ci from the existing lock,
typecheck 0 errors, lint 0 errors + 1 pre-existing warning, vitest 148/148,
build ok; ruff clean; check_requirements vs origin/main and b8ec832 with the
corrected handoff.

Co-authored-by: multica-agent <github@multica.ai>
2026-10-28 22:21:16 +08:00
xiaomoandmultica-agent b8ec832f35 HEL-908: terminal chat.cancelled + no-revive gate for text interrupt; reasoning/content separation at the adapter seam
Bug 1 (recorded call1): server-side cancel ended the voice SSE without a
terminal frame BEFORE the first delta (worker.log:108 SDK retry 13ms after
the text POST); the adapter raised a connection error, livekit-agents 1.8.8
silently retried the same turn_id, the retry re-acquired the gate, cancelled
the user's text turn and re-spoke a full ~32s reply. The HEL-907 claim that
the _retry_on_chunk_sent guard never worked is corrected: the guard only
applies after output (output_sent), verified against the installed SDK
source. Fix: explicit chat.cancelled terminal frame; a cancelled turn_id is
refused re-activation (never touches the newer active turn); the worker ends
cancelled turns on the SDK's own 499 path (no retry) and stops the cached
playout via SpeechHandle.interrupt(); a server_cancelled latch short-circuits
any re-entry with zero network. Failed-turn retries, completed-turn replay
and receipt validation are unchanged (dedicated tests).

Bug 2 (recorded row id=12): the endpoint streams implicit-open reasoning
plus a stray </think> inline in content into subtitles and TTS. Fix:
ReasoningSeparator at the OpenAI-compat adapter seam (cross-chunk safe,
reasoning_content field side-channel on LLMDelta.reasoning, never persisted)
plus a turn-level split before persist/final/receipt. Recorded stream
replays clean at every chunk size; normal zh/en content preserved
byte-for-byte; documented residual: implicit-open reasoning whose closer
lies beyond the 128-char hold streams partially (persistence stays clean).

Offline verification: .venv311 full suite 445 passed / 5 skipped (2
pre-existing test_r3 failures fail identically at 5625de6); real-SDK harness
(livekit-agents 1.8.8, agent venv) 5/5; reasoning separation 37/37; ruff
clean. Zero real requests, zero deployment, no dependency changes.

Co-authored-by: multica-agent <github@multica.ai>
2026-10-28 21:27:08 +08:00
xiaomoandmultica-agent 5625de6606 HEL-907: custom-voice web flow + 3 real calls window record, budget accounts, recycle evidence; hel900 harness minimal fix
Co-authored-by: multica-agent <github@multica.ai>
2026-10-28 20:29:23 +08:00
总工andmultica-agent 038f1eeae7 HEL-906 rework materials: r5-followup-package §4 dual-accounting + fail-closed wording, handoff update
- §4: conservative pre-record vs confirmed-delivered accounting, ledger
  failure fail-closed, guarantees scoped to armed process (cross-process
  bounded overshoot / crash undercount stay monitored boundaries, no
  'never exceeds' claims), window execution convention (3 sequential
  calls, tightened params with margin), verification command now 24 cases
- milestone table registers rework commit cf395d4
- handoff-HEL-906.json: rework deliverable/acceptance/verification as above

Co-authored-by: multica-agent <github@multica.ai>
2026-10-28 09:04:29 +08:00
总工andmultica-agent cf395d4e06 HEL-906 rework: persistence fail-closed stop + conservative pre-record accounting
- asr_usage: ledger write/read failure, corruption or mid-window vanish now
  stop all window outbound (fail-closed), preserve known consumption
  (monotonic, no zero-budget default), log + record guard_stop (durable
  across same-window restarts)
- asr_usage: conservative reserve before send (failed/cancelled sends are
  NOT refunded) + separately tracked confirmed-delivered seconds; replay
  restores both
- stt_funasr: reserve_audio before ws.send, note_audio_delivered after
  successful await only
- tests: 24 deterministic offline cases incl. manager's budget-regression
  repro, read/corrupt/missing rejection, record-then-raise/cancel fake ws,
  guard_stop across restart

Co-authored-by: multica-agent <github@multica.ai>
2026-10-28 09:02:51 +08:00
总工andmultica-agent ccfc04edcd HEL-906: close r5-followup-package §4 blocker, register milestone, add handoff
- §4: ASR audio/retry rows now program-gated (pre-send/pre-connect refusal
  when armed, fail-closed default); mechanism, arming env, reproducible
  verification commands, program-guarantee vs monitor-only boundary
  (bounded cross-process staleness, bounded crash undercount, .12 real-stack
  pre-window check still required); wall-clock proxy demoted to lower-bound
  cross-check; first-line status updated
- milestone table: register hel-906-asr-usage-counting @ ecec9df (candidate,
  PR not merged, pending 总管 review)
- handoff-HEL-906.json (v1.12, read at 0b804a4); requirement checks 4/4 pass
  (origin/main and 0b804a4, with/without handoff)

Co-authored-by: multica-agent <github@multica.ai>
2026-10-28 08:46:07 +08:00
总工andmultica-agent ecec9df8e8 HEL-906: continuous-call ASR usage metering + one-shot window guard in dedicated worker seam
- asr_usage.py (stdlib-only): append-only JSONL ledger, per-call/window audio
  seconds counted from actually-sent frames (sample-rate aware, resend counted),
  connect attempt/failure/retry semantics (normal per-utterance reconnects are
  not retries), fail-closed default (real cap=0 unless a window is armed),
  pre-send blocking so no byte crosses the cap, ledger replay for restart
  recovery and cross-window isolation, resumable summarize CLI
- stt_funasr.py: guard hooks on the real send path (check_connect before
  open_utt, precheck before send, count after send, recv-side death recorded,
  per-utterance flush aggregation); usage=None keeps prior behavior
- worker.py: entrypoint builds guard from env per job, room name as call id,
  on_exhausted -> ctx.shutdown ends the call, window summary in start log
- tests: 17 deterministic offline tests incl. fake livekit/websockets SDK
  driving the real _run seam, sample-rate variants, silence/cancel/failure/
  reconnect/repeated-end, cap rejection before crossing, ledger persistence
  across restart, room deletion keeps history, other windows unaffected

Co-authored-by: multica-agent <github@multica.ai>
2026-10-28 08:44:20 +08:00
总工andmultica-agent 0b804a49ef HEL-905: clarify verified baseline vs registration commits in milestone table
Co-authored-by: multica-agent <github@multica.ai>
2026-10-28 01:41:25 +08:00
总工andmultica-agent fdfa3424b7 HEL-905: register final verified head 03cec26 in follow-up package milestone table
Co-authored-by: multica-agent <github@multica.ai>
2026-10-28 01:41:12 +08:00
总工andmultica-agent 03cec2679e HEL-905: unified review handoff + follow-up package honesty fixes (first-line blocker, register_asr scope, ledger jq boundary, mic-interrupt T0 time base)
Co-authored-by: multica-agent <github@multica.ai>
2026-10-28 01:40:57 +08:00
总工 7cb73429f7 HEL-905: integrate HEL-904 backend rework (recoverable register-failure mapping, call-window voice pin) 2026-10-28 01:14:35 +08:00
总工 7c387db0a0 HEL-905: integrate HEL-903 preserved frontend rework (author source 51669aa, 11 files byte-preserved) 2026-10-28 01:14:32 +08:00
施工员2号andmultica-agent 07dda2bfa2 HEL-904: backend rework — recoverable register-failure mapping, worker-state corruption docstring, call-window voice pin closes capture/worker race
- register(): local metadata write failure -> LocalRecordFailed -> 503 Chinese
  message with the cg- id (shared registration NOT rolled back, refresh list to
  recover, never re-register); register_asr journaled BEFORE local persist so
  failed registrations still count in the resource ledger
- write_worker_voice(): docstring now states the whole-file rewrite on
  unreadable/corrupt state (other keys preserved only when parseable)
- capture->worker race closed with a session-immutable-snapshot equivalent:
  _capture_voice holds the captured voice (no await gap); apply_selection
  defers its worker-state write while any call is live; open_session releases
  the hold on failure/cancel; VoiceSessionService.on_session_settled releases
  on explicit end, end-into-debt and TTL expiry; response voice == the voice
  the worker actually reads for that call, mid-call changes affect the next
  call only; overlapping-call residual documented honestly
- tests: hel902 fault-injection case 1 rewritten for the new contract
  (recovery + restart + 409 gate kept), 4 new deterministic Event-gated race
  tests (worker read delayed past dispatch, concurrent apply, failure/cancel
  cleanup, next-call voice), zero sleep-based assertions
- docs: contract §2.2/§2.5/§3 updated; r5 followup package tightened (head
  milestones d167ba9/b09a907/pending-review, register ASR vs call ASR split,
  call-ASR counting means + honest pending blocker, single-timebase frame
  silence measurement, D1 female_soft reference audio pinned by sha256,
  recycling checklist, shared-TTS snapshot/restore, git-revert is not
  recycling, caps count failures/retries/outbound-no-response)
- evidence: pytest 380/380 (376 baseline + 4), verify chain 12/12, ruff clean,
  requirement checks 4/4 (origin/main and b09a907, with/without handoff)

Co-authored-by: multica-agent <github@multica.ai>
2026-10-28 01:09:19 +08:00
200 changed files with 9529 additions and 82 deletions
+5
View File
@@ -23,6 +23,9 @@ tiers:
api_key_env: null
timeout: 60.0
temperature: 0.85
# HEL-908/909:该端点会把隐式开头思考(无 <think>、模板预填)混入 content,
# 只能整轮缓冲后分离;首段可见文本因此等整轮生成完成(见 reasoning.py)。
reasoning: buffer_turn
# ---- 中档:可以指向同一个模型,但配更短的上下文预算 ----
# 省钱的杠杆通常不是换更小的模型,而是少喂上下文。
@@ -33,6 +36,7 @@ tiers:
api_key_env: null
timeout: 40.0
temperature: 0.7
reasoning: buffer_turn
# ---- 本地小模型:后台任务的主力 ----
# 没有本地服务时,把它指向 openai_compat 的远端小模型即可。
@@ -43,6 +47,7 @@ tiers:
api_key_env: null
timeout: 20.0
temperature: 0.4
reasoning: buffer_turn
# ---- 场景 → 档位 ----
# 改这里就能调成本结构,不用改代码。
+28
View File
@@ -0,0 +1,28 @@
{
"baseline_version": "1.12",
"read_commit": "b09a907747f9836c4aea04016757321d28b7cb6b",
"task": "HEL-904:HEL-902 统一审核后的后台有限返修(HEL-899 原作者)。三项:①登记在8090成功而本地元数据落盘失败→503中文映射(编号可恢复、共享登记不回滚、不逼重复登记),ASR流水先记再落盘;②worker状态文件损坏整体重写的实况补入docstring/合同,正常可读文件仍保留其他键;③修通话捕获音色与worker实读竞态:以会话不可变快照(通话窗口持有)保证响应voice=worker本通话实读声音、通话中改选只影响下一通,覆盖失败/取消/挂断失败转欠账/TTL到期结算,确定性Event门控无sleep;④补测申请材料收紧(仅材料不执行)。零真实调用、零部署、零下载、不动web/与共享worker、不新增依赖",
"requirement_ids": ["CG-006", "CG-009", "CG-010", "CG-013", "CG-014", "CG-015", "CG-016", "CG-018", "CG-019", "CG-020", "CG-021", "AM-001", "GOV-001", "GOV-002", "GOV-003", "GOV-004", "GOV-005", "GOV-006", "DEL-001"],
"deliverable": "独立分支(自b09a907)后台返修:custom.py登记失败映射LocalRecordFailed+ASR流水先记、write_worker_voice损坏实况docstring、通话持有hold/release+apply暂缓写、router捕获登记/失败取消释放/503映射/settle挂钩、session.py on_session_settled结算(挂断成功/转欠账/TTL到期);tests/test_voice_review_hel902.py第1例按新契约改写(含重启恢复与409守门断言)、新增tests/test_voice_rework_hel904.py确定性时序4例;合同docs/voice-custom-contract-HEL899.md §2.2/§2.5/§3更新;docs/rework/hel902/r5-followup-package.md收紧(head里程碑表:d167ba9=整合提交、b09a907=审核head、本卡head待统一复审登记,登记ASR与连续通话ASR区分、连续通话ASR计数手段与待补阻塞如实声明、停声量测单一时间基准帧级录音、参考音频明确D1包female_soft段含sha256/长度、回收清单与不未经确认保留测试垃圾、共享TTS启停快照恢复、git回退不代替共享回收、上限含失败口径与硬闸/监看界线);docs/rework/hel904/REWORK.md返修记录",
"acceptance": [
"登记成功+本地元数据写失败:503中文文案含编号、明确共享登记不回滚、刷新列表可找回并试听/应用、不逼重复登记(tests/test_voice_review_hel902.py改写例:含重启按编号label=编号继续用、新音色未试听409守门不放松、11支内置与通用助手零改写)",
"worker状态文件损坏实况:docstring/合同如实注明整体重写仅剩voice,不再宣称任何情况下保留其他键;正常可读文件其他键保留(既有用例继续通过)",
"竞态收口:确定性Event门控测试把worker读时点延迟到dispatch返回之后、并发应用新声音后——本通话worker读到=响应voice=旧音色;挂断结算后下一通capture用新声音;挂断失败转欠账、TTL到期、dispatch失败、请求取消四条路径都释放持有、应用随即写透;无sleep凑测试(tests/test_voice_rework_hel904.py 4例)",
"补测材料:仅材料不执行,候选上限只收紧不放宽,一切失败/取消/重试/出站无响应计入口径;LLM/嵌入=程序硬闸与其余工程监看界线写明;连续通话ASR无程序计数手段处如实标待补阻塞;真实cap=0保持"
],
"deferred": [
"真实登记/可选转写/真实试听/应用与下一通验证、克隆相似度、打断停声帧级量测、真机麦克风路径:待主卡批准补测包后执行,未批前真实cap=0",
"本卡后台修复与前端另卡(外接服务文案、会话页显示本次音色)需原总工一次统一复审;通过后登记最终已验证head,此前任何head不得当作执行依据",
"连续通话ASR分钟级音频时长与连接重试的程序计数手段:待补阻塞,窗口前由总管在.12验证LiveKit/worker侧指标可执行性,不通过则窗口不得启动含连续通话步骤",
"前端同锁文件npm安装复跑:单独待批项,本轮不执行",
"自定义音色删除、完整备份/恢复(CG-009/R6)后续卡;R5整体验收与R1-R7完整功能持续承接;本卡通过≠自定义音色用户验收,更≠完整产品完成"
],
"requirement_changes": [],
"verification": [
"pytest tests -q:380通过(基线376+新增4,py3.11.16复用既有venv零安装),全量含HEL-899 18项与总工故障注入全数通过",
"python -I scripts/verify_hel899_custom_voice.py:12/12(含通话中改选定住本通话、下一通生效)",
"ruff check src tests scripts:通过",
"需求检查4/4:--base-ref origin/main 与 --base-ref b09a907 各带/不带本handoff全部通过",
"未验证(如实):真实worker读时点、真实dispatch/房间、打断停声与真机路径——全部留在获批补测窗口;重叠通话不同音色的残余竞态如实记录于合同§2.5与REWORK.md,不宣称消除"
]
}
+30
View File
@@ -0,0 +1,30 @@
{
"baseline_version": "1.12",
"read_commit": "7cb73429f7a0585bed17873179a627c890336c70",
"task": "HEL-905:HEL-903 前端返修与 HEL-904 后台返修的统一离线复审(总工)。在自己独立分支 hel-905-unified-review@7cb73429 集成前端088ac62(原作者源码51669aa,11文件逐字节一致)与后台07dda2b,不重出架构、不另起视觉、不重复派工;一次审完三处前端修正(语音合成五态与ASR无单独健康检查的诚实说明、演示零API外发、session voice固定本次声音)与500/503/断连恢复流(先刷新找cg-编号条目、缺资料标注、不自动重登记/不自动删除)、后台通话持有方案的失败/取消/挂断转欠账/TTL结算路径、以及补测包材料可批性。真实cap=0,零部署、零下载安装、不发真实请求、不合并PR",
"requirement_ids": ["CG-006", "CG-009", "CG-010", "CG-013", "CG-014", "CG-015", "CG-016", "CG-018", "CG-019", "CG-020", "CG-021", "VIS-003", "VIS-004", "VIS-008", "VIS-010", "VIS-013", "UX-001", "UX-003", "UX-005", "UX-006", "AM-001", "GOV-001", "GOV-002", "GOV-003", "GOV-004", "GOV-005", "GOV-006", "DEL-001"],
"deliverable": "统一复审结论(本卡评论)+集成分支 origin/hel-905-unified-review @ 7cb73429f7a0585bed17873179a627c890336c70(merge 前端088ac62与后台07dda2b于 b09a907 之上,历史正常保留)。独立核验:11文件SHA256与原作者改后清单逐一一致;前端三处修正与恢复流按源码逐行复核(callVoiceOf只认严格id、default=默认声音、缺答=声音未说明不猜、失败/结束复位OFF、late grant被stale/gen挡住;演示模式全部效果守if(!real)不发任何请求;uncertain分类422/409/离线=不确定false、5xx/发送后断=不确定true,主按钮换刷新列表、从不自动重登记);后台持有hold在capture写文件后无await间隙登记、挂断成功/挂断失败转欠账/TTL到期/dispatch失败/请求取消五路释放、Event门控无sleep。总工独立复跑(复用既有venv311,零安装):pytest tests 380/380、verify_hel899_custom_voice 12/12、ruff src tests scripts 通过;需求检查4/4(origin/main与b09a907各带/不带本handoff)。前端构建/单测/浏览器因web/node_modules缺失未独立复跑,如实列为待批项,不以作者148/148、90/90冒充",
"acceptance": [
"集成核验:7cb73429含088ac62与07dda2b两个先祖、基点b09a907;author-manifest.json 11文件改后SHA256与统一head工作树逐一一致(含handoff JSON共11项match 11/11);前端仅作者源码,总工未替作者改视觉方向",
"前端三处修正复核:readVoiceStatus五态(none/off/ok/down/unknown)+ASR行如实写「没有单独的健康检查,以实际通话为准」;演示模式services/voiceStatus效果全守if(!real)零API外发;session voice只取本通grant严格id、命名查找按id匹配、跨id答案不显示、结束/失败复位、下一通用新选择",
"恢复流复核:uncertain(5xx/发送后断/体不完整)→提示先刷新找cg-新条目、刷新前后集合比对指认新增项、idOnly条目如实标注「只有编号,缺本地资料」并说明可试听可用、无删除入口、绝不自动重登记或自动删除;Chromium自动重发登记POST的服务端非幂等风险如实保留(重试另立新cg-编号+共享注册表孤儿条目,合同§2.2如实声明,不宣称前端提示已解决服务端幂等)",
"后台通话持有复核:capture写文件后同步登记持有(无await间隙);挂断成功、挂断失败转清理欠账、TTL到期_prune、dispatch失败、开房请求在途取消五条路径均释放持有;期间apply只记选择不写worker文件,会话响应voice=worker本通话实读;重叠通话较新capture重写文件的残余如实记录于合同§2.5,顺序用例通过不称竞态根除",
"总工独立复跑:pytest tests -q 380/380、python -I scripts/verify_hel899_custom_voice.py 12/12、ruff check src tests scripts 通过(venv311=Python3.11.16复用,零安装零下载);需求检查4/4通过",
"补测包核对(材料,不执行):连续ASR精确计数仍为待补阻塞且包内如实声明;包首行不声称材料齐备;停声量测单一时基、female_soft参考段sha256、8090新增cg-清单与回收、共享TTS快照恢复、失败计入用量等逐项在案;候选上限未超904已收紧值"
],
"deferred": [
"前端独立复跑(同锁npm安装、tsc/vitest/build、浏览器两主题×电脑/手机、录音释放/字幕/取消迟到/演示零外发):web/node_modules缺失,本轮禁止安装,列为待主卡批准项;作者148/148与90/90仅为作者证据",
"真实登记/试听/应用、真实worker读时点、打断停声帧级量测、真机麦克风:待主卡集中请批新窗口后执行,本轮真实cap=0、未部署、未触旧服务与8090/4080",
"挂断失败转欠账与TTL到期释放持有时,远端房间删除落地前的极端未入场worker仍可能读到后续写透值:与重叠通话同类残余、每worker仍整通话单一音色,建议下轮在合同§2.5残余段一并补写明(非阻塞)",
"连续ASR分钟级时长/连接重试的程序计数手段:仍为待补阻塞,窗口启动前须由总管在.12验证LiveKit/worker侧指标可执行性",
"CG-009/R6删除与完整备份恢复、R5真机与整体验收、R1-R7完整功能继续承接;本卡通过≠自定义音色用户验收,更≠完整产品完成;旧HEL-879窗口封账永不重开"
],
"requirement_changes": [],
"verification": [
"git:7cb73429为origin/hel-905-unified-review head,merge-base核088ac62/07dda2b均为先祖、基点b09a907未回退、母线与PR#11未改写",
"SHA256:docs/rework/hel903/preservation/author-manifest.json全部11项与统一head工作树一致(独立脚本核对match 11/11)",
"venv311(Python3.11.16)独立复跑:pytest tests 380/380、verify_hel899_custom_voice.py 12/12、ruff check src tests scripts 通过",
"需求检查4/4:--base-ref origin/main 与 --base-ref b09a907 各带/不带 docs/requirements/handoff-HEL-905.json 全部通过(60项)",
"未验证(如实):前端构建/单测/浏览器未独立复跑(缺node_modules,不安装);真实语音链路全部未动;补测包材料审读基于文档与源码,实际量测留获批窗口"
]
}
+45
View File
@@ -0,0 +1,45 @@
{
"baseline_version": "1.12",
"read_commit": "0b804a49ef53eb3d251347c147d96a3f6aa5fe19",
"task": "HEL-906:补齐连续语音实际用量计数与测试准备(施工;2026-10-28 总管定点复核返工)。只补 HEL-905 复审明确列出的连续通话 ASR 实际用量/连接重试计数缺口:在 CyberGril 专属 worker/适配层复用现有 LiveKit/FunASR 接口,落地每通话与全窗口的实际送入 ASR 音频量与 连接尝试/重连/失败计数;达到有限窗口上限时在发送前/建连前阻止并结束本通;上限为待用户批准的新一次性窗口,默认未布防=真实 cap=0(fail-closed,与 think/budget.py 同一先例)。定点返工只修总管复核出的两个缺口:①账本写入失败不得使预算倒退(持久化读/写失败或损坏时停止本窗出站并保全已知消耗,禁止默认零预算/继续放行);②发送失败/取消后的不确定出站不得漏计(发送前保守预记整帧、失败/取消不退还,确证送达量另列,不得宣称预记皆确证)。旧 HEL-879 封账保持原样。零模型/嵌入/真实 ASR/TTS、零新增安装下载、不启动服务、不改共享 /opt/voice-agent、不改视觉、不合并 PR。",
"requirement_ids": [
"CG-010",
"CG-018",
"CG-019",
"CG-020",
"CG-021",
"AM-001",
"GOV-001",
"GOV-002",
"GOV-003",
"GOV-004",
"GOV-005",
"GOV-006",
"DEL-001"
],
"deliverable": "独立分支 hel-906-asr-usage-counting(基于 origin/hel-905-unified-review@0b804a4;首轮源码 ecec9df+材料 ccfc04e,定点返工源码 cf395d4+本材料提交):①src/cybergril/voice/asr_usage.py(仅标准库)——追加写 JSONL 账本、每通/全窗计数、fail-closed 默认(无 CYBERGRIL_ASR_WINDOW_ID 即拒绝一切连接/音频)、触线在发送前/建连前拒绝(AsrWindowClosed)、账本重放恢复(同窗重启不重置预算、跨窗口互不影响)、只读汇总 CLI;返工新增——保守预记 reserve_audio(发送前计入,失败/取消不退还)+确证送达 note_audio_delivered 双口径(confirmed_seconds 单独累计与落账、重放恢复)、账本写失败/读失败/行损坏/中途消失 fail-closed:停止本窗一切出站、内存已知消耗只增不减(禁止零预算回退)、error 日志与停机原因、guard_stop 落账且同窗重启重放仍停;②stt_funasr.py 真实送数接缝——建连前 check_connect、建连结果落账、发送前 reserve_audio(越限帧/账本故障在此拒绝,零字节出站)、await ws.send 成功返回后 note_audio_delivered、utterance 边界/流结束聚合落账、接收侧死亡标记;usage=None 时行为与本卡之前完全一致;③worker.py entrypoint 按 job 构造 guard(房间名为每通标识)、on_exhausted→ctx.shutdown 结束本通(触线与账本故障同一接线)、启动日志输出窗口摘要(含停机状态);④tests/test_voice_asr_usage.py 24 项确定性离线测试;⑤docs/rework/hel902/r5-followup-package.md §4 更新为返工后如实口径+里程碑表登记返工提交;本 handoff JSON",
"acceptance": [
"计数口径:音频=发送前按整帧保守预记的样本数/采样率(48k 重采样后按 16k 输出帧计,重发按重复计);发送失败/取消不退还(帧可能已出站);确证送达量(await 成功返回)单独累计,只作核对下界,不得宣称预记皆确证送达;墙钟与事后成功流水不参与",
"账本 fail-closed(总管复现回归):注入 Path.open 追加失败后已送音频仍在内存(1.3s 不回退 0.8s)、重放不得拉回旧账本值、后续 0.6s 在发送前被拒、停机回调恰好一次带原因;读失败(read_text 注入 OSError)、行损坏(坏 JSON 行)、账本中途消失(unlink)同样 fail-closed 停出站且保全已知消耗;guard_stop 落账后同窗重启仍停",
"连接口径:每次建连尝试(含失败)逐条落账;正常说完一轮后的下一次建连不是 retry,只有失败/接收侧死亡/流异常之后的建连计 retry;每通 retry 上限建连前拒绝(测试驱动真实接缝验证拒绝始于建连之前、假 provider 未被触碰)",
"到线停机:全窗口音频上限触线时越限帧在发送前拒绝(出站字节恰至上限,一个字节不越线,触线帧不碰 provider)、on_exhausted 恰好一次、worker 接线断言 ctx.shutdown 真被调用结束本通;未布防默认拒绝一切 ASR(真实 cap=0 的代码级落实)",
"历史与恢复:删房成功后 asr-usage.jsonl 逐通历史原样保留(测试用真实 VoiceSessionService 成功删房对照);同窗口重启 guard 重放恢复预算/逐通计数/确证量,不得重置;不同 window id 互不误停",
"确定性离线测试(24 项):静音/取消、建连失败/重连、反复结束、不同采样率、触线前拒绝、落盘恢复、崩溃少计有界(≤flush 如实声明)、假 ws 先记 payload 再 raise/取消后预算仍含该帧而确证量不含、worker entrypoint 注入断言",
"补测包 §4 更新为返工后口径:保守/确证双口径、账本故障 fail-closed、程序保证限定为布防进程内(跨进程 ≤5s 有界过冲、崩溃 ≤5s 少计仍为监看边界,不承诺全窗口跨进程绝不越限)、窗口执行约定 ≤3 通顺序不重叠+参数收紧预留余量;候选上限不放宽(≤2h/3通话/6开房/LLM20/60000tokens/嵌入0/登记3/预听10/通话TTS40段/ASR45分钟/每通重连6次/新增付费0)"
],
"deferred": [
"窗口前 .12 真实栈联验:用 scripts/gen_hel877_sdk_check.py 同法在真实 agent venv 加载本模块,确认真 SDK 帧率/重采样与 ctx.shutdown 真实行为(离线假件无法替代,未验证前不启动含连续通话步骤)",
"新一次性窗口仍待白栖知批准:未批前真实 cap=0,不启动、不预留出站;获批后由窗口负责人显式布防 CYBERGRIL_ASR_WINDOW_* 环境变量",
"跨进程并行通话的有界过冲(≤5s resync/flush 间隔)与崩溃少计(≤5s)属如实声明的监看边界,不冒充零误差硬闸;窗口执行约定 ≤3 通顺序执行不重叠、实操上限与 flush/resync 收紧预留余量(已写入 §4)",
"真机麦克风/文字打断帧级量测、LiveKit/worker 侧房间指标交叉核对:并入获批窗口执行,本卡不自行采麦/摄像头",
"前端浏览器/构建独立复跑(同锁 npm ci)仍为单独待批项;CG-009/R6 删除与完整备份恢复、R5 整体验收、R1–R7 完整功能继续承接;本卡通过≠自定义音色或连续语音用户验收"
],
"requirement_changes": [],
"verification": [
"pytest tests/test_voice_asr_usage.py -q:24/24 通过(venv311 复用,零安装;含总管复现的预算回退回归路径)",
"受影响语音区回归:test_voice_asr_usage+test_voice_session+test_voice_custom+test_voice_rework_hel904+test_voice_review_hel902+test_voice_chat_adapter+test_voice_rework_hel879 共 105/105 通过;按卡约定未重跑全量 380/12(作者证据保留)",
"ruff check src/ tests/ 通过",
"需求检查:python3 scripts/check_requirements.py 对 origin/main 与 0b804a4 各带/不带本 handoff 四组通过",
"未验证(如实):真实 FunASR/LiveKit/CosyVoice 栈、真实麦克风、浏览器/手机画面——零真实调用,全部待获批窗口"
]
}
+52
View File
@@ -0,0 +1,52 @@
{
"baseline_version": "1.12",
"read_commit": "038f1eeae71a9f67362d4694548d7d8116e0e35f",
"task": "HEL-907:验证网页自定义声音和三通真实交谈。白栖知批准(主卡评论 01a18246-672a-7a19-9e8a-69c6f547a232 同意这轮测试)后,在统一源码 038f1ee 上执行既有锁定依赖构建与浏览器脚本独立复跑;隔离部署(8360/8361 双入口同进程、8363 WSS 桥、8082 专属 worker、共享 TTS 9880 与面板 8090 窗口内临时恢复);真实网页链路(参考录音上传→cg- 登记→真实 TTS 试听→应用);三通真实通话验证 worker 实用音色与会话 voice 字段一致、通话中改选不换声下一通生效;并入 HEL-879 遗留的文字打断在播语音与打断停声时延量测;全程按批准上限执行并在结束后回收 cg- 条目、恢复共享服务、封账交付。",
"requirement_ids": [
"CG-006",
"CG-009",
"CG-010",
"CG-013",
"CG-014",
"CG-015",
"CG-016",
"CG-018",
"CG-019",
"CG-020",
"CG-021",
"AM-001",
"GOV-001",
"GOV-002",
"GOV-003",
"GOV-004",
"GOV-005",
"GOV-006",
"DEL-001"
],
"deliverable": "docs/rework/hel907/(window-record.md 窗口记录、build/ 构建与浏览器独立复跑日志、web/ 真网页链路截图与试听音频、window/ 逐通字幕/帧时间轴/回流音频/账本/快照);web/tests/hel900_shots.mjs 一处最小脚本适配(HEL-903 后 503 登记进入先刷新状态,检查意图不变,产品代码零改动);服务器证据包 /opt/cybergril-hel907/hel907-evidence-20261028.tar.gz(sha256 37ee1881…2e07e)。实测结果:网页自定义声音全链真实完成(cg-f2ec321d 登记 1 次出站、真实试听 2 次含音频存证、应用后 call1/call2 会话 voice=cg-f2ec321d 且 tts.log 合成音色逐一对应);call2 通话中改选 rain 本通不换声(worker 状态文件钉住)、call3 voice=rain 下一通生效;文字打断在播语音发现真实缺陷(文字轮被 worker 静默重试链取消、语音播完约 32 秒、文字无回复,DB/字幕/api.log 三层证据,源码机制定位至 llm_chat_api.py 重试守卫失效,本卡按边界不修);回放打断 turn_cancel 真实发生但帧级停声时延未取得(打断源过轻+旧轮无可闻声,如实不冒充);全部上限内完成(LLM 8/20 请求、23958/60000 tokens、嵌入 0、建房 4/6、通话 3/3、试听 2/10、通话 TTS 11/40、连续 ASR 195.16/2400 秒、重连 0、新增付费 0,时窗 18 分 32 秒);cg- 条目经 8090 删除入口回收、共享注册表恢复 11 支内置原样、9880/8090 按窗口前状态停回、8360/8361/8363/8082 全停、LiveKit 房间清空。",
"acceptance": [
"构建独立复跑:npm ci(既有锁文件);typecheck 0 错、lint 0 错 1 既有警告、vitest 148/148、build 成功;hel900 浏览器 83/83(1 处最小脚本适配已声明)、hel903 浏览器 90/90(零改动);本机既有 Chromium 156 运行时库解压到用户目录加载,未下载浏览器、未装系统包",
"真网页链路(真实浏览器经 HTTPS 8361):female_soft.wav 上传前 sha256 只读核对一致;登记成功 cg-f2ec321d(8090 唯一写者,参考文字手填、转写 0);真实 TTS 试听 24kHz/3.72s 音频存证且页面真实播放;应用后 /api/voice/selection 一致;逐步截图与网络事件留证",
"通话验证:call1/call2 会话响应 voice=cg-f2ec321d 与 worker 实际合成音色(tts.log)一致;字幕 v2 seq 单调、turn_end/turn_cancel 生命周期正常;挂断 DELETE 200、房间真实删除、删后仅约 20ms 在途帧",
"通话窗口持有:call2 通话中改选 rain 返回 200 而本通 worker 状态文件保持 cg-f2ec321d;call3 会话 voice=rain 下一通生效;会话响应 voice 与 worker 实读一致",
"文字打断在播语音:缺陷如实记录并可复现核对(chat_message id=6 cancelled / id=5、id=8 sent;call1.subtitles.jsonl t0=1793189878442 前后;api.log 第 122-129 行五次 POST 时序),不冒充通过",
"打断停声:回放打断 turn_cancel 真实发生(FunASR 真实识别);帧级旧声停止时延明确未取得(打断源 RMS 过轻致 VAD 15 秒后才判、旧轮 LLM 卡死无可闻声),同钟帧时间轴方法已备(call1/call3.frames.json),不捏造数字",
"上限与封账:全部类别含失败口径计数并留实时账本快照;触线为零;封账后服务全停、cg- 回收前后快照比对、11 支内置与全局默认零变化、共享服务按前快照恢复(9880/8090 窗口前停机→停回)、保护端口零接触、新增付费 0"
],
"deferred": [
"文字打断在播语音缺陷修复与复测:worker 适配器 llm_chat_api.py 重试守卫(_retry_on_chunk_sent 从未置真)与文字/语音互打断语义修复,交总管安排专项卡;修好前不得声称文字可打断语音",
"帧级打断停声时延:方法已验证,待响亮短促打断源+她正在可闻说话时机复测;真实用户麦克风起声时延(D3 用户动作:局域网设备浏览器开 https://192.168.200.12:8361,证书两处高级→继续,允许麦克风后对她说话,建议每次 ≤2 分钟)与 iOS Safari/安卓 Chrome 真机路径未测,交总管向用户交付入口",
"CG-009/R6 自定义音色删除入口与完整备份恢复、R5 整体验收、R1–R7 完整功能继续按获批依赖承接;本卡通过不等于自定义音色用户验收或 R5 完成",
"本轮窗口已封账:LLM 8/20、tokens 23958/60000 等余额不自动授权新窗口;后续窗口须另行获批并显式布防"
],
"requirement_changes": [],
"verification": [
"构建/浏览器:docs/rework/hel907/build/*.log(typecheck/lint/vitest/build/hel900-browser/hel903-browser)与 hel900-shots/hel903-shots 截图",
"网页链路:docs/rework/hel907/web/*.png 逐步截图、preview-cg-f2ec321d.wav 真实合成试听音频、webflow-result.json 网络事件与最终 selection",
"三通通话:docs/rework/hel907/window/call{1,2,3}.json + subtitles.jsonl + frames.json + agent.wav(回流音频逐通落盘)",
"用量与闸门:window/asr-usage.jsonl 与 asr-usage-summary.json(hel907-20261028-a 逐通 95.18/41.34/58.64 秒,confirmed=conservative);budget 快照在 call*.json;tts 窗口段数以 tts-window-tail.log 核对",
"缺陷证据链:call1.subtitles.jsonl + api.log + chat_message 行(id5/6/8)+ 源码定位(src/cybergril/voice/llm_chat_api.py:87-90 与 api/app.py:577-605 取消路径)",
"回收与恢复:voices-before.json / voices-before-recycle.json / panel-list-after-recycle.json 前后比对;pre/post-window-state.txt 端口与 GPU 快照;post 状态 8360/8361/8363/8082/9880/8090 无监听、8300/8310/8320/8350 原样、8340 停机",
"需求检查:check_requirements.py 对 origin/main 与 038f1ee 各带 --handoff 本文件通过(日志随交付);未验证项(真实用户麦克风、真机 Safari/Chrome、帧级停声时延)已如实标注"
]
}
+48
View File
@@ -0,0 +1,48 @@
{
"baseline_version": "1.12",
"read_commit": "5625de6606a607a9d4fd583fe8a52d93d6d2b4ea",
"task": "HEL-908 两轮定点返修(第二轮为 HEL-909 审核不通过后的集中返修一次)。第一轮修复文字打断丢字/旧轮复活/旧语音32秒(chat.cancelled 终态帧+cancelled 轮拒绝重新激活+worker 499 不重试+SpeechHandle.interrupt 停播,HEL-909 复核通过)。第二轮按总管裁定修两个核心缺口:R1 思考分流改显式整轮缓冲模式(原流式 hold 在中文句号/超128字符形状下整段泄漏且 closer 被适配层提前删除、轮级 split 无法兜底,第一轮『落库与 receipt 始终干净』表述不实已删除);R2 补上 LLM 已 final、TTS 仍在播时的权威打断通道(网页既有 hush() 入口经房间数据通道发 cg.interrupt,worker 订阅校验后 session.interrupt(force=True))。全部离线、零真实请求、零部署、零新依赖。",
"requirement_ids": [
"CG-006",
"CG-010",
"CG-013",
"CG-014",
"CG-015",
"CG-016",
"CG-018",
"CG-019",
"CG-020",
"CG-021",
"AM-001",
"GOV-001",
"GOV-002",
"GOV-003",
"GOV-004",
"GOV-005",
"GOV-006",
"DEL-001"
],
"deliverable": "同分支追加提交(agent/2/15e79a2458bb,第一轮 b8ec832 之上)。R1:providers/llm/reasoning.py 重做为双显式模式——TurnReasoningGate(buffer_turn,整轮缓冲零中途外发,流结束 split_reasoning 后一次性下发干净正文;取消/超时行为不变)与无启发式 ReasoningSeparator(stream 默认:仅滤显式 <think> 块跨chunk安全,stray closer 原样透传保住轮级兜底信号);openai_compat 显式 reasoning 模式参数;LLMConfig.reasoning 字面量校验+models.yaml 三档显式 buffer_turn(未配置=既有语义,向后兼容)。R2:web/src/voice/session.ts+livekit.ts 纯传输接线(VoiceRoom.interrupt(),既有 hush() 附带 publishData reliable topic=cg.interrupt,fire-and-forget 不阻塞文字发送,零视觉改动);worker.py bind_interrupt_channel(本房间 data_received 订阅,topic/发送者/载荷三重校验,session.interrupt(force=True),失败大声留痕,add_shutdown_callback 卸载);llm_chat_api._interrupt_owner 改 force=True+留痕。文档:docs/rework/hel908/summary.md 重写(删除不实表述、保留原始证据与纠偏、记录等待代价与边界),tests-remote-r2.log、web-r2.log、check-requirements.log。",
"acceptance": [
"R1 评审复现串逐字/小块经真实 OpenAICompatLLM→真实 app→持久化/receipt:'private reasoning '*20+'</think>回答。' 与 '我先想一下。内部思考</think>回答。' 的 chat.delta、落库行、chat.final、receipt text_hash 全部只含干净正文(buffer_turn 生成中零外发,修复前同输入已被本卡离线复现整段泄漏);记录流 id=12 按 1~1000 任意分块同样全干净;正常中英文正文逐字节保留;未闭合显式思考→空正文→诚实 chat.error;stream 模式显式块/推理字段/跨 chunk 语义保持,stray closer 透传可被 app 轮级 split 清理",
"R1 等待代价如实记录并测试固定:buffer_turn 首个可见正文等整轮生成完成(生成中零 chat.delta);取消轮照常 chat.cancelled 零泄漏、超时照常 chat.error;无 closer 无字段的推理不可识别边界已声明,不虚称全好",
"R2 真实 SDK 证明 8/8(agent venv 1.8.8):真实 SpeechHandle(allow_interruptions=False 覆盖 force 语义)+真实 pending 播放等待(wait_if_not_interrupted)——完整轮 chat.final 干净结束后(评审 evidence C 形状)注入 cg.interrupt 数据消息,播放等待被真实 interrupt 释放、句柄 interrupted、force=True 断言成立;非 force 在该句柄上 RuntimeError 复核;校验矩阵(错 topic/服务端来源/自身/坏载荷/错版本)零触发;卸载后零触发;session 未运行大声失败不崩溃",
"R2 app 集成记录:完整语音轮后的文字轮为普通轮(无任何行被取消、无 phantom 行);web 侧 hush() 在 speaking/thinking 才发消息且本地静音反馈保持,下一回复恢复正常收听路径未动;ChatPanel/视觉零改动",
"回归:.venv311 全量 480 passed/8 skipped(2 个 test_r3 失败在基准 5625de6 同样失败,预先存在);第一轮 5 项 SDK 检查全保持(取消终态/不复活/不重试/真实连接错误仍有限重试/完成轮流式+receipt 不变);web npm ci(既有锁文件)typecheck 0 错、lint 0 错 1 既有警告、vitest 148/148、build 成功;ruff 全绿;models.yaml 新键经 ModelsConfig 实际解析"
],
"deferred": [
"真实端到端复测(真实房间/真人打断时延/真机/真实端点思考出现频率与长回复起播延迟)须按授权窗口安排;R2 离线证明是真实 SDK 句柄/等待语义+实装源码核对,不冒充端到端毫秒指标",
"无 closer、无 reasoning 字段、无开头标签的推理任何客户端模式都不可识别,彻底解决需上游自行分流(字段或服务端 parser),零真实请求边界内无法探测——最小缺口如实声明",
"chat.cancelled 的前端可见呈现与 ChatPanel 取消判定 limit 扩大(HEL-909 建议 #3/#4,非阻塞)未动:前者属界面核心交视觉总监,后者纯展示层既有行为",
"gen_hel877_sdk_check harness 在基准上即因 HEL-906 导入失效(前轮已留证),交总管决定维护安排;本卡 SDK 验证由 test_sdk_livekit_hel908.py 覆盖(8 项,agent venv 可独立复跑)",
"R1–R7 完整功能、真实用户麦克风、视频/口型、记忆长跑继续按获批依赖承接;本卡不构成整产品完成"
],
"requirement_changes": [],
"verification": [
"docs/rework/hel908/summary.md:两轮根因/纠偏/方案/等待代价/边界全记录;第一轮不实表述已删除,原始证据与纠偏保留",
"docs/rework/hel908/tests-remote-r2.log:.venv311 全量 480 passed/8 skipped/2 pre-existing + agent venv SDK harness 8/8 实况",
"docs/rework/hel908/web-r2.log:typecheck/lint/vitest 148/148/build",
"tests/test_sdk_livekit_hel908.py 可在任何装有 livekit-agents 1.8.8 的环境复跑(pytest 或 --standalone),命令写在文件头",
"需求检查:check_requirements.py 对 origin/main 与 b8ec832 各带 --handoff 本文件通过(日志 docs/rework/hel908/check-requirements.log)"
]
}
+51
View File
@@ -0,0 +1,51 @@
{
"baseline_version": "1.12",
"read_commit": "958c6962fb1f2a4462a6df794d893aee1fcb0667",
"task": "HEL-910:按白栖知批准的《HEL-797-交谈修复复测安排》(主卡评论 01a18753-8c70-7181-9758-5bab4685ba9f「继续测」)对候选 958c696 做两次真实通话复测:真实网页原发送入口的文字打断(在播时机+final待播间隙)、python 同钟时间轴的等待链与回放打断、思考隔离真实端点检查;隔离部署 8360/8361/8363/8082 + 共享 TTS 9880 按快照临时恢复,全程批准上限内执行并清理恢复。",
"requirement_ids": [
"CG-006",
"CG-009",
"CG-010",
"CG-013",
"CG-014",
"CG-015",
"CG-016",
"CG-018",
"CG-019",
"CG-020",
"CG-021",
"AM-001",
"GOV-001",
"GOV-002",
"GOV-003",
"GOV-004",
"GOV-005",
"GOV-006",
"DEL-001"
],
"deliverable": "docs/rework/hel910/(window-record.md 窗口记录、window/ 逐通证据含 call2 同钟字幕/帧时间轴/回流音频/DB终态/ASR账本/前后快照/日志、web/ 真网页逐步截图、tools/ 本窗部署与测量脚本及配置);服务器证据包 /opt/cybergril-hel910/hel910-evidence-20261029.tar.gz(sha256 83363576…d7a3f0)。实测结论:真实网页发文字(真 Enter 键)在她语音在播时发送——旧声停止(浏览器能量 ≤~1.4s 持续静默、本地 hush 静音即时)、文字获完整回复并落库、旧轮不复活无幽灵行、被打断轮回执正确缺席、后续语音轮正常出声并完整回执(两次确认恢复);输入结束→实际第一声实测 9.53s(user_final 后 7.10s、生成开始后 3.44s,>5s 关注线,如实交回);全部真实回复零思考泄漏但真实端点未出现带 </think> 形状(覆盖范围如实限定,离线证据在 HEL-909);时机A(生成中被文字取消)因网页侧检测失误与 API 直发竞速反向未获正面样本(文字轮被更新语音轮正常取消:行 cancelled+SSE 幂等 chat.cancelled 终态帧,恰为 HEL-908 R1 修复路径的真实表现),随后语音轮撞 10/10 预算硬闸诚实 φ 失败;可闻旧声期间的回放打断样本因时机错过未取得(如实,与 HEL-907 同项均未取得)。用量:LLM 10/10 触线(30,398/40,000 tokens)、建房 4/4 触线、通话 2/2、TTS 6/20、ASR 350.63/720s(保守=确证、重试 0)、窗口 23.6/45 分、登记/上传/转写/试听/嵌入/付费全 0。清理:窗口端口与专属进程全停(精确 PID)、LiveKit 房间空、voices.json 哈希前后一致 cg- 零残留、共享 TTS 按快照停回、面板 8090 全程未启用、8300/8310/8320/8350/7880/10095 未动、GPU 回 747MiB。",
"acceptance": [
"部署核验:服务器源码树与 git archive 958c696 逐文件 sha256 一致(仅多 REVISION 标记);web/dist 含 cg.interrupt 接线;models.yaml 三档 reasoning: buffer_turn 与候选一致仅预算块不同;cap=0 fail-closed 预检(persona 拒绝、chat 诚实 error 零出站、voice 503 不建房)通过后才布防",
"真实网页链路:自签证书按用户姿态逐 origin 接受;语音通话从真实 UI 开启;文字从真实输入框+真实 Enter 键发送(hush→cg.interrupt 真实链路,未绕开网页修复);逐步截图 9 张留证",
"时机B(在播时发文字):旧声停止(浏览器能量探测 ~1.4s 内持续静默+本地静音即时)、T1 完整回复落库 sent、R1 不复活、后续语音轮正常出声并完整回执",
"final待播间隙(网页入口):U3 回复文本完整落库(音频截断、回执正确缺席)、T2 完整回复、再次语音轮正常出声回执",
"等待链(同钟毫秒):input_end→user_final 2.43s→生成开始 4.10s→实际第一声 9.53s→字幕全文/落库 12.10s→回执 ack;数字与 wav 能量对齐方法留证",
"思考隔离:18 条 companion 行/字幕/TTS 文本零思考;如实声明真实端点未出现带 closer 形状",
"上限与封账:全部类别在上限内或触线即停并如实记录;失败/取消均计入(call1 挂断后 U4 轮、call2 竞速取消轮与预算 φ 轮)",
"清理恢复:端口/房间/PID/声音列表/哈希/GPU 前后核对留证;隔离目录与证据包保留;未触碰任何既有实例与真实档案"
],
"deferred": [
"真实用户麦克风打断时延与可闻旧声期间的语音打断停声样本(两轮工程窗口均未取得,需真人同轴或下轮工程窗口以她实际有声为门控重试)",
"时机A(生成中文字取消)正面样本(需文字在语音轮服务端激活后、生成完成前到达;本轮竞速反向+预算封顶)",
"真实端点带 </think> 形状的分离复现(本轮真实回复未出现该形状;离线证据 HEL-909)",
"首声等待是否经常>5s 需多样本(本轮 1 精确样本+1 量级相近);停声时延的帧级精测(本轮为浏览器能量粗粒度 ≤~1.4s)",
"真机/手机麦克风、Safari(D3 用户动作)",
"R1–R7 完整功能未完成项继续按主卡承接;本轮不改变任何需求与验收状态"
],
"requirement_changes": [],
"verification": [
"python3 scripts/check_requirements.py --base-ref origin/main(及 --base-ref 958c696)+ --handoff docs/requirements/handoff-HEL-910.json 全部通过(结构检查,不代替原话核对与体验验收)",
"证据:docs/rework/hel910/window/(call2.subtitles.jsonl 逐事件毫秒时间戳、call2.frames.json 帧到达时间轴、call2.agent.wav 回流音频、db-final.json 全部 20 行含状态与回执账、asr-usage.jsonl、tts-window.log 6 段、api/worker 日志、前后快照);web/ 截图;tools/ 全套部署与测量脚本",
"未验证:真人麦克风、手机真机、真实端点思考形状、多样本首声统计——见 deferred,不冒充"
]
}
+228 -36
View File
@@ -1,55 +1,247 @@
# HEL-902 补测包:自定义声音真机窗口申请材料(交总管集中请批)
状态:**材料备齐,未获批前真实 cap=0**。所有上限为**新的一次性窗口授权**,不复用、不重开 HEL-879 已封账(其 14/40 请求、42717/500000 tokens、12/200 TTS 段保持封存;剩余数≠新许可)。工程参数由工程定,用户只批准真实用量与设备操作。
状态:**材料备齐(连续通话 ASR 计数与到线停机已由 HEL-906 落地为可执行
程序闸,2026-10-28 总管定点返工后含账本故障 fail-closed 与保守/确证双
口径,见 §4;剩余仅窗口前 .12 真实栈联验);未获批前真实 cap=0;
本包只写材料,绝不执行**。所有上限为
**新的一次性窗口授权**,不复用、不重开 HEL-879 已封账(其 14/40 请求、
42717/500000 tokens、12/200 TTS 段保持封存,永不重开;剩余数≠新许可)。
工程参数由工程定(只能收紧、不能放宽),用户只批准真实用量与设备操作。
## 1. 统一 head 与部署范围
## 0. 统一 head 与复审状态(2026-10-28 HEL-904 后更新,旧报告保持历史可追溯)
- 候选整合分支 `hel-902-integration` @ `d167ba9`(hel-900-preserved 701442d + hel-879-assembly be149cd,无冲突)。离线证据见 `docs/rework/hel902/REVIEW.md`:后端 376/376、全链 12/12、ruff/需求检查 4/4。
- 部署形态沿用 HEL-877/879 runbook:隔离双入口 8360/8361 + 8363 WSS 桥 + 专属 worker 8082 + 共享 TTS 9880(窗口内临时恢复,窗口后停回);`config/voice.yaml` 按合同 §4 增补。**不触碰** 8300–8350 演示/真实档案、8090(只读调用其 API)、8081、7880、旧资料与冻结账、4080;ComfyUI 保持暂停;不合 PR、不替换正式界面。
- 回滚:不部署即无痕;已部署时 git 还原 + 停窗口进程 + 移除 voice.yaml 增补即回 HEL-877 行为;资料空间三个新文件留存无害。
- `d167ba9` 是 **hel-902-integration 的整合合并提交**(历史事实,见
`docs/rework/hel902/REVIEW.md`,其 376/376 等证据属于当时 head)。
- HEL-902 统一审核通过时的分支 head 为 **`b09a907`**(README 勘误与补测包
所在提交);此后该分支未再作为交付 head 使用。
- **后台返修(HEL-904,本卡)**:独立分支 `agent/2/f337aae1f551`
(自 `b09a907` 起),登记失败恢复映射、worker 状态损坏实况、capture 竞态
收口三项修复与确定性时序测试;其 head 提交号见本卡交付评论,**该 head
在统一复审通过前不得当作最终已验证 head**。
- **前端返修(另卡,原作者)**:外接服务文案等;head 以该卡交付为准。
- 后端本轮与前端另卡**还需原总工一次统一复审**;通过后由复审在下方登记
「最终已验证 head」,再由主卡向白栖知申请批准本窗口。此前任何 head 都
不是执行依据。
| 里程碑 | head | 状态 |
| --- | --- | --- |
| 整合合并(历史) | `d167ba9` | 已被后续提交覆盖,仅作历史 |
| HEL-902 统一审核 | `b09a907` | 审核通过+一轮有限返修(已启动) |
| 后台返修 HEL-904 | `07dda2b`(分支 `agent/2/f337aae1f551`) | 已并入统一复审分支 |
| 前端返修 HEL-903 | `088ac62`(分支 `hel-903-preserved`,源码 `51669aa` 11 文件逐字节一致) | 已并入统一复审分支 |
| **最终已验证 head** | **`03cec26`**(分支 `origin/hel-905-unified-review`;复审验证基线=03cec26,其后仅本表的登记提交,执行以该分支最新 head 为准。HEL-905 总工统一复审通过:11 文件 SHA256 一致、后台 380/380+12/12+ruff 独立复跑、需求检查 4/4;前端构建/单测/浏览器未独立复跑,如实见 HEL-905 结论) | **复审通过,待主卡请批新窗口** |
| 连续 ASR 计数落地(HEL-906) | `ecec9df`(分支 `hel-906-asr-usage-counting`,基于 `0b804a4`;执行以该分支最新 head 为准,候选 PR 不合并) | 已落地并通过 17 项确定性离线测试+语音区回归 98 项+ruff;待总管复核后与统一 head 合并为窗口执行依据 |
| HEL-906 定点返工(总管复核算 gaps 修复) | `cf395d4`(同分支追加,基于 `ccfc04e`) | 账本写/读失败、损坏、中途丢失 fail-closed 停机+保全已知消耗;发送前保守预记(失败/取消不退还)+确证送达单列;24 项离线测试+语音区回归 105 项+ruff 通过 |
## 1. 部署形态与回滚
- 沿用 HEL-877/879 runbook:隔离双入口 8360/8361 + 8363 WSS 桥 + 专属
worker 8082 + 共享 TTS 9880(窗口内临时恢复,窗口后停回原状态);
`config/voice.yaml` 按合同 §4 增补。
- **不触碰** 8300–8350 演示/真实档案、8081、7880、旧资料与冻结账、4080;
ComfyUI 保持暂停;不合 PR、不替换正式界面。
- 8090 语音面板:窗口内**只读调用其查询 API**;获批登记步骤**经其上传
API 写入本窗口 `cg-` 条目**(面板仍是共享注册表唯一写者)。两句话分开
说清,不用「8090 只读」一笔带过获准后的写入。
- 回滚:不部署即无痕;已部署时停止窗口进程+移除 voice.yaml 增补即回
HEL-877 行为;资料空间三个新文件留存无害。**共享注册表/测试数据的回收
只能按 §3 清单经 8090 自有删除入口逐条完成,不得拿 git 回退或重启代替**。
## 2. 测试目标与逐步动作(全部可观察、可中止)
1. **真实登记**:浏览器(桌面 Chrome/Edge,LAN 机)上传一段 5–20 秒 WAV 参考音频 → `cg-` 登记 → 列表出现。
2. **可选 ASR**(≤3 次):留空参考文字、显式开转写开关 → FunASR 转写回显;另做一次「不开开关且无文字→422 拒绝」负例。
3. **真实试听**(≤10 次合成):现场合成 WAV 浏览器播放;负例:TTS 停机→503。
4. **应用与下一通验证**(≤3 次通话):试听后应用 → 开通话核对 worker 实际音色=会话响应 `voice` 字段;通话中改选→本通话不换声、下一通生效;从未选择→不代写 worker 文件。
1. **真实登记**:浏览器(桌面 Chrome/Edge,LAN 机)上传一段 5–20 秒 WAV
参考音频(来源见 §3)→ `cg-` 登记 → 列表出现。
2. **可选登记转写 ASR**(≤3 次):留空参考文字、显式开转写开关 → FunASR
转写回显;另做一次「不开开关且无文字→422 拒绝」负例。
3. **真实试听**(≤10 次合成):现场合成 WAV 浏览器播放;负例:TTS 停机
→503。另做一次「未试听直接应用→409」负例(守门保持)。
4. **应用与下一通验证**(≤3 次实际通话):试听后应用 → 开通话核对
worker 实际音色=会话响应 `voice` 字段;通话中改选→本通话不换声、
下一通生效(通话窗口持有语义,合同 §2.5);从未选择→不代写 worker
文件。
5. **HEL-879 遗留量测**(并入同一窗口,不另开窗):
- 打断后约 1 秒停声:真实通话开口打断,以 worker 日志 `turn_cancel` 时间戳与最后 TTS 段发送时间差为准(毫秒级,附日志行);辅以浏览器侧听到停声即停表的人工秒表复核。
- 文字打断语音方向:她语音输出中发送文字→声即停、文字被处理;与既有「语音取消文字」方向互补。
- 真实浏览器/设备麦克风路径:LAN 机真实麦克风(非 fake device)完成第 4 项;如用户愿意,iPhone Safari 经 8363 WSS + 证书信任步骤试一连(可选,失败不影响其余结论)。
6. **窗口内快检**(可选,若获批一次性依赖安装授权):本机 `npm ci`(同锁文件)→ 复跑 vitest 137/tsc/eslint/build + `hel900_mock.mjs`+`hel900_shots.mjs`(Chromium headless,两主题×电脑/手机 + 演示入口零外发断言)。不获批则此项留待后续。
- **打断停声(约 1 秒)**:量测点必须从**用户实际开口/有效打断输入的
时点**起,到**浏览器实际播放的旧音停止**为止。
- 主测法(最小、单一时间基准):LAN 机上一次连续的「屏幕+标签页
输出音频」采集(Chrome 标签页音频采集/OBS,全程单录音文件)。
该采集只录浏览器播放出的声音(**不混入本地麦克风**),打断操作
的时点在画面上可见(说话动作/发送文字的动作),T0=输入起始帧、
T1=旧音最后一帧可闻帧,停声=T1−T0;同一段录音里再标出新回复
起播点与提示音位置(提示音按固定音色/波形辨认并排除,不并入
停声),帧级分析即毫秒级时基,不需要跨机对钟。
- worker 日志 `turn_cancel`→最后 TTS 段发送时间差**只是内部子段
证据**(附日志行),不能单独证明用户听到了约 1 秒停声;人工秒表
仅作辅助复核。
- **文字打断语音**与**真实设备麦克风打断**两个方向都做:文字方向=
她语音输出中发送文字→声即停;麦克风方向必须用 LAN 机真实麦克风
(非 fake device,不把假设备当真机)。**麦克风方向的 T0 必须是
同一录制时间轴上本地麦克风音轨的实际起声帧**(如 OBS 单文件多
音轨:一轨浏览器输出、一轨本地麦克风,同一时钟可分离分析);
仅画面中的说话动作不能直接代替实际音频起点。
- 真实浏览器/设备麦克风路径:LAN 机真实麦克风完成第 4 项;如用户
愿意,iPhone Safari 经 8363 WSS + 证书信任步骤试一连(可选,失败
不影响其余结论)。
6. **窗口内快检**(可选,**单独待批项**:一次性 npm 同锁文件安装授权,
本轮与后端返修都不执行):本机 `npm ci` → 复跑 vitest/tsc/eslint/
build + `hel900_mock.mjs`+`hel900_shots.mjs`。不获批则留待后续。
## 3. 参考音频来源与共享注册表新增/回收
- 来源:优先用总管自备的一段真实人声 WAV(用户已授权「音色你自己决定」适用窗口测试音色);或复用 D1 试听包中已只读取回的既有参考录音之一作克隆源(不新增采集、不新录用户声音、不申请摄像头)。
- 共享 `voices.json` 新增:仅 `cg-` 命名空间新条目(服务端生成,结构上不可能碰既有 11 支;面板仍是唯一写者)。**回收**:窗口结束按登记清单逐条经 8090 面板自有删除入口删除并截图/列表复核;保留一条经用户后续确认去留。元数据/流水在实例资料空间,随实例清理。
- 全局默认音色、通用助手 `voice_state.json`/`persona_state.json` 不触碰(测试断言已含)。
- **参考音频(已明确到段)**:首选 D1 试听包中 `female_soft` 的 zero-shot
参考录音——来源服务器路径 `/opt/voice-agent/cosyvoice/voice_samples/
female_soft.wav`,本地清单 `docs/rework/hel879/d1-audition/manifest.json`
记录 sha256 `4a65d17099239711601cb17e28b7aa7b6149acd153b92fd0366c23902bd4f687`、
341192 字节、10.7 秒、16k/mono(中文女声、时长在 5–20s 建议区间)。
备选 `xiaoyun.wav`(`6ad3ca7a…dc87e`、297004 字节、4.6 秒、32k/mono)。
窗口执行前只读重新取回并**先核对 sha256 与清单一致**再用;不新增采集、
不新录用户声音、不申请摄像头。**授权测试音色由总管决定**;无需为此
再问用户算法或端口。
- 共享 `voices.json` 新增:仅 `cg-` 命名空间新条目(服务端生成,结构上
不可能碰既有 11 支;面板仍是唯一写者);不覆盖原 11 支与全局默认。
- **回收(窗口结束逐项执行)**:按本窗口登记清单(含孤儿条目)逐条经
8090 面板自有删除入口删除,删除前后各留一次列表快照比对;**回收失败
的条目按「编号/名称/登记时间/失败原因」留精确清单交接**,不删不属于
本窗口的孤儿,也**不未经用户确认保留任何一条测试垃圾**——默认全部
回收,确需保留的逐条写明理由交总管向用户确认。元数据/流水在实例资料
空间,随实例清理。
- 全局默认音色、通用助手 `voice_state.json`/`persona_state.json` 不触碰
(测试断言已含)。
## 4. 时窗与逐类上限(一次性,超出即停)
## 4. 时窗与逐类上限(一次性,超出即停;计数口径含失败)
| 类别 | 上限 | 计数口径 |
| --- | --- | --- |
| 时窗 | ≤2 小时(建议 1 小时) | 首个真实请求起算 |
| 语音通话 | ≤3 次 | POST /api/voice/session 成功开房 |
| 开房(含空会话) | ≤6 次 | 同上,含失败重试 |
| LLM 请求 | ≤20 | 统一账本 acquire(失败/打断/后台都计) |
| LLM tokens | ≤60000 | 同上 |
| 嵌入 | 0 | 硬闸 |
| 登记转写 ASR | ≤3 | `voice-usage.jsonl` register_asr 行 |
| 试听合成 | ≤10 | preview_tts 行 |
| 通话 TTS 段 | ≤40 | worker 流水 |
| 音色登记 | ≤3 | 8090 upload 成功数 |
所有上限为**候选申报值**,工程执行时只能收紧不能放宽。**一切失败、取消、
重试、已出站但无成功响应的调用都计入相应口径**,不只统计成功流水。
停机方法:任一上限达到即停(LLM/嵌入为代码硬闸,其余为工程守则:实时盯 `voice-usage.jsonl` 与统一账本页面);窗口结束停 8360/8361/8082/8363/9880(9880 停回原状态),`ss -ltn` 复核端口、房间经 API 挂断或 TTL 清理,账本与流水快照存档到 `docs/rework/hel902/`,孤儿 cg- 条目按 §3 回收。
| 类别 | 候选上限 | 计数口径(含失败/取消/重试/出站无响应) | 闸门性质 |
| --- | --- | --- | --- |
| 时窗 | ≤2 小时(建议 1 小时) | 首个真实请求起算 | 工程守则(负责人盯表) |
| 实际语音通话 | ≤3 次 | 通话真实发生数 | 工程守则 |
| 开房(含空会话) | ≤6 次 | `POST /api/voice/session` 每次调用(成功/失败/取消都算) | 程序可数(API 日志/会话账本) |
| LLM 请求 | ≤20 | 统一账本 acquire | **程序硬闸**(`think/budget.py`) |
| LLM tokens | ≤60000 | 同上 | **程序硬闸** |
| 嵌入 | 0 | acquire 拒绝 | **程序硬闸** |
| 登记转写 ASR | ≤3 | `voice-usage.jsonl` `register_asr` 行(含本地元数据落盘失败者)+**面板侧转写失败/断连的如实口径见下** | 工程监看(程序计数、非硬闸) |
| 试听合成 | ≤10 | `preview_tts` 行(含 TTS 出站无成功响应者) | 工程监看(同上) |
| 通话 TTS 段 | ≤40 | worker 侧流水/日志计数 | 工程监看(见下,需窗口前验证命令) |
| 音色登记(8090 upload) | ≤3 | 上传出站次数(含断连后已生效者) | 工程监看(面板上传账) |
| **连续通话 ASR 音频时长** | ≤45 分钟(3 通 × ≤15 分钟实操上限) | 实际送入帧计时(含重发;**含发送失败/取消的不确定出站**——发送前保守预记、不退还,确证送达量另列核对),见下:**HEL-906 已落地(返工后双口径)** | **程序硬闸**(worker 侧发送前拒绝;未布防=拒绝) |
| **连续通话 ASR 连接重试** | ≤6 次/通 | 失败后重试计数(正常一句一连不计 retry),见下 | **程序硬闸**(建连前拒绝;未布防=拒绝) |
| 新增付费支出 | 0 | 全程零付费 API | 工程守则 |
## 5. 旧服务与资料保护清单(窗口内不变式)
**硬闸与监看的界线(如实,HEL-906 返工后更新)**:LLM 请求/tokens、嵌入
(统一账本 acquire)与**连续通话 ASR 音频/连接重试(worker 侧
AsrUsageGuard,布防后发送前/建连前拒绝;账本故障 fail-closed 停机)**
都是代码级硬闸;其余上限是**工程监看或程序计数**,靠实时看数+负责人
停机,**不拿事后流水冒充硬闸**。ASR 闸的保证范围必须如实:**硬停保证
只在布防进程内逐帧成立**;跨进程/崩溃的边界见下段「程序能保证」。
8300/8310 演示与真实档案进程不动;8090 只读调用+授权后的 cg- 写入;7880/8081 不碰;既有数据库、身份、聊天、记忆不重置;测试写入只落隔离实例数据空间;每日自动备份任务(如有)不中断;不动队员模型/运行时/认证;不申请摄像头。
**登记转写 ASR 口径的如实边界(HEL-905 复审核实)**:`register_asr` 流水
只在**登记成功(含本地元数据落盘失败)且参考文字来自转写**时记录;面板侧
转写**失败或上传断连**时 API 只见到面板拒绝/异常,不产生 `register_asr`
行——这部分用量不靠该流水,而由「音色登记(8090 upload)≤3(含断连后已
生效者)」上界覆盖:**每次转写尝试必伴随一次 upload 出站**,两项上限须
一起监看,不得只看 `register_asr` 行宣称 ASR 用量。
**连续通话 ASR(worker 内 FunASR 连续识别,区别于登记转写 ASR)的计数
手段与停机**:
- 墙钟代理(可程序数,命令可执行;**如实声明其边界**。HEL-906 后降为
**下界交叉核对**:执行手段以上方实际帧计数硬闸为准):实例旁会话账本
`<db>-voice-sessions.json` 只保留**当前** `.sessions`(在途)与 `.debts`
(删除未落定的欠账)——**删除成功的通话会从账本里移除**,因此
`jq '[.debts[] | (.first_debt_at - .session.created_at)] | add // 0'
<db>-voice-sessions.json` 只合计**残存欠账**,是全窗用量的下界核对,
**不能冒充整个窗口的通话墙钟合计**。逐通墙钟以开房/挂断当时记录为准:
每通 `POST /api/voice/session` 与 `DELETE` 的时刻由窗口负责人当场记录
逐通归档(≤3 通,人工可数),账本 jq 只作残存欠账与在途通话的核对
(在途看 `.sessions[]` 的 `created_at`)。通话墙钟总时长
≥麦克风推流时长的上界,再加 §2 每通 ≤15 分钟操作掐表即 ≤45 分钟总上限
的执行手段;窗口负责人:总管。到线即停:停开新会话并挂断在途会话
(`DELETE /api/voice/session/{id}`)。
- **已落地(HEL-906,修掉本节前置缺口;2026-10-28 总管定点返工后为下述
口径)**:逐通精确音频时长与 ASR 连接重试次数现在有本仓库可执行的程序
计数与到线停机——`src/cybergril/voice/asr_usage.py`(仅标准库)+专属
worker 真实送数接缝(`stt_funasr.py` 建连前检查、**发送前保守预记并
拒绝越限帧**、`await ws.send` 成功返回后记确证送达;`worker.py` 按 job
注入并以房间名标识每通,触线/账本故障回调 `ctx.shutdown` 结束本通)。
计数口径:
- **音频(保守计费,硬闸依据)**=发送**前**按整帧预记的
`样本数/采样率` 之和(重采样后的输出帧按其自身 16k 计,重发按重复
计);**发送失败或被取消不退还**——帧可能已出站;墙钟与事后成功
流水不参与。**确证送达量**(`confirmed_seconds`,仅 `await` 成功
返回的帧)单独累计、单独落账,只作更低的核对下界,**不得把预记量
宣称全部确证送达**。
- **连接**=每次 websocket 建连尝试(含失败)逐条落账;FunASR 一句一
连的正常重建**不是** retry,只有上次尝试失败/接收侧死亡/流异常结束
之后的建连才计 retry(≤6 次/通在建连前拒绝)。
- **账本**=追加写 JSONL(默认 `/opt/voice-agent-cybergril/asr-usage.jsonl`,
`CYBERGRIL_ASR_USAGE_LEDGER` 可改),逐通 call_start/audio/
connect_attempt/connection_died/call_end/block/guard_stop 永不改写:
删房成功会从会话账本移除该通,但这里的逐通历史保留,窗口总量由
重放账本恢复,同窗口重启进程不能重置预算。
- **账本故障 fail-closed(返工新增)**=账本**写失败、读失败、行损坏
或中途消失**时:guard 停止本窗口一切出站(新连接/新音频一律拒绝)、
保全内存已知消耗(窗口计数只增不减,禁止默认零预算或按旧账回退)、
记 error 日志与停机原因,并把 `guard_stop` 落账——同窗重启重放该
记录仍保持停机。故障下不继续通话(不要求支持)。
- **布防**=窗口启动时由负责人显式设 `CYBERGRIL_ASR_WINDOW_ID`+上限
(`..._MAX_AUDIO_SECONDS=2700`、`..._MAX_CONNECT_RETRIES_PER_CALL=6`);
未设即 fail-closed 拒绝一切 ASR 连接/音频(真实 cap=0,含未获批的
现在)。旧 HEL-879 封账永不重开,新窗口用新 window id 独立预算。
- **程序能保证(如实,不扩大)**:布防**进程内**逐帧发送前硬停(越限
帧一个字节不出站;保守预记含发送失败/取消的不确定出站)、每通重试
上限建连前拒绝、逐通/全窗计数不因删房/重启丢失、**账本读/写/损坏
故障即停且不回退预算**。**剩余只能监看**:两 worker 进程并行通话时
对端最近 ≤ max(resync, flush)=5s 的音频可能未计入本轮判定(有界
过冲,每次建连检查会重放账本收敛)——**不承诺全窗口跨进程绝不
越限**;进程崩溃前 ≤5s 的已发音频可能少计(确证量同样只在 flush
后落账);真实 FunASR/LiveKit 行为仍须窗口前在 .12 用
`scripts/gen_hel877_sdk_check.py` 同法加载本模块联验。为此**窗口执行
约定**:≤3 通一律**顺序执行、不重叠**,通话实操上限与 flush/resync
参数按需收紧并预留余量(例如每通按 ≤13 分钟执行、总量按 ≤40 分钟
监看),把跨进程/崩溃边界排除出真实越限路径。
- **可复现验证命令**(离线,零真实调用):
`python -m pytest tests/test_voice_asr_usage.py -q`(24 项:不同采样
率、静音/取消/失败/重连、反复结束、触线前拒绝、落盘恢复、删房不丢
历史、跨窗口不误停、worker 接线与默认 fail-closed;返工新增——
**总管复现的「写失败→重放回退」回归路径、读失败/损坏/中途丢失
fail-closed、guard_stop 跨重启仍停、假 ws 先记 payload 再 raise/
取消后预算仍含该帧(保守计费)而确证量不含**);
`python -m cybergril.voice.asr_usage <ledger.jsonl> [--window W]`
(窗口中实时核对逐通/全窗合计与停机状态的只读汇总)。
**停机方法**:任一上限达到即停(LLM/嵌入自动拒;其余实时盯
`voice-usage.jsonl`、统一账本与会话账本);窗口结束停 8360/8361/8082/
8363,9880 停回原状态(见 §5 快照),`ss -ltn` 复核端口、房间经 API
挂断或 TTL 清理,账本与流水快照存档到 `docs/rework/hel902/`,孤儿 `cg-`
条目按 §3 回收。
## 5. 旧服务与资料保护清单(窗口内不变式,逐项核对)
- 8300/8310 演示与真实档案进程不动;7880/8081 不碰;既有数据库、身份、
聊天、记忆不重置;测试写入只落隔离实例数据空间;每日自动备份任务
(如有)不中断;不动队员模型/运行时/认证;不申请摄像头。
- **共享 TTS 9880 启停保护**:窗口开始前快照其当前状态(是否在运行、
进程/容器 id、启动参数:`systemctl status`/`docker ps` + `ps` 输出
存档);窗口内临时恢复;窗口结束**按快照恢复原状**(原本停机则停回
停机),恢复后再次 `ss -ltn | grep 9880` + 进程比对留证。
- **端口/房间/临时声音/日志逐项核对表**(窗口结束逐项打勾并存证):
端口 8360/8361/8363/8082 全停;9880 恢复原状;LiveKit 房间清空
(`DELETE /api/voice/session/*` 或 TTL);`voice_samples/` 无本窗口
残留 wav(对照 `cg-` 登记清单);窗口专属日志与账本快照归档
`docs/rework/hel902/`;共享 `voices.json` 与 11 支内置前后 diff 仅
本窗口 `cg-` 且已按 §3 回收。
- **不能用 git 回退代替共享注册表/测试数据回收**(git 只管仓库文件,
不管 8090 面板与服务器状态)。
## 6. 通过判据
- 登记→(可选转写)→试听→应用→下一通话用新声音,全链真实完成且日志对得上;通话中改选不中途换声。
- 打断停声时延有毫秒级日志证据;文字打断语音方向有观察记录。
- 共享注册表前后 diff 仅 `cg-` 新增且回收完成;11 支内置与全局默认零变化(前后快照比对)。
- 全部上限内完成;结束后无残留窗口进程/端口/房间。
- 登记→(可选转写)→试听→应用→下一通话用新声音,全链真实完成且日志
对得上;通话中改选不中途换声(会话响应 `voice`=worker 实际音色)。
- 打断停声时延有**同一时间基准的帧级录音证据**(输入时点→旧音停止,
排除提示音/新回复/麦克风混音);文字打断语音方向有观察记录;真实
麦克风路径用的是真机不是假设备。
- 共享注册表前后 diff 仅 `cg-` 新增且回收完成(或留精确失败交接清单);
11 支内置与全局默认零变化(前后快照比对)。
- 全部上限内完成(含失败与重试口径);结束后无残留窗口进程/端口/房间;
付费支出为 0。
+58
View File
@@ -0,0 +1,58 @@
# HEL-904 后台有限返修记录(登记失败恢复 / worker 状态实况 / capture 竞态)
作者:施工员2号(HEL-899 原作者)。2026-10-28。基准 v1.12 @ `b09a907`。
零真实 LLM/嵌入/ASR/TTS 调用、零共享音色写入、零部署、零依赖下载安装、
未动 web/、未改共享 worker、未新增依赖。不重做架构、不改网页。
对应 `docs/rework/hel902/REVIEW.md` §5 的第 2、3、4、6 项(后台部分)。
## 1. 改动清单
| 文件 | 改动 |
| --- | --- |
| `src/cybergril/voice/custom.py` | ① `register()`:本地元数据落盘失败从裸 OSError 改为 `LocalRecordFailed`(共享登记不回滚、编号写进中文提示、刷新可找回继续试听/应用、不逼重复登记);`register_asr` 流水改在本地落盘**之前**记(转写真实发生,资源口径必计)。② `write_worker_voice()` docstring 补损坏实况:文件读不出时整体重写仅剩 voice,不再宣称任何情况下保留其他键;正常可读文件行为不变。③ 新增通话持有 `hold/release_call_voice`/`call_voice_held`;`apply_selection()` 在有活跃通话时只记选择、暂缓写 worker 文件(整通话窗口按「worker 尚未读」对待),无活跃通话行为与原先一致(含回滚)。 |
| `src/cybergril/voice/router.py` | `_capture_voice()` 捕获后登记通话持有(无 await 间隙);`open_session` 失败/取消即释放;`register_voice` 映射 `LocalRecordFailed`→503 中文文案;挂载 `on_session_settled`→释放持有;头部契约注释更新。 |
| `src/cybergril/voice/session.py` | 新增可选 `on_session_settled` 回调;会话离开活跃表(显式挂断成功、挂断失败转欠账、TTL 到期 `_prune`)即结算。回调异常只影响释放时机(安全方向),不拖垮会话流程。 |
| `tests/test_voice_review_hel902.py` | 第 1 例按新契约改写:503 中文映射+编号在文案里+不误称回滚+进程内可试听可应用+重启按编号(label=编号)继续用+新音色未试听仍 409+11 支/通用助手零改写。 |
| `tests/test_voice_rework_hel904.py`(新增 4 例) | 确定性时序用例(asyncio.Event 门控,无 sleep 判定):worker 读时点延迟到 dispatch 返回之后+并发应用→本通话保持旧音色(响应=实读)、挂断结算、下一通用新音色;挂断失败转欠账与 TTL 到期两条结算路径;dispatch 失败即释放(应用立即写透);开房请求在途取消即释放。 |
| `docs/voice-custom-contract-HEL899.md` | §2.2 补共享登记成功/本地写失败与断连孤儿行为;§2.5 补通话窗口持有语义(含重叠通话如实保留的残余);§3 worker 文件损坏实况。 |
| `docs/rework/hel902/r5-followup-package.md` | 补测材料收紧(仅材料):head 里程碑表(d167ba9=整合提交、b09a907=审核 head、返修 head 待统一复审登记)、登记/连续通话 ASR 区分、连续通话 ASR 计数手段与待补阻塞如实声明、停声量测改为单一时间基准帧级录音法、参考音频明确到 D1 包具体段(含 sha256/长度)、回收清单与「不未经确认保留测试垃圾」、共享 TTS 启停快照恢复与逐项核对表、git 回退不代替共享回收、上限表补含失败口径与硬闸/监看界线。 |
## 2. 竞态收口的事实依据与设计
- 事实入口(不猜):专属 worker 是**另一进程**,在**它自己的会话入口**读
一次 `voice_state_cybergril.json`(HEL-877 既有行为,合同 §2.5;本仓库
不含 worker 代码,不改共享 worker)。API 只知道 dispatch 返回时刻,
**dispatch 返回 ≠ worker 已读**。
- 设计=等价「会话不可变快照」:capture 时(写文件后、任何 await 前)登记
按音色计数的通话持有;活跃通话期间 `apply` 只更新选择(本地选择仍原子
落盘),worker 文件定在本通话捕获值上;挂断/到期/失败/取消结算持有。
暂缓的写不需要补写:下一次通话 capture 总会按当前选择重写文件(从未
选择仍不代写,维持 D1 边界)。
- 保证:**会话响应 `voice` = worker 本通话实际读到并使用的声音**;通话中
改选只影响下一通,绝不半句换人。
- 如实保留的残余(不宣称消除):两通**重叠**(单用户产品退化场景)且选了
不同声音时,较新通话的 capture 会重写文件;较早通话的 worker 若迟迟
未读,可能读到较新捕获值。每个 worker 仍整通话单一音色。确定性用例
覆盖的是正常单通话流。
## 3. 自测(全部离线,零真实调用;py3.11.16)
- `pytest tests -q`:**380 通过**(基线 376+新增 4;改写的第 1 例保持
原名)。含既有 18 项 HEL-899 与总工 6 项故障注入全数通过。
- `python -I scripts/verify_hel899_custom_voice.py`:**12/12**(含通话中
改选定住本通话、下一通生效)。
- `ruff check src tests scripts`:通过。
- 需求检查 4 组(origin/main 与 b09a907,各带/不带本卡 handoff):通过
(证据见交付评论)。
## 4. 未验证 / 承接(如实)
- 真实 worker 读时点、真实 dispatch/房间行为、打断停声与真机麦克风路径:
属获批补测窗口(材料已收紧,见 `docs/rework/hel902/r5-followup-package.md`)。
- 本卡修复(后台)与前端另卡仍需原总工**一次统一复审**;通过后由复审
登记最终已验证 head,再由主卡向白栖知申请批准新窗口。复审前不得把本
head 当作最终已验证 head。
- 前端「会话页显示本次通话声音」(审核建议第 5 项)属 web/,归前端另卡。
- CG-009/R6 删除与完整备份恢复、R5 整体验收、R1–R7 完整功能持续承接;
本卡通过≠自定义音色用户验收,更≠完整产品完成。
+13
View File
@@ -0,0 +1,13 @@
> cybergril-web@0.1.0 build
> tsc --noEmit && vite build
vite v6.3.6 building for production...
transforming...
✓ 59 modules transformed.
rendering chunks...
computing gzip size...
dist/index.html 0.49 kB │ gzip: 0.35 kB
dist/assets/index-B8TdHoQm.css 88.58 kB │ gzip: 18.37 kB
dist/assets/index-ba4PURHH.js 342.44 kB │ gzip: 114.48 kB
✓ built in 680ms
@@ -0,0 +1,85 @@
PASS mock is this hel900 mock
PASS moon-desktop: no microphone before anything is tapped
PASS moon-desktop: opening the section only reads the list
PASS moon-desktop: says when a change takes effect
PASS moon-desktop: recording state is explicit and the microphone is live
PASS moon-desktop: audio only, never the camera
PASS moon-desktop: stopping keeps the take and releases the microphone
PASS moon-desktop: the take is labelled as your reference, not her voice
PASS moon-desktop: register needs reference text or an explicit transcription opt-in
PASS moon-desktop: the upload is real PCM WAV (16 kHz mono 16-bit), raw body + query
PASS moon-desktop: the new voice is chosen for a preview; apply waits for it
PASS moon-desktop: a fresh preview plays and only then can be applied
PASS moon-desktop: the preview is labelled as her synthesized voice, not your reference
PASS moon-desktop: the preview actually plays in the page
PASS moon-desktop: applied — current voice shown, from the next call
PASS moon-desktop: no object URL or microphone left after closing settings
PASS fog-desktop: no microphone before anything is tapped
PASS fog-desktop: opening the section only reads the list
PASS fog-desktop: says when a change takes effect
PASS fog-desktop: recording state is explicit and the microphone is live
PASS fog-desktop: audio only, never the camera
PASS fog-desktop: stopping keeps the take and releases the microphone
PASS fog-desktop: the take is labelled as your reference, not her voice
PASS fog-desktop: register needs reference text or an explicit transcription opt-in
PASS fog-desktop: the upload is real PCM WAV (16 kHz mono 16-bit), raw body + query
PASS fog-desktop: the new voice is chosen for a preview; apply waits for it
PASS fog-desktop: a fresh preview plays and only then can be applied
PASS fog-desktop: the preview is labelled as her synthesized voice, not your reference
PASS fog-desktop: the preview actually plays in the page
PASS fog-desktop: applied — current voice shown, from the next call
PASS fog-desktop: no object URL or microphone left after closing settings
PASS moon-phone: no microphone before anything is tapped
PASS moon-phone: opening the section only reads the list
PASS moon-phone: says when a change takes effect
PASS moon-phone: recording state is explicit and the microphone is live
PASS moon-phone: audio only, never the camera
PASS moon-phone: stopping keeps the take and releases the microphone
PASS moon-phone: the take is labelled as your reference, not her voice
PASS moon-phone: register needs reference text or an explicit transcription opt-in
PASS moon-phone: the upload is real PCM WAV (16 kHz mono 16-bit), raw body + query
PASS moon-phone: the new voice is chosen for a preview; apply waits for it
PASS moon-phone: a fresh preview plays and only then can be applied
PASS moon-phone: the preview is labelled as her synthesized voice, not your reference
PASS moon-phone: the preview actually plays in the page
PASS moon-phone: applied — current voice shown, from the next call
PASS moon-phone: no object URL or microphone left after closing settings
PASS fog-phone: no microphone before anything is tapped
PASS fog-phone: opening the section only reads the list
PASS fog-phone: says when a change takes effect
PASS fog-phone: recording state is explicit and the microphone is live
PASS fog-phone: audio only, never the camera
PASS fog-phone: stopping keeps the take and releases the microphone
PASS fog-phone: the take is labelled as your reference, not her voice
PASS fog-phone: register needs reference text or an explicit transcription opt-in
PASS fog-phone: the upload is real PCM WAV (16 kHz mono 16-bit), raw body + query
PASS fog-phone: the new voice is chosen for a preview; apply waits for it
PASS fog-phone: a fresh preview plays and only then can be applied
PASS fog-phone: the preview is labelled as her synthesized voice, not your reference
PASS fog-phone: the preview actually plays in the page
PASS fog-phone: applied — current voice shown, from the next call
PASS fog-phone: no object URL or microphone left after closing settings
PASS file: a renamed non-WAV is refused in the browser, nothing uploaded
PASS file: a 22 kHz stereo WAV becomes 16 kHz mono
PASS asr: opting in enables register with empty text
PASS offline: says so, keeps the take, sends nothing
PASS 503: honest message, take still there for a retry
PASS double tap registers once; transcription only on explicit opt-in
PASS asr: the transcribed text is shown back
PASS late: an older preview arriving after switching is dropped
PASS bad preview: refused, nothing playable shown
PASS preview 503: honest message
PASS apply 409: message, selection unchanged
PASS cancel: microphone released, take discarded
PASS leaving the section mid-take releases the microphone
PASS coming back says the take was dropped
PASS denied: says why, nothing recording
PASS an unregistered take guards leaving
PASS after leaving, nothing of the section remains
PASS list unconfigured: honest card, no microphone, no 'adjustable' tag
PASS list no-route: honest card, no microphone, no 'adjustable' tag
PASS list panel-down: honest card, no microphone, no 'adjustable' tag
PASS panel back: retry shows the list
PASS no registration or apply was ever cut off by the page itself
83/83 passed
+1
View File
@@ -0,0 +1 @@
hel900 mock on 8900 pid 2311407
Binary file not shown.

After

Width:  |  Height:  |  Size: 849 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 827 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 854 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 813 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 831 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 843 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 802 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 814 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 797 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 814 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 871 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 861 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 855 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 848 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 856 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 851 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 423 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 378 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 372 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 356 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 387 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 370 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 856 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 843 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 836 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 829 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 838 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 833 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 431 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 366 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 360 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 344 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 376 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 359 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 301 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 288 KiB

@@ -0,0 +1,92 @@
PASS mock is this hel903 mock
PASS moon-desktop: services — TTS row says configured + health probe reachable
PASS moon-desktop: services — ASR row claims no probe it does not have
PASS moon-desktop: services — no voice row says "尚未接通" or "已接通"
PASS moon-desktop: services — reading status opens no microphone
PASS moon-desktop: a voice is applied through the existing flow
PASS moon-desktop: settings still says a change takes effect at the next call
PASS moon-desktop: call line shows 本次通话 voice from the session answer
PASS moon-desktop: subtitles still show beside it
PASS moon-desktop: a choice made during the call does not change this call
PASS moon-desktop: ending the call releases the microphone and drops the pin
PASS moon-desktop: the next call shows the new voice
PASS moon-desktop: 500 after filing — says it may be registered and to refresh first
PASS moon-desktop: offers 刷新列表 and words a second registration as a checked choice
PASS moon-desktop: the list is not re-read or re-registered behind your back
PASS moon-desktop: refreshing names the new numbered entry
PASS moon-desktop: the numbered entry is marked as missing local metadata
PASS moon-desktop: after it is found the cautious button goes away
PASS fog-desktop: services — TTS row says configured + health probe reachable
PASS fog-desktop: services — ASR row claims no probe it does not have
PASS fog-desktop: services — no voice row says "尚未接通" or "已接通"
PASS fog-desktop: services — reading status opens no microphone
PASS fog-desktop: a voice is applied through the existing flow
PASS fog-desktop: settings still says a change takes effect at the next call
PASS fog-desktop: call line shows 本次通话 voice from the session answer
PASS fog-desktop: subtitles still show beside it
PASS fog-desktop: a choice made during the call does not change this call
PASS fog-desktop: ending the call releases the microphone and drops the pin
PASS fog-desktop: the next call shows the new voice
PASS fog-desktop: 500 after filing — says it may be registered and to refresh first
PASS fog-desktop: offers 刷新列表 and words a second registration as a checked choice
PASS fog-desktop: the list is not re-read or re-registered behind your back
PASS fog-desktop: refreshing names the new numbered entry
PASS fog-desktop: the numbered entry is marked as missing local metadata
PASS fog-desktop: after it is found the cautious button goes away
PASS moon-phone: services — TTS row says configured + health probe reachable
PASS moon-phone: services — ASR row claims no probe it does not have
PASS moon-phone: services — no voice row says "尚未接通" or "已接通"
PASS moon-phone: services — reading status opens no microphone
PASS moon-phone: a voice is applied through the existing flow
PASS moon-phone: settings still says a change takes effect at the next call
PASS moon-phone: call line shows 本次通话 voice from the session answer
PASS moon-phone: subtitles still show beside it
PASS moon-phone: a choice made during the call does not change this call
PASS moon-phone: ending the call releases the microphone and drops the pin
PASS moon-phone: the next call shows the new voice
PASS moon-phone: 500 after filing — says it may be registered and to refresh first
PASS moon-phone: offers 刷新列表 and words a second registration as a checked choice
PASS moon-phone: the list is not re-read or re-registered behind your back
PASS moon-phone: refreshing names the new numbered entry
PASS moon-phone: the numbered entry is marked as missing local metadata
PASS moon-phone: after it is found the cautious button goes away
PASS fog-phone: services — TTS row says configured + health probe reachable
PASS fog-phone: services — ASR row claims no probe it does not have
PASS fog-phone: services — no voice row says "尚未接通" or "已接通"
PASS fog-phone: services — reading status opens no microphone
PASS fog-phone: a voice is applied through the existing flow
PASS fog-phone: settings still says a change takes effect at the next call
PASS fog-phone: call line shows 本次通话 voice from the session answer
PASS fog-phone: subtitles still show beside it
PASS fog-phone: a choice made during the call does not change this call
PASS fog-phone: ending the call releases the microphone and drops the pin
PASS fog-phone: the next call shows the new voice
PASS fog-phone: 500 after filing — says it may be registered and to refresh first
PASS fog-phone: offers 刷新列表 and words a second registration as a checked choice
PASS fog-phone: the list is not re-read or re-registered behind your back
PASS fog-phone: refreshing names the new numbered entry
PASS fog-phone: the numbered entry is marked as missing local metadata
PASS fog-phone: after it is found the cautious button goes away
PASS status down: TTS "已配置 · 合成服务这会儿暂不可用"
PASS status down: ASR row honest
PASS status off: TTS "未配置 · 这台服务没有语音配置"
PASS status off: ASR row honest
PASS status no-route: TTS "这台服务没有语音状态接口"
PASS status no-route: ASR row honest
PASS status unknown-500: TTS "状态未知 · 这次没读到语音状态"
PASS status unknown-500: ASR row honest
PASS status unknown-net: TTS "状态未知 · 这次没读到语音状态"
PASS status unknown-net: ASR row honest
PASS session without voice: "声音未说明", not the settings choice
PASS session voice "default": shown as 默认声音
PASS dropped answer: may be registered, refresh first
PASS dropped answer: refresh finds the numbered entry
PASS 503: keeps the server words and adds the refresh advice
PASS 503: refresh finds nothing new and says to wait before registering again
PASS 503: the checked retry registers once and the take is gone
PASS recording: microphone live while recording
PASS recording: stop keeps the take and releases the microphone
PASS recording: cancel releases the microphone
PASS demo: zero /api requests from settings and the conversation
90/90 passed
+1
View File
@@ -0,0 +1 @@
hel903 mock on 8901 pid 2314388
Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 865 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 386 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 855 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 853 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.0 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 877 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 868 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 880 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 387 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 397 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 403 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 856 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 852 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 861 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 375 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 385 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 392 KiB

+10
View File
@@ -0,0 +1,10 @@
> cybergril-web@0.1.0 lint
> eslint src
/home/xiaomo/multica_workspaces/hello-af23464d222e/hel-907-47adf6961f8a/workdir/CyberGril/web/src/chat/ChatPanel.tsx
252:100 warning The ref value 'fullButton.current' will likely have changed by the time this effect cleanup function runs. If this ref points to a node rendered by React, copy 'fullButton.current' to a variable inside the effect, and use that variable in the cleanup function react-hooks/exhaustive-deps
✖ 1 problem (0 errors, 1 warning)
+4
View File
@@ -0,0 +1,4 @@
> cybergril-web@0.1.0 typecheck
> tsc --noEmit
+26
View File
@@ -0,0 +1,26 @@
> cybergril-web@0.1.0 test
> vitest run
RUN v3.1.2 /home/xiaomo/multica_workspaces/hello-af23464d222e/hel-907-47adf6961f8a/workdir/CyberGril/web
✓ tests/r3memory.test.ts (5 tests) 8ms
✓ tests/review878_late_cleanup.test.ts (1 test) 8ms
✓ tests/hel903_voice_rework.test.ts (11 tests) 14ms
✓ tests/hel879_frames.test.ts (10 tests) 21ms
✓ tests/real.test.ts (3 tests) 11ms
✓ tests/inbox.test.ts (13 tests) 24ms
✓ tests/domain.test.ts (12 tests) 9ms
✓ tests/hel898_agent_left.test.ts (7 tests) 26ms
✓ tests/reading.test.ts (11 tests) 46ms
✓ tests/r2wiring.test.ts (11 tests) 27ms
✓ tests/voice.test.ts (45 tests) 76ms
✓ tests/hel900_custom_voice.test.ts (19 tests) 530ms
✓ reference audio becomes the WAV the server accepts > refuses what the server would refuse, before sending anything 481ms
Test Files 12 passed (12)
Tests 148 passed (148)
Start at 19:56:25
Duration 837ms (transform 784ms, setup 0ms, collect 1.81s, tests 800ms, environment 7ms, prepare 522ms)
@@ -0,0 +1 @@
需求结构检查通过:60项;来源和覆盖完整。仍须人工核对授权语义与实际体验。
@@ -0,0 +1 @@
需求结构检查通过:60项;来源和覆盖完整。仍须人工核对授权语义与实际体验。
@@ -0,0 +1 @@
需求结构检查通过:60项;来源和覆盖完整。仍须人工核对授权语义与实际体验。
@@ -0,0 +1 @@
需求结构检查通过:60项;来源和覆盖完整。仍须人工核对授权语义与实际体验。
Binary file not shown.

After

Width:  |  Height:  |  Size: 381 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 210 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 209 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 210 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 204 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 206 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 206 KiB

Binary file not shown.
@@ -0,0 +1,73 @@
{
"cgId": "cg-f2ec321d",
"selection": {
"voice": "cg-f2ec321d",
"label": "hel907测试声",
"updated_at": 1793189770791
},
"checks": 14,
"passed": 13,
"netEvents": [
{
"url": "https://192.168.200.12:8361/api/health",
"status": 200,
"requestId": "2325794.8",
"ts": 1793189748990
},
{
"url": "https://192.168.200.12:8361/api/companion",
"status": 200,
"requestId": "2325794.10",
"ts": 1793189749002
},
{
"url": "https://192.168.200.12:8361/api/messages?limit=200",
"status": 200,
"requestId": "2325794.11",
"ts": 1793189749004
},
{
"url": "https://192.168.200.12:8361/api/health",
"status": 200,
"requestId": "2325794.42",
"ts": 1793189750743
},
{
"url": "https://192.168.200.12:8361/api/persona",
"status": 200,
"requestId": "2325794.43",
"ts": 1793189750747
},
{
"url": "https://192.168.200.12:8361/api/voice/voices",
"status": 200,
"requestId": "2325794.44",
"ts": 1793189765809
},
{
"url": "https://192.168.200.12:8361/api/voice/voices",
"status": 200,
"requestId": "2325794.49",
"ts": 1793189767243
},
{
"url": "https://192.168.200.12:8361/api/messages?limit=50",
"status": 200,
"requestId": "2325794.52",
"ts": 1793189769032
},
{
"url": "https://192.168.200.12:8361/api/voice/preview",
"status": 200,
"requestId": "2325794.51",
"ts": 1793189770572
},
{
"url": "https://192.168.200.12:8361/api/voice/selection",
"status": 200,
"requestId": "2325794.57",
"ts": 1793189770789
}
],
"previewFile": "/tmp/multica-task-366716746/opencode/webflow/out/preview-cg-f2ec321d.wav"
}
+167
View File
@@ -0,0 +1,167 @@
# HEL-907 · 网页自定义声音与三通真实交谈测试窗口记录(2026-10-28)
> 授权:白栖知主卡 HEL-797 评论 `01a18246-672a-7a19-9e8a-69c6f547a232`(2026-10-28 11:30 UTC)
> 「同意这轮测试」,批准《HEL-797-自定义声音实测安排.md》(评论 `01a18012-c208-7586-b87e-99f342849721`
> 附件 `01a18012-c1f5-77da-b386-59af7d4c2916`)。
> 执行基准:`origin/hel-906-asr-usage-counting` @ `038f1eeae71a9f67362d4694548d7d8116e0e35f`
> (含 HEL-905 统一复审与 HEL-906 定点返工)。需求基准 v1.12/60 项;本卡无需求变更。
> 窗口(UTC):**布防 12:07:46 – 封账 12:26:18**(18 分 32 秒,首个真实出站为网页登记上传,
> 远未用满 2 小时;3 通通话用满即封账)。
## 0. 结论速览
| 项 | 结果 |
| --- | --- |
| 网页自定义声音全链(上传→cg-登记→真实TTS试听→应用) | ✅ 真网页+真面板+真TTS 完成(13/14 步通过,1 项为测试脚本自身取文件大小的笔误,证据音频有效) |
| 下一通 worker 实用音色=会话 `voice` 字段 | ✅ call1/call2 `voice=cg-f2ec321d`,TTS 实际以该音色合成(tts.log) |
| 通话中改选不换声、下一通生效 | ✅ call2 通话中改选 rain:本通 worker 状态文件钉在 cg-f2ec321d;call3 `voice=rain` 生效 |
| 文字输入打断在播语音 | ❌ **发现真实缺陷**:文字轮被取消(user 行 `cancelled`),语音继续播完(约 32 秒),文字未获回复(§5) |
| 回放打断(真实 WebRTC 路径) | ⚠️ `turn_cancel` 真实发生(FunASR 真实识别回放语音),但本轮**未取得帧级停声时延**(§6) |
| 真实用户麦克风打断时延 | ❌ 未测(无真人发声;D3 用户设备动作,§8 交接) |
| 全部上限 | ✅ 全部在上限内,零付费支出(§7) |
| 共享注册表回收/服务恢复 | ✅ cg- 条目与样音频逐条回收,9880/8090 按窗口前状态停回,端口全清(§8) |
## 1. 构建(独立复跑,本地离线)
- `npm ci`(既有锁文件,已获批):176 包。
- `typecheck` 0 错;`lint` 0 错 1 警(`web/src/chat/ChatPanel.tsx:252` react-hooks 既有警告,非本卡引入);
`vitest` **148/148**;`build` 成功(产物已用于实测部署)。
- 浏览器脚本(本机既有 Playwright Chromium 156.0.8078.4,未下载任何浏览器;为使其可运行,
以 `apt-get download`+`dpkg-deb -x` 将 Ubuntu jammy 的运行时 GUI 库解压到用户目录并
`LD_LIBRARY_PATH` 加载——未安装系统包、未动系统信任库、无 root):
- `hel900_shots.mjs` **83/83**(1 处最小脚本适配:登记 503 后的界面自 HEL-903 起进入
「可能已登记→先刷新」状态,原脚本第 142 行直接双击「登记这段声音」在新界面下必然
扑空;按现行为改为「刷新列表→确认没有,再登记」后再双击,检查意图不变。产品代码零改动)。
- `hel903_shots.mjs` **90/90**(零改动)。
- 日志与截图:`docs/rework/hel907/build/`、`docs/rework/hel907/web/`。
## 2. 部署布局(全部独立,已全部撤除)
| 组件 | 端口/路径 | 说明 |
| --- | --- | --- |
| 统一实例(同进程双入口) | HTTP 8360 + HTTPS 8361 | `serve_dual_8360_8361.py`,隔离数据 `/opt/cybergril-hel907/data/`;Python 只读复用 HEL-879 `.venv311`(requirements.lock 与 038f1ee 逐字一致) |
| WSS TLS 桥 | 8363 → 127.0.0.1:7880 | 沿用 `/opt/cybergril-voice-certs/` 既有证书 |
| 专属 worker | 健康口 8082 | `/opt/cybergril-hel907/worker/`(独立 env/状态文件/日志),ASR 账本独立 `asr-usage.jsonl` |
| 共享 TTS 9880 / 面板 8090 | — | 窗口前均为**停机**;窗口内临时按其 README 运行方式启动,结束后按快照停回 |
| 预算布防 | — | `models.yaml`:dialogue 20/total 20/60000 tokens,其余 0;`CYBERGRIL_SEMANTIC=stub`(嵌入 0);布防前 worker 以 cap=0 验证 fail-closed,12:07:46 布防 `hel907-20261028-a`(2400s/6 次重连每通) |
| 测试档案 | — | 隔离实例自建测试伴侣「小测」,未触碰任何真实档案 |
## 3. 真网页链路(真实浏览器 → HTTPS 8361 → 真实 API → 真实面板/TTS)
真浏览器(本地 Chromium,接受自签证书与人工「高级→继续」同姿态)驱动真实页面完成:
1. 设置→她的声音→上传参考音频 `female_soft.wav`(上传前 sha256 只读核对
`4a65d170…d4f687`、341192 字节,与清单一致;浏览器端真实解码转 16kHz 单声道 WAV);
2. 填写参考文字(取自 voices.json 该条目既有 prompt_text,**未用转写**,登记转写 ASR=0)
与名称「hel907测试声」→ **登记成功 `cg-f2ec321d`**(共享注册表唯一写者 8090 面板;
上传出站 1 次);
3. **真实 TTS 试听**:现场合成 24kHz/3.72s WAV,页面真实播放,响应体已存证
`web/preview-cg-f2ec321d.wav`(出站 2 次含一次脚本迭代重试,均计数);
4. **应用**:`/api/voice/selection` = `cg-f2ec321d`,界面如实显示「下一次通话生效」。
截图逐步留证(`docs/rework/hel907/web/*.png`),网络事件清单 `web/webflow-result.json`。
## 4. 三通真实通话(预录语音回放经真实 WebRTC;顺序执行、不重叠)
| 通 | 内容 | 关键结果 |
| --- | --- | --- |
| call1 | 登记后首通:两轮完整对话 + 第三轮文字打断尝试 + 挂断 | `voice=cg-f2ec321d`;两轮 `turn_end`;字幕 seq 单调;回流音频 93.1s 落盘;DELETE 200、房间真删、删后仅 2 帧在途(约 20ms) |
| call2 | 通话中经 API 改选内置 rain | 会话 `voice=cg-f2ec321d`;改选 200;**本通 worker 状态文件钉在 cg-f2ec321d**(通话窗口持有语义成立);挂断后结算 |
| call3 | 下一通生效验证 + 回放打断 | **会话 `voice=rain`**(下一通生效);回放打断产生真实 `turn_cancel`;挂断清理同 call1 |
TTS 实际音色核对:`/opt/voice-agent/cosyvoice/tts.log` 窗口内 11 段合成全部带
`voice=cg-f2ec321d`(call1/2)/ `voice=rain`(call3),与会话响应逐一对应。
## 5. 缺陷发现:文字输入打断在播语音(真实复现,含完整证据链)
**现象**(call1 第三轮,字幕/数据库/网络三层对齐):
- 她正在语音回复(`turn_start` → `assistant_interim` 持续流式中)时,文字通道
POST `/api/chat`(200);
- 她的语音**没有停止**:此后 ~32 秒音频帧连续到达(100 帧/秒不间断),旧回复播完;
- 数据库 `chat_message`:**文字轮 user 行 id=6 `status=cancelled`**,语音轮
id=5/id=8 `status='sent'` —— 用户那条文字被静默丢弃、无任何回复;
- api.log:文字 POST 之后 worker 侧又发起了第 5 次 `/api/chat`(同 turn_id 重试)。
**机制**(源码级):服务端取消机制本身方向正确(app.py:577-581 新轮 set 旧轮
cancel)。但语音轮被文字轮取消后,worker 的 SSE 流被服务端按取消收尾,适配器
`llm_chat_api.py` 将其当作连接异常,经 livekit APIConnectOptions **静默重试同一
turn_id**:重试的 chat() 取消了当时活动的**文字轮**(文字行→cancelled),随后语音轮
完整重新生成并播完。`llm_chat_api.py:90` 的 `_retry_on_chunk_sent = False` 注释称
「输出后绝不自动重试」,但该守卫从未被置真——**chips 已发出后仍会重试**,注释与实现
相反;HEL-879 观察到的「语音取消文字」竞态与本轮「重试取消文字」是同一缺陷家族的
两次不同投影。用户可感知后果:**她在说话时发文字,既不会停她的语音,文字也会消失**。
证据:`window/call1.subtitles.jsonl`(t0=1793189878442 前后)、`window/call1.json`、
`window/api.log`(第 112-129 行)、DB 快照(call1.json budget 段与上文行号)。
**本卡不修**(属语音/文字互打断核心语义,交回总管安排修复与复测)。
## 6. 打断停声时延:本轮未取得(如实)
- call3 回放打断:`turn_cancel` 由真实链路产生(FunASR 真实识别了回放语音并出
user_final,VAD/取消链路真实工作)。
- 但**帧级「旧声停止」时延未取得**,两个原因都有证据:
1. 打断源 `sunwukong.wav` 实测过轻(16kHz/13.4s,逐 50ms 窗 RMS 低于 VAD 噪声门限,
离线分析 onset 无检出)→ VAD 直至回放结束、2-pass 离线纠错 final(发布后 16.05s)
才判停,这不是真实人声的起声时延;
2. 被打断的旧轮当时**无可闻旧声**:其 LLM 流在打断前卡死(interim 重复不增长),
对回流音频逐帧能量分析(`call3.agent.wav` × `call3.frames.json` 同钟对齐)显示
cancel 前后 ±25s 内旧语音能量段缺失,cancel 后 8.9s 才出现新回复语音——没有
「正在播的旧声」可供量停。
- 同钟量测方法已备好并验证可用(客户端毫秒时钟统一记录发布帧与到达帧;
`call1.frames.json`/`call3.frames.json` 即完整时间轴),下轮配响亮短促打断源即可
直接出数。**不得把本轮数字当作 ~1 秒停声结论**。
- 真实用户麦克风方向(真人开口 T0 + 同机分轨):无真人发声,未测(§8)。
## 7. 用量账(含失败/取消口径;封账后不重开)
| 类别 | 实际用量 | 上限 |
| --- | --- | --- |
| 时窗 | 18 分 32 秒 | ≤2 小时 |
| 实际通话 | 3 通(顺序) | ≤3 |
| 建房 | 4 次(3 通 + 1 次客户端证书信任遗漏导致的连接失败空会话,已 DELETE 结清) | ≤6 |
| LLM | **8 请求 / 23,958 tokens**(含 call1 缺陷链的取消轮与重试轮) | ≤20 / ≤60000 |
| 嵌入 | 0(`semantic_backend=stub` 全程) | 0 |
| 登记上传出站 | 1 | ≤3 |
| 登记转写 ASR | 0(参考文字手填) | ≤3 |
| 试听 TTS | 2 | ≤10 |
| 通话 TTS 段 | 11(tts.log 窗口内 13 段 − 2 试听) | ≤40 |
| 连续通话 ASR | **195.16s**(保守=确证 195.16s,逐通话 95.18/41.34/58.64s + 空会话 0) | ≤2400s |
| ASR 连接重试 | 0 | ≤6/通 |
| 新增付费支出 | 0 | 0 |
## 8. 清理、恢复与回收(逐项核对)
- 8360/8361/8363/8082 全停;LiveKit 房间清空(`rooms: []`)。
- 共享 TTS 9880、面板 8090 按窗口前快照**停回停机**(精确 PID 终止,未用 fuser -k);
GPU 回 97MiB;8300/8310/8320/8350 原样运行,8340 保持停机,7880/10095 未动。
- `cg-f2ec321d` 经 8090 自有删除入口回收:删除前后面板列表与 voices.json 快照留证,
`voice_samples/cg-*.wav` 无残留;**11 支内置与全局默认零变化**(前后 JSON 比对)。
- 测试档案/账本/流水全部留在 `/opt/cybergril-hel907/`(隔离实例数据,未触碰
`/opt/cybergril-hel879` 与任何既有实例);证据包
`/opt/cybergril-hel907/hel907-evidence-20261028.tar.gz`
sha256 `37ee18818d46b7d605cb4b0fac924a401138fc17a50520d4af6cc58b6082e07e`。
- 回滚:删除 `/opt/cybergril-hel907` 即完全退场;共享注册表已按上条真实回收
(未拿 git 回退代替)。
## 9. 未测 / 承接(如实)
- **真实用户麦克风打断时延**(D3 用户动作):需真人在同一时间轴发声+听声。入口已备好:
任意局域网设备浏览器打开 `https://192.168.200.12:8361`(当前已撤防,需下轮窗口重新
部署),证书「高级→继续」两处(8361/8363)、允许麦克风,对她说话打断即可;建议动作
≤2 分钟/次。本轮不自行打开任何用户设备。
- iOS Safari/安卓 Chrome 真机路径:未测。
- 帧级停声时延:方法已验证,待响亮打断源 + 她正在可闻说话的时机(§6)。
- §5 缺陷的修复与复测:交回总管(涉及 worker 适配器重试守卫与文字/语音互打断语义,
本卡按边界不修)。
- 回复质量观察(非链路故障):call1 出现一条对「睡觉」话题的擦边回复,与测试档案
boundary 文案相关,记录备查。
## 10. 需求与检查
- 基准 v1.12/60 项;本卡零需求变更(无 GOV 记录)。
- `python3 scripts/check_requirements.py --base-ref origin/main` 与
`--base-ref 038f1ee`(含 `--handoff docs/requirements/handoff-HEL-907.json`)通过,
日志随交付评论。
- 关联要求:CG-006/009/010/013–016/018–021、AM-001、GOV-001–006、DEL-001(覆盖关系见
handoff JSON)。
+163
View File
@@ -0,0 +1,163 @@
INFO: Started server process [51550]
INFO: Started server process [51550]
INFO: Uvicorn running on http://0.0.0.0:8360 (Press CTRL+C to quit)
INFO: Uvicorn running on https://0.0.0.0:8361 (Press CTRL+C to quit)
INFO: 127.0.0.1:35146 - "GET /api/health HTTP/1.1" 200 OK
INFO: 127.0.0.1:54282 - "GET /api/health HTTP/1.1" 200 OK
INFO: 127.0.0.1:55670 - "GET /api/health HTTP/1.1" 200 OK
INFO: 127.0.0.1:55684 - "GET /api/voice/status HTTP/1.1" 200 OK
INFO: 127.0.0.1:55692 - "GET /api/voice/voices HTTP/1.1" 200 OK
INFO: 127.0.0.1:54786 - "POST /api/companion HTTP/1.1" 201 Created
INFO: 127.0.0.1:54794 - "GET /api/health HTTP/1.1" 200 OK
INFO: 192.168.200.13:37764 - "GET / HTTP/1.1" 200 OK
INFO: 192.168.200.13:37772 - "GET /assets/index-B8TdHoQm.css HTTP/1.1" 200 OK
INFO: 192.168.200.13:37764 - "GET /assets/index-ba4PURHH.js HTTP/1.1" 200 OK
INFO: 192.168.200.13:37764 - "GET /assets/her-room.jpg HTTP/1.1" 200 OK
INFO: 192.168.200.13:37772 - "GET /assets/her-talk.jpg HTTP/1.1" 200 OK
INFO: 192.168.200.13:37764 - "GET /api/health HTTP/1.1" 200 OK
INFO: 192.168.200.13:37772 - "GET /favicon.ico HTTP/1.1" 404 Not Found
INFO: 192.168.200.13:37772 - "GET /api/companion HTTP/1.1" 200 OK
INFO: 192.168.200.13:37772 - "GET /api/messages?limit=200 HTTP/1.1" 200 OK
INFO: 192.168.200.13:37772 - "GET /assets/icons.svg HTTP/1.1" 200 OK
INFO: 192.168.200.13:37788 - "GET /api/health HTTP/1.1" 200 OK
INFO: 192.168.200.13:37788 - "GET /api/persona HTTP/1.1" 200 OK
INFO: 192.168.200.13:35790 - "GET /api/messages?limit=50 HTTP/1.1" 200 OK
INFO: 192.168.200.13:36634 - "GET / HTTP/1.1" 200 OK
INFO: 192.168.200.13:36634 - "GET /assets/index-ba4PURHH.js HTTP/1.1" 200 OK
INFO: 192.168.200.13:36650 - "GET /assets/index-B8TdHoQm.css HTTP/1.1" 200 OK
INFO: 192.168.200.13:36634 - "GET /assets/her-room.jpg HTTP/1.1" 200 OK
INFO: 192.168.200.13:36650 - "GET /assets/her-talk.jpg HTTP/1.1" 200 OK
INFO: 192.168.200.13:36650 - "GET /api/health HTTP/1.1" 200 OK
INFO: 192.168.200.13:36634 - "GET /favicon.ico HTTP/1.1" 404 Not Found
INFO: 192.168.200.13:36634 - "GET /api/companion HTTP/1.1" 200 OK
INFO: 192.168.200.13:36634 - "GET /api/messages?limit=200 HTTP/1.1" 200 OK
INFO: 192.168.200.13:36634 - "GET /assets/icons.svg HTTP/1.1" 200 OK
INFO: 192.168.200.13:34282 - "GET / HTTP/1.1" 200 OK
INFO: 192.168.200.13:34282 - "GET /assets/index-ba4PURHH.js HTTP/1.1" 200 OK
INFO: 192.168.200.13:34296 - "GET /assets/index-B8TdHoQm.css HTTP/1.1" 200 OK
INFO: 192.168.200.13:34296 - "GET /assets/her-talk.jpg HTTP/1.1" 200 OK
INFO: 192.168.200.13:34282 - "GET /assets/her-room.jpg HTTP/1.1" 200 OK
INFO: 192.168.200.13:34296 - "GET /favicon.ico HTTP/1.1" 404 Not Found
INFO: 192.168.200.13:34282 - "GET /api/health HTTP/1.1" 200 OK
INFO: 192.168.200.13:34282 - "GET /api/companion HTTP/1.1" 200 OK
INFO: 192.168.200.13:34282 - "GET /api/messages?limit=200 HTTP/1.1" 200 OK
INFO: 192.168.200.13:34282 - "GET /assets/icons.svg HTTP/1.1" 200 OK
INFO: 192.168.200.13:52250 - "GET /api/health HTTP/1.1" 200 OK
INFO: 192.168.200.13:52250 - "GET /api/persona HTTP/1.1" 200 OK
INFO: 192.168.200.13:34538 - "GET /api/voice/voices HTTP/1.1" 200 OK
INFO: 192.168.200.13:39392 - "GET / HTTP/1.1" 200 OK
INFO: 192.168.200.13:39392 - "GET /assets/index-ba4PURHH.js HTTP/1.1" 200 OK
INFO: 192.168.200.13:39396 - "GET /assets/index-B8TdHoQm.css HTTP/1.1" 200 OK
INFO: 192.168.200.13:39392 - "GET /assets/her-room.jpg HTTP/1.1" 200 OK
INFO: 192.168.200.13:39396 - "GET /assets/her-talk.jpg HTTP/1.1" 200 OK
INFO: 192.168.200.13:39392 - "GET /api/health HTTP/1.1" 200 OK
INFO: 192.168.200.13:39396 - "GET /favicon.ico HTTP/1.1" 404 Not Found
INFO: 192.168.200.13:39396 - "GET /api/companion HTTP/1.1" 200 OK
INFO: 192.168.200.13:39396 - "GET /api/messages?limit=200 HTTP/1.1" 200 OK
INFO: 192.168.200.13:39396 - "GET /assets/icons.svg HTTP/1.1" 200 OK
INFO: 192.168.200.13:39402 - "GET /api/health HTTP/1.1" 200 OK
INFO: 192.168.200.13:39402 - "GET /api/persona HTTP/1.1" 200 OK
INFO: 192.168.200.13:39268 - "GET /api/voice/voices HTTP/1.1" 200 OK
INFO: 192.168.200.13:39268 - "POST /api/voice/voices?label=hel907%E6%B5%8B%E8%AF%95%E5%A3%B0&prompt_text=%E8%BF%99%E7%82%B9%E6%88%91%E8%AF%B4%E4%B8%80%E4%B8%8B%EF%BC%8C%E5%B0%B1%E6%98%AF%E5%9B%A0%E4%B8%BA%E9%82%A3%E4%B8%AA%E5%B0%B1%E6%98%AF%E6%91%A9%E6%A0%B9%E8%B1%AA%E6%B3%BD%E5%B0%94%E8%BF%99%E6%9C%AC%E5%84%BF%E9%87%91%E9%92%B1%E5%BF%83%E7%90%86%E5%AD%A6%E3%80%82%E5%85%B6%E5%AE%9E%E5%9C%A8%E6%88%91%E4%BB%AC%E8%BF%99%E8%A1%8C%E4%B8%9A%E9%87%8C%E4%B9%9F%E7%AE%97%E4%B8%80%E6%9C%AC%E5%BE%88%E6%9C%89%E5%90%8D%E5%90%8D%E7%9A%84%E4%B9%A6%E4%BA%86%E3%80%82%E5%B0%B1%E6%88%91%E4%B9%8B%E5%89%8D%E4%B9%9F%E8%AF%BB%E8%BF%87%E3%80%82%E7%84%B6%E5%90%8E%E4%BD%A0%E8%AF%B4%E5%88%B0%E8%BF%99%E7%82%B9%E5%95%8A%EF%BC%8C%E8%AE%A9%E6%88%91%E6%83%B3%E8%B5%B7%E6%9D%A5%E4%BB%96%E8%BF%99%E6%9C%AC%E4%B9%A6%E9%87%8C%E8%BF%98%E6%8C%BA%E3%80%82&allow_asr=false HTTP/1.1" 201 Created
INFO: 192.168.200.13:39268 - "GET /api/voice/voices HTTP/1.1" 200 OK
INFO: 192.168.200.13:39268 - "GET /api/messages?limit=50 HTTP/1.1" 200 OK
INFO: 192.168.200.13:34666 - "GET /api/messages?limit=50 HTTP/1.1" 200 OK
INFO: 192.168.200.13:50186 - "GET /api/messages?limit=50 HTTP/1.1" 200 OK
INFO: 192.168.200.13:49688 - "GET /api/messages?limit=50 HTTP/1.1" 200 OK
INFO: 192.168.200.13:49678 - "POST /api/voice/preview HTTP/1.1" 200 OK
INFO: 192.168.200.13:49678 - "GET /favicon.ico HTTP/1.1" 404 Not Found
INFO: 192.168.200.13:56190 - "GET / HTTP/1.1" 200 OK
INFO: 192.168.200.13:56196 - "GET /assets/index-B8TdHoQm.css HTTP/1.1" 200 OK
INFO: 192.168.200.13:56190 - "GET /assets/index-ba4PURHH.js HTTP/1.1" 200 OK
INFO: 192.168.200.13:56190 - "GET /assets/her-room.jpg HTTP/1.1" 200 OK
INFO: 192.168.200.13:56196 - "GET /assets/her-talk.jpg HTTP/1.1" 200 OK
INFO: 192.168.200.13:56190 - "GET /api/health HTTP/1.1" 200 OK
INFO: 192.168.200.13:56196 - "GET /favicon.ico HTTP/1.1" 404 Not Found
INFO: 192.168.200.13:56196 - "GET /api/companion HTTP/1.1" 200 OK
INFO: 192.168.200.13:56196 - "GET /api/messages?limit=200 HTTP/1.1" 200 OK
INFO: 192.168.200.13:56196 - "GET /assets/icons.svg HTTP/1.1" 200 OK
INFO: 192.168.200.13:56198 - "GET /api/health HTTP/1.1" 200 OK
INFO: 192.168.200.13:56198 - "GET /api/persona HTTP/1.1" 200 OK
INFO: 192.168.200.13:42546 - "GET /api/voice/voices HTTP/1.1" 200 OK
INFO: 192.168.200.13:42546 - "GET /api/voice/voices HTTP/1.1" 200 OK
INFO: 192.168.200.13:42546 - "GET /api/messages?limit=50 HTTP/1.1" 200 OK
INFO: 192.168.200.13:40396 - "GET /api/messages?limit=50 HTTP/1.1" 200 OK
INFO: 192.168.200.13:55742 - "GET /api/messages?limit=50 HTTP/1.1" 200 OK
INFO: 192.168.200.13:52300 - "GET /api/messages?limit=50 HTTP/1.1" 200 OK
INFO: 192.168.200.13:53190 - "GET /api/messages?limit=50 HTTP/1.1" 200 OK
INFO: 192.168.200.13:41864 - "GET /api/voice/selection HTTP/1.1" 200 OK
INFO: 192.168.200.13:48644 - "GET / HTTP/1.1" 200 OK
INFO: 192.168.200.13:48652 - "GET /assets/index-B8TdHoQm.css HTTP/1.1" 200 OK
INFO: 192.168.200.13:48644 - "GET /assets/index-ba4PURHH.js HTTP/1.1" 200 OK
INFO: 192.168.200.13:48652 - "GET /assets/her-talk.jpg HTTP/1.1" 200 OK
INFO: 192.168.200.13:48644 - "GET /assets/her-room.jpg HTTP/1.1" 200 OK
INFO: 192.168.200.13:48652 - "GET /favicon.ico HTTP/1.1" 404 Not Found
INFO: 192.168.200.13:48644 - "GET /api/health HTTP/1.1" 200 OK
INFO: 192.168.200.13:48644 - "GET /api/companion HTTP/1.1" 200 OK
INFO: 192.168.200.13:48644 - "GET /api/messages?limit=200 HTTP/1.1" 200 OK
INFO: 192.168.200.13:48644 - "GET /assets/icons.svg HTTP/1.1" 200 OK
INFO: 192.168.200.13:53266 - "GET /api/health HTTP/1.1" 200 OK
INFO: 192.168.200.13:53266 - "GET /api/persona HTTP/1.1" 200 OK
INFO: 192.168.200.13:35132 - "GET /api/voice/voices HTTP/1.1" 200 OK
INFO: 192.168.200.13:35132 - "GET /api/voice/voices HTTP/1.1" 200 OK
INFO: 192.168.200.13:35136 - "GET /api/messages?limit=50 HTTP/1.1" 200 OK
INFO: 192.168.200.13:35132 - "POST /api/voice/preview HTTP/1.1" 200 OK
INFO: 192.168.200.13:35132 - "GET /favicon.ico HTTP/1.1" 404 Not Found
INFO: 192.168.200.13:35132 - "POST /api/voice/selection HTTP/1.1" 200 OK
INFO: 192.168.200.13:59128 - "GET /api/voice/selection HTTP/1.1" 200 OK
INFO: 127.0.0.1:59706 - "POST /api/voice/session HTTP/1.1" 201 Created
INFO: 127.0.0.1:34604 - "DELETE /api/voice/session/8GoWvxeEizUDyuqJJrcf0MFl HTTP/1.1" 200 OK
INFO: 127.0.0.1:53630 - "POST /api/voice/session HTTP/1.1" 201 Created
INFO: 127.0.0.1:55398 - "GET /api/health HTTP/1.1" 200 OK
INFO: 127.0.0.1:55398 - "POST /api/chat HTTP/1.1" 200 OK
memory compression failed: memory_id=2
INFO: 127.0.0.1:36786 - "GET /api/health HTTP/1.1" 200 OK
INFO: 127.0.0.1:36786 - "POST /api/chat/received HTTP/1.1" 200 OK
INFO: 127.0.0.1:35066 - "GET /api/health HTTP/1.1" 200 OK
INFO: 127.0.0.1:35066 - "POST /api/chat HTTP/1.1" 200 OK
INFO: 127.0.0.1:38996 - "GET /api/health HTTP/1.1" 200 OK
INFO: 127.0.0.1:38996 - "POST /api/chat/received HTTP/1.1" 200 OK
memory compression failed: memory_id=2
INFO: 127.0.0.1:38996 - "GET /api/health HTTP/1.1" 200 OK
INFO: 127.0.0.1:38996 - "POST /api/chat HTTP/1.1" 200 OK
INFO: 127.0.0.1:39004 - "GET /api/health HTTP/1.1" 200 OK
INFO: 127.0.0.1:39008 - "POST /api/chat HTTP/1.1" 200 OK
INFO: 127.0.0.1:38996 - "GET /api/health HTTP/1.1" 200 OK
INFO: 127.0.0.1:38996 - "POST /api/chat HTTP/1.1" 200 OK
memory compression failed: memory_id=2
INFO: 127.0.0.1:48932 - "GET /api/health HTTP/1.1" 200 OK
INFO: 127.0.0.1:48932 - "POST /api/chat/received HTTP/1.1" 200 OK
INFO: 127.0.0.1:48938 - "DELETE /api/voice/session/8z_mtXElLBoxPfHd8G0rPZjt HTTP/1.1" 200 OK
memory compression failed: memory_id=1
memory compression failed: memory_id=1
memory compression failed: memory_id=1
memory compression failed: memory_id=4
memory compression failed: memory_id=4
memory compression failed: memory_id=4
INFO: 127.0.0.1:37118 - "POST /api/voice/session HTTP/1.1" 201 Created
INFO: 127.0.0.1:42646 - "GET /api/health HTTP/1.1" 200 OK
INFO: 127.0.0.1:42646 - "POST /api/chat HTTP/1.1" 200 OK
memory compression failed: memory_id=3
INFO: 127.0.0.1:44680 - "GET /api/health HTTP/1.1" 200 OK
INFO: 127.0.0.1:44680 - "POST /api/chat/received HTTP/1.1" 200 OK
INFO: 127.0.0.1:44690 - "POST /api/voice/selection HTTP/1.1" 200 OK
INFO: 127.0.0.1:44690 - "DELETE /api/voice/session/FnM8-yTH5keAHRRJiS-EJBwp HTTP/1.1" 200 OK
memory compression failed: memory_id=3
INFO: 127.0.0.1:48662 - "POST /api/voice/session HTTP/1.1" 201 Created
INFO: 127.0.0.1:60228 - "GET /api/health HTTP/1.1" 200 OK
INFO: 127.0.0.1:60228 - "POST /api/chat HTTP/1.1" 200 OK
memory compression failed: memory_id=3
INFO: 127.0.0.1:37716 - "GET /api/health HTTP/1.1" 200 OK
INFO: 127.0.0.1:37716 - "POST /api/chat HTTP/1.1" 200 OK
memory compression failed: memory_id=6
INFO: 127.0.0.1:58382 - "DELETE /api/voice/session/Wnv2wpdoE6wpBN59NDJ1d8yo HTTP/1.1" 200 OK
memory compression failed: memory_id=6
memory compression failed: memory_id=6
memory compression failed: memory_id=5
memory compression failed: memory_id=5
memory compression failed: memory_id=5
memory compression failed: memory_id=8
INFO: Shutting down
INFO: Finished server process [51550]
INFO: Shutting down
INFO: Finished server process [51550]
@@ -0,0 +1,50 @@
{
"records": 51,
"parse_errors": 0,
"windows": {
"hel907-20261028-a": {
"audio_seconds": 195.161381,
"confirmed_audio_seconds": 195.161381,
"stopped": false,
"stop_reason": "",
"calls": {
"cg-voice-7pqdbsmq99": {
"streams": 1,
"connect_attempts": 0,
"connect_failures": 0,
"connect_retries": 0,
"audio_seconds": 0.0,
"confirmed_audio_seconds": 0.0,
"retry_pending": true
},
"cg-voice-1mrb1jwl35": {
"streams": 1,
"connect_attempts": 1,
"connect_failures": 0,
"connect_retries": 0,
"audio_seconds": 95.183847,
"confirmed_audio_seconds": 95.183847,
"retry_pending": true
},
"cg-voice-h9ncn972c6": {
"streams": 1,
"connect_attempts": 1,
"connect_failures": 0,
"connect_retries": 0,
"audio_seconds": 41.337176,
"confirmed_audio_seconds": 41.337176,
"retry_pending": true
},
"cg-voice-nr7g2y5nd6": {
"streams": 1,
"connect_attempts": 1,
"connect_failures": 0,
"connect_retries": 0,
"audio_seconds": 58.640358,
"confirmed_audio_seconds": 58.640358,
"retry_pending": true
}
}
}
}
}
+51
View File
@@ -0,0 +1,51 @@
{"kind":"call_start","call":"cg-voice-7pqdbsmq99","stream_seq":1,"window":"hel907-20261028-a","t":1793189792.659}
{"kind":"call_end","call":"cg-voice-7pqdbsmq99","reason":"error","audio_seconds":0.0,"confirmed_audio_seconds":0.0,"connect_attempts":0,"connect_failures":0,"connect_retries":0,"window":"hel907-20261028-a","t":1793189813.289}
{"kind":"call_start","call":"cg-voice-1mrb1jwl35","stream_seq":1,"window":"hel907-20261028-a","t":1793189817.273}
{"kind":"connect_attempt","call":"cg-voice-1mrb1jwl35","seq":1,"ok":true,"retry":false,"error":"","window":"hel907-20261028-a","t":1793189817.354}
{"kind":"audio","call":"cg-voice-1mrb1jwl35","seconds":5.023499,"confirmed_seconds":4.990686,"frames":101,"bytes":160752,"sample_rate":16000,"window":"hel907-20261028-a","t":1793189822.323}
{"kind":"audio","call":"cg-voice-1mrb1jwl35","seconds":5.056373,"confirmed_seconds":5.023499,"frames":101,"bytes":161804,"sample_rate":16000,"window":"hel907-20261028-a","t":1793189827.373}
{"kind":"audio","call":"cg-voice-1mrb1jwl35","seconds":5.056311,"confirmed_seconds":5.056311,"frames":101,"bytes":161802,"sample_rate":16000,"window":"hel907-20261028-a","t":1793189832.422}
{"kind":"audio","call":"cg-voice-1mrb1jwl35","seconds":5.056311,"confirmed_seconds":5.056373,"frames":101,"bytes":161802,"sample_rate":16000,"window":"hel907-20261028-a","t":1793189837.472}
{"kind":"audio","call":"cg-voice-1mrb1jwl35","seconds":5.023499,"confirmed_seconds":5.056311,"frames":101,"bytes":160752,"sample_rate":16000,"window":"hel907-20261028-a","t":1793189842.523}
{"kind":"audio","call":"cg-voice-1mrb1jwl35","seconds":5.023498,"confirmed_seconds":4.990686,"frames":100,"bytes":160752,"sample_rate":16000,"window":"hel907-20261028-a","t":1793189847.523}
{"kind":"audio","call":"cg-voice-1mrb1jwl35","seconds":5.023499,"confirmed_seconds":5.056311,"frames":101,"bytes":160752,"sample_rate":16000,"window":"hel907-20261028-a","t":1793189852.573}
{"kind":"audio","call":"cg-voice-1mrb1jwl35","seconds":5.023498,"confirmed_seconds":4.990686,"frames":100,"bytes":160752,"sample_rate":16000,"window":"hel907-20261028-a","t":1793189857.573}
{"kind":"audio","call":"cg-voice-1mrb1jwl35","seconds":5.056373,"confirmed_seconds":5.056311,"frames":101,"bytes":161804,"sample_rate":16000,"window":"hel907-20261028-a","t":1793189862.621}
{"kind":"audio","call":"cg-voice-1mrb1jwl35","seconds":5.023499,"confirmed_seconds":5.056311,"frames":101,"bytes":160752,"sample_rate":16000,"window":"hel907-20261028-a","t":1793189867.673}
{"kind":"audio","call":"cg-voice-1mrb1jwl35","seconds":5.023498,"confirmed_seconds":4.990686,"frames":100,"bytes":160752,"sample_rate":16000,"window":"hel907-20261028-a","t":1793189872.672}
{"kind":"audio","call":"cg-voice-1mrb1jwl35","seconds":5.023499,"confirmed_seconds":5.056311,"frames":101,"bytes":160752,"sample_rate":16000,"window":"hel907-20261028-a","t":1793189877.722}
{"kind":"audio","call":"cg-voice-1mrb1jwl35","seconds":5.023498,"confirmed_seconds":4.990686,"frames":100,"bytes":160752,"sample_rate":16000,"window":"hel907-20261028-a","t":1793189882.722}
{"kind":"audio","call":"cg-voice-1mrb1jwl35","seconds":5.056311,"confirmed_seconds":5.056311,"frames":101,"bytes":161802,"sample_rate":16000,"window":"hel907-20261028-a","t":1793189887.772}
{"kind":"audio","call":"cg-voice-1mrb1jwl35","seconds":5.023499,"confirmed_seconds":5.056373,"frames":101,"bytes":160752,"sample_rate":16000,"window":"hel907-20261028-a","t":1793189892.822}
{"kind":"audio","call":"cg-voice-1mrb1jwl35","seconds":5.023498,"confirmed_seconds":4.990624,"frames":100,"bytes":160752,"sample_rate":16000,"window":"hel907-20261028-a","t":1793189897.822}
{"kind":"audio","call":"cg-voice-1mrb1jwl35","seconds":5.023499,"confirmed_seconds":5.056373,"frames":101,"bytes":160752,"sample_rate":16000,"window":"hel907-20261028-a","t":1793189902.872}
{"kind":"audio","call":"cg-voice-1mrb1jwl35","seconds":5.023498,"confirmed_seconds":4.990624,"frames":100,"bytes":160752,"sample_rate":16000,"window":"hel907-20261028-a","t":1793189907.873}
{"kind":"audio","call":"cg-voice-1mrb1jwl35","seconds":4.596687,"confirmed_seconds":4.662374,"frames":62,"bytes":147094,"sample_rate":16000,"window":"hel907-20261028-a","t":1793189912.488}
{"kind":"call_end","call":"cg-voice-1mrb1jwl35","reason":"error","audio_seconds":95.183847,"confirmed_audio_seconds":95.183847,"connect_attempts":1,"connect_failures":0,"connect_retries":0,"window":"hel907-20261028-a","t":1793189912.488}
{"kind":"call_start","call":"cg-voice-h9ncn972c6","stream_seq":1,"window":"hel907-20261028-a","t":1793190088.943}
{"kind":"connect_attempt","call":"cg-voice-h9ncn972c6","seq":1,"ok":true,"retry":false,"error":"","window":"hel907-20261028-a","t":1793190089.007}
{"kind":"audio","call":"cg-voice-h9ncn972c6","seconds":5.023499,"confirmed_seconds":4.990686,"frames":101,"bytes":160752,"sample_rate":16000,"window":"hel907-20261028-a","t":1793190093.993}
{"kind":"audio","call":"cg-voice-h9ncn972c6","seconds":5.056373,"confirmed_seconds":5.023499,"frames":101,"bytes":161804,"sample_rate":16000,"window":"hel907-20261028-a","t":1793190099.044}
{"kind":"audio","call":"cg-voice-h9ncn972c6","seconds":5.056311,"confirmed_seconds":5.056311,"frames":101,"bytes":161802,"sample_rate":16000,"window":"hel907-20261028-a","t":1793190104.094}
{"kind":"audio","call":"cg-voice-h9ncn972c6","seconds":5.056311,"confirmed_seconds":5.056373,"frames":101,"bytes":161802,"sample_rate":16000,"window":"hel907-20261028-a","t":1793190109.144}
{"kind":"audio","call":"cg-voice-h9ncn972c6","seconds":5.023499,"confirmed_seconds":5.056311,"frames":101,"bytes":160752,"sample_rate":16000,"window":"hel907-20261028-a","t":1793190114.193}
{"kind":"audio","call":"cg-voice-h9ncn972c6","seconds":5.023498,"confirmed_seconds":4.990686,"frames":100,"bytes":160752,"sample_rate":16000,"window":"hel907-20261028-a","t":1793190119.195}
{"kind":"audio","call":"cg-voice-h9ncn972c6","seconds":5.023499,"confirmed_seconds":5.056311,"frames":101,"bytes":160752,"sample_rate":16000,"window":"hel907-20261028-a","t":1793190124.244}
{"kind":"audio","call":"cg-voice-h9ncn972c6","seconds":5.056373,"confirmed_seconds":4.892186,"frames":86,"bytes":161804,"sample_rate":16000,"window":"hel907-20261028-a","t":1793190128.309}
{"kind":"audio","call":"cg-voice-h9ncn972c6","seconds":1.017813,"confirmed_seconds":1.214813,"frames":5,"bytes":32570,"sample_rate":16000,"window":"hel907-20261028-a","t":1793190130.308}
{"kind":"call_end","call":"cg-voice-h9ncn972c6","reason":"error","audio_seconds":41.337176,"confirmed_audio_seconds":41.337176,"connect_attempts":1,"connect_failures":0,"connect_retries":0,"window":"hel907-20261028-a","t":1793190130.309}
{"kind":"call_start","call":"cg-voice-nr7g2y5nd6","stream_seq":1,"window":"hel907-20261028-a","t":1793190148.354}
{"kind":"connect_attempt","call":"cg-voice-nr7g2y5nd6","seq":1,"ok":true,"retry":false,"error":"","window":"hel907-20261028-a","t":1793190148.438}
{"kind":"audio","call":"cg-voice-nr7g2y5nd6","seconds":5.023499,"confirmed_seconds":4.990686,"frames":101,"bytes":160752,"sample_rate":16000,"window":"hel907-20261028-a","t":1793190153.404}
{"kind":"audio","call":"cg-voice-nr7g2y5nd6","seconds":5.056373,"confirmed_seconds":5.023499,"frames":101,"bytes":161804,"sample_rate":16000,"window":"hel907-20261028-a","t":1793190158.456}
{"kind":"audio","call":"cg-voice-nr7g2y5nd6","seconds":5.056311,"confirmed_seconds":5.056311,"frames":101,"bytes":161802,"sample_rate":16000,"window":"hel907-20261028-a","t":1793190163.504}
{"kind":"audio","call":"cg-voice-nr7g2y5nd6","seconds":5.056311,"confirmed_seconds":5.056373,"frames":101,"bytes":161802,"sample_rate":16000,"window":"hel907-20261028-a","t":1793190168.555}
{"kind":"audio","call":"cg-voice-nr7g2y5nd6","seconds":5.023499,"confirmed_seconds":5.056311,"frames":101,"bytes":160752,"sample_rate":16000,"window":"hel907-20261028-a","t":1793190173.604}
{"kind":"audio","call":"cg-voice-nr7g2y5nd6","seconds":5.023498,"confirmed_seconds":4.990686,"frames":100,"bytes":160752,"sample_rate":16000,"window":"hel907-20261028-a","t":1793190178.604}
{"kind":"audio","call":"cg-voice-nr7g2y5nd6","seconds":5.023499,"confirmed_seconds":5.056311,"frames":101,"bytes":160752,"sample_rate":16000,"window":"hel907-20261028-a","t":1793190183.654}
{"kind":"audio","call":"cg-voice-nr7g2y5nd6","seconds":5.023498,"confirmed_seconds":4.990686,"frames":100,"bytes":160752,"sample_rate":16000,"window":"hel907-20261028-a","t":1793190188.654}
{"kind":"audio","call":"cg-voice-nr7g2y5nd6","seconds":5.056373,"confirmed_seconds":5.056311,"frames":101,"bytes":161804,"sample_rate":16000,"window":"hel907-20261028-a","t":1793190193.703}
{"kind":"audio","call":"cg-voice-nr7g2y5nd6","seconds":5.023499,"confirmed_seconds":5.056311,"frames":101,"bytes":160752,"sample_rate":16000,"window":"hel907-20261028-a","t":1793190198.755}
{"kind":"audio","call":"cg-voice-nr7g2y5nd6","seconds":5.023498,"confirmed_seconds":4.990686,"frames":100,"bytes":160752,"sample_rate":16000,"window":"hel907-20261028-a","t":1793190203.754}
{"kind":"audio","call":"cg-voice-nr7g2y5nd6","seconds":3.2505,"confirmed_seconds":3.316187,"frames":26,"bytes":104016,"sample_rate":16000,"window":"hel907-20261028-a","t":1793190206.549}
{"kind":"call_end","call":"cg-voice-nr7g2y5nd6","reason":"error","audio_seconds":58.640358,"confirmed_audio_seconds":58.640358,"connect_attempts":1,"connect_failures":0,"connect_retries":0,"window":"hel907-20261028-a","t":1793190206.549}
+1
View File
@@ -0,0 +1 @@
wss-bridge(PROPOSAL) tls ('0.0.0.0', 8363) -> 127.0.0.1:7880
Binary file not shown.
File diff suppressed because one or more lines are too long
+97
View File
@@ -0,0 +1,97 @@
{
"rounds": [
{
"play_label": "haimianbaobao",
"reply": {
"kind": "turn_end",
"speech_id": "speech_f0b3160be81e",
"reason": null
}
},
{
"play_label": "nezha",
"reply": {
"kind": "turn_end",
"speech_id": "speech_9ae41249c69d",
"reason": null
}
}
],
"text_interrupt": {
"outcome": "no-cancel",
"t0_text_post_ms": 1793189878442,
"cancel_ms": null,
"cancel_latency_s": null,
"old_audio_last_frame_ms": 1793189910457,
"old_audio_stop_latency_s": 32.015,
"frames_t0_plus1": 3202,
"text_http_status": 200
},
"hangup": {
"delete_status": 200,
"delete_body": {
"ended": true,
"room": "cg-voice-1mrb1jwl35"
},
"delete_ms": 1793189910465,
"agent_frames_after_delete": 2,
"room_removed": true
},
"call": {
"tag": "call1",
"session": {
"url": "wss://192.168.200.12:8363",
"token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ2aWRlbyI6eyJyb29tSm9pbiI6dHJ1ZSwicm9vbSI6ImNnLXZvaWNlLTFtcmIxandsMzUiLCJjYW5QdWJsaXNoIjp0cnVlLCJjYW5TdWJzY3JpYmUiOnRydWUsImNhblB1Ymxpc2hEYXRhIjp0cnVlfSwic3ViIjoidXNlci1jcXl3d3locSIsImlzcyI6ImRldmtleSIsIm5iZiI6MTc5MzE4OTgxNiwiZXhwIjoxNzkzMTkwMTE2LCJuYW1lIjoi55So5oi3In0.EoUQIq34zCLMpvEN2Ahb0WFxfxls-o-xa4B8GTyBjrY",
"room": "cg-voice-1mrb1jwl35",
"session_id": "8z_mtXElLBoxPfHd8G0rPZjt",
"agent_name": "cybergril-voice-agent",
"epoch": 1,
"expires_at": 1793190716678,
"voice": "cg-f2ec321d"
},
"session_voice": "cg-f2ec321d",
"subtitle_count": 189,
"seq_monotonic": true,
"agent_frames": 9313,
"agent_audio_seconds": 93.1,
"agent_audio_rate": 48000,
"agent_joined_ms": 1793189817292,
"agent_left_ms": null,
"subtitles_file": "/opt/cybergril-hel907/evidence/call1.subtitles.jsonl",
"frames_file": "/opt/cybergril-hel907/evidence/call1.frames.json",
"agent_audio_file": "/opt/cybergril-hel907/evidence/call1.agent.wav"
},
"budget_after": {
"at_ms": 1793189913005,
"token_usage": [
{
"day": "2026-10-28",
"scene": "dialogue_main",
"used": 14297
}
],
"request_usage": [
{
"day": "2026-10-28",
"category": "dialogue",
"requests": 5
}
],
"budget_total": [
{
"key": "total_requests",
"value": 5
},
{
"key": "total_tokens",
"value": 14297
}
]
},
"worker_state_after": {
"exists": true,
"content": {
"voice": "cg-f2ec321d"
}
}
}

Some files were not shown because too many files have changed in this diff Show More