以下代號只用來保留歷輪測試追溯,不代表本次 KWS cycle 新增的驗收條件。
| ID | 所屬 cycle/意義 |
|---|---|
| A1 | 2026-07-29 排程:沒有前次延遲時使用 initial_interval。 |
| A2 | 2026-07-29 排程:間隔為延遲 × margin,設地板但不設上限。 |
| A3 | 2026-07-29 排程:margin 必須大於 1。 |
| A4 | 2026-07-29 排程:最小間隔必須大於 0。 |
| A5 | 2026-07-29 排程:初始間隔必須大於 0。 |
| A6 | 2026-07-29 排程:環境變數可覆寫 YAML margin。 |
| 名詞/ID | 意義與本報告用途 |
|---|---|
| KWS / STT / ASR | KWS 是喚醒詞偵測;本版用 STT(語音轉文字,也稱 ASR)的 final transcript 做文字比對,尚無聲學 KWS。 |
| Active / Standby / manual | Active/Standby 是共用喚醒狀態;manual 是略過 match_wake 的 method,不等於 Standby。 |
| VAD / segment / turn | VAD 偵測語音起訖;一段 VAD 音訊是 segment,一次送交下游的對話輸入是 turn,可包含多段 segment。VAD stop 不一定結束 turn。 |
| EOT / TurnSense | EOT 是 turn 結束判定;TurnSense 提供語尾評分,KittSttService 選出 TurnOutcome,由 EotController 執行 WAIT/COMMIT/CANCEL。 |
| HR / ITN / s2t | HR 是同音替換,配置於 recognizer;ITN 將口語數字正規化,包含 OpenCC s2t(簡轉繁)。interim 只做 s2t,final 做完整 ITN。 |
| SW_id / PRD F_id / UX | SW_id 是 SW 規格的穩定需求編號;PRD F_id 是產品功能分組;UX 條款補充互動要求。附錄 B 行為欄描述要求,結果欄描述驗證,兩者不等同。 |
| fbank / LFR / CMVN | 聲學前處理的濾波器組特徵/低幀率堆疊/均值變異數正規化。stream 沿用的是特徵,不是沿用 interim 文字。 |
| RTF / CER / WER | 處理時間與音訊時長之比/字元錯誤率/詞錯誤率。累積測試含效能與辨識檢查,但本報告不把舊量測當作 rebase 後的效能比較。 |
| SNR / FP32 / bf16 | 訊噪比與浮點精度格式。出現在累積訓練/模型測試;本次 live 使用 CUDA、FP32,不代表其他格式已做 live 驗證。 |
| TensorRT / execution provider / sm89 | 模型執行後端與 GPU 架構;RTX 4090 為 sm89,TensorRT engine 受 GPU/版本相容性限制。model.provider 與 kws.method.name 是不同設定。 |
| MatMulInteger / MatMulNBits / QDQ | 量化矩陣乘法算子與量化/反量化節點;累積測試保留部署相容性檢查,不代表本次執行量化模型。 |
| 歷史驗收 ID | 附錄 B 的 A1–A6 是 2026-07-29 排程驗收;B1/B2 是 interim/final ITN 拆分;B14-R1、B14-R2、B19-R1、B19-R2、B19-R3 是既有併發測試子項,不是本次 KWS 的新需求。 |
設計與施工依據:
2026-09-02-switchable-wake-provider-design.md、
2026-09-02-switchable-wake-provider.md。
kws.method.stt_cfgs 目前只接受空設定物件 {}。
kws.method.name | Runtime 行為 |
|---|---|
stt(預設) | 執行 match_wake;命中時執行 strip_wake_prefix |
manual | 跳過 match_wake 與 strip_wake_prefix;保留 Web UI/LM control、match_bypass、exit word、state、timeout 與 EOT |
kws.method.name 只決定是否呼叫 match_wake;兩條路徑之後使用相同的 final processing。InterruptionFrame(agent_active) 與 InterruptionFrame(agent_standby) 是獨立輸入,見附錄 A · Frame I/O 契約。KWSStreamManager。目前沒有關閉 wake arbitration 的 config 或 ordinary STT/EOT 分支。KWSMethod.STT:WakeBypassMatcher.match_wake 比對 final transcript;命中時由 strip_wake_prefix 移除句首 wake word。KWSMethod.MANUAL:跳過 match_wake 與 strip_wake_prefix,由 Web UI/LM control 切換 Active/Standby。match_bypass、exit-word handling、_should_emit_final 與 EotController.apply。2026-09-05 · 基底 main@4ee1821;live 使用 RTX 4090 x86/CUDA 隔離容器。完整命令與紀錄
| PRD Feature | SW_id | Behaviour | Executable evidence | Result |
|---|---|---|---|---|
| STT_EXTRA | SW-W-19 | stt / manual 切換是否執行 match_wake | test_kws_method_policy.py · test_kws_method_manual.py | ✓ PASS |
| STT_EXTRA | SW-B-12 | manual 跳過 match_wake;保留 final 路徑的 match_bypass(已驗證 exact/prefix) | test_kws_method_policy.py · test_kws_method_manual.py | 部分覆蓋 |
| STT_EXTRA | SW-UI-07 | Web UI/LM Active/Standby control 對兩種 method 共用 | test_kws_method_policy.py · test_btn_control.py | ✓ PASS |
| STT_EXTRA | SW-CFG-03 | kws.method.name 只接受 stt / manual;舊設定鍵會回報 validation error | test_kws_method_config.py · test_status_page_settings.py | ✓ PASS |
| 驗證範圍 | 結果 |
|---|---|
| Targeted offline | 48 passed |
| Offline full | 906 passed, 8 failed, 1 skipped |
| Default STT live | 56 passed, 28 failed, 4 skipped · 57m56s |
| Manual live | 4 passed · 17.26s |
| 490ms 單項重測 | 1 failed · 7.02s · 已包含在全套 28 個失敗中,不重複計數 |
| Static | 範圍內 0 errors;全樹 Ruff 29 項,與 main 相同 |
失敗歸因:offline 的 8 個失敗均在乾淨 main 重現,位於 test_ai_agent_ux_spec.py,涉及退出詞、500ms 等待與拒識門檻。未重跑乾淨 main live,不能將 28 個 live 失敗一律判為既有問題或 rebase 迴歸。STT live 的 4 個 skipped 是 manual 專用測試,已另跑。
490ms 斷句:FAIL,暫不修復。預期 1 個 final,實際 2 個;查看重測與歷史證據。
逐項結果集中於測試證據(含 88 個 live cases)。
正文 Speech path 說明本次 kws.method.name=stt / manual 的差異;本節呈現共用系統架構與 Frame flow。圖面來源:2026-09-04-itn-latency-optimization.html 的既有架構圖;標籤與程式引用以目前 branch 為準。
create_stt_processor 每連線建立 KittSttService;UserSessionManager 以 user_id 分開音訊/turn,同一連線共用 KWSStreamManager。preload 時 SherpaOnnxModelCache 跨連線共用 recognizer 與 lock;模型由 DVC 取得,部署沿用 deploy.sh → Skaffold → K8s/Orin/Thor。來源:src/server.py:67、src/session/user_session_manager.py:10、src/model_cache.py:9、utils/model_manager.py:154。
:行號 均指 src/kitt_stt_service.py。VAD stop 是獨立輸入,不由 interim 輸出觸發。final 先處理 wake/bypass/strip(見正文 Speech path),再依 exit、_should_emit_final 與 wake-only 條件分支;「送 final」指 TranscriptionFrame,由 EotController.apply 處理 WAIT/COMMIT。src/kitt_stt_service.py:499、src/kitt_stt_service.py:1242)。src/kitt_stt_service.py:1421、src/kitt_stt_service.py:1502)。src/kitt_stt_service.py:1398、src/kitt_stt_service.py:1789)。src/kitt_stt_service.py:1761、src/kitt_stt_service.py:1554、src/kitt_stt_service.py:1033)。| EotController 結果 | 輸出與狀態 | 後續事件 | 位置 |
|---|---|---|---|
WAIT | 有 final_frame 就先送出,不附 commit 的 eot.decision;turn 保持開啟。 | 排程 per-user EOT deadline;新 VAD start 取消 deadline 並延續 turn。deadline 到期且仍有效,改以 explicit stop commit。 | src/eot.py:176src/eot.py:248 |
COMMIT | 只選一個載體:有 final 用 TranscriptionFrame;無 final 用 ZonalUserStoppedSpeakingFrame。載體附 eot.decision。 | 關閉該 user 的 turn;若 room Active,重設共用 wake idle timer。 | src/eot.py:211 |
CANCEL | 丟棄連線內所有 pending turn;EotController 本身不發 commit frame。 | 呼叫端已送出或收到 agent_standby,供下游丟棄累積內容。 | src/eot.py:200 |
IN/OUT 表示收/送,不等同於 FrameDirection。Web UI 控制通常從 DOWNSTREAM 收入,LM standby 從 UPSTREAM 收入;服務產生的文字與狀態通常送往 DOWNSTREAM。下表列本服務特別處理或產生的 Frame,未列出的基底 passthrough 不新增本服務的行為契約。_emit_seat_load 只寫 trace,不送 ASRMetadataFrame(src/kitt_stt_service.py:1217)。
| Frame | 方向 | 觸發 case | 動作/條件 | 位置(file:line) |
|---|---|---|---|---|
StartFrame | IN | pipeline 啟動 | 呼叫基底 start,送模型/主機 metadata;模型與 session manager 已在 service 建構時準備。 | src/kitt_stt_service.py:314 |
AudioRawFrame | IN | PCM chunk 到達 | 依 user_id 選 session;更新 preroll/turn tail。utterance_active 時累積 segment 並評估 interim 排程。 | src/kitt_stt_service.py:893src/kitt_stt_service.py:499 |
VADUserStartedSpeakingFrame | IN | VAD 開始 | 建立或延續 per-user turn,取消舊 EOT deadline;以 preroll 起始 segment。 | src/kitt_stt_service.py:672 |
VADUserStoppedSpeakingFrame | IN | VAD 停止 | 快照 segment/turn tail,交棒 stream,並行 final ASR 與 TurnSense。已知 eot_force_reason 可要求 force-complete;不直接代表 EOT commit。 | src/kitt_stt_service.py:774src/kitt_stt_service.py:1502 |
UserStartedSpeakingFrame | IN | 上游 legacy semantic start | 本服務不以此建立或重開 turn;原 frame 交由基底路徑傳遞。 | src/kitt_stt_service.py:987 |
UserStoppedSpeakingFrame | IN | 上游 legacy semantic stop | 本服務不以此結束 turn;原 frame 交由基底路徑傳遞,STT 自行決定 EOT。 | src/kitt_stt_service.py:987 |
BotStartedSpeakingFrame | IN | TTS 開始播放 | Active 改掛 bot_speaking_watchdog_secs;Standby 取消 shared timer。 | src/kitt_stt_service.py:907 |
BotStoppedSpeakingFrame | IN | TTS 播放結束 | Active 且無 user 正在 utterance 中時,重設 shared idle timeout。 | src/kitt_stt_service.py:939 |
InterruptionFrame | IN | reason=agent_active;Web UI 手動 Active | 啟用共用 wake state、重設 idle timer;各 session 從當下重啟辨識,丟棄切換前 segment。stt/manual 都接受此控制。 | src/kitt_stt_service.py:1025src/kitt_stt_service.py:651 |
InterruptionFrame | IN | reason=agent_standby;Web UI(DOWNSTREAM) | 清除共用 wake state,結束所有 pending turn;交由基底傳遞。 | src/kitt_stt_service.py:998 |
InterruptionFrame | IN | reason=agent_standby;LM(UPSTREAM) | 同樣取消 room-wide pending turn,另向 DOWNSTREAM relay 讓 Web UI 同步。 | src/kitt_stt_service.py:1013 |
STTUpdateSettingsFrame | IN | 設定 delta | 由基底設定路徑呼叫 _update_settings;依 delta 更新支援的 wake/bypass 設定,不代表所有 YAML 欄位都可熱切換。 | src/kitt_stt_service.py:1177 |
EndFrame | IN | pipeline 收尾 | 取消 idle timer;仍在 utterance 的 session 可跑 final,使用 apply_eot=false,不發 EOT commit。之後丟棄 pending turn,交由基底收尾。 | src/kitt_stt_service.py:1033 |
ASRMetadataFrame | OUT | start 完成 | 送 model_name 與 CPU/GPU/RAM 資訊;不是文字或 EOT 載體。 | src/kitt_stt_service.py:314 |
InterimTranscriptionFrame | OUT | interim decode 有更新文字 | features.streaming_interim=true 且 _should_emit_interim 通過;須同時符合排程條件。後處理只做 s2t,不作 final 的權威輸出。 | src/kitt_stt_service.py:1242src/kitt_stt_service.py:1278 |
InterimTranscriptionFrame | OUT | 無可送 final,但 room 仍 Active | 送空文字清除 interim;Standby 清除顯示改由 agent_standby 通知處理。 | src/kitt_stt_service.py:1761 |
TranscriptionFrame | OUT | 非空 final,_should_emit_final 通過,且非 exit | 帶 eot.model;WAIT 先送 segment final 並等待,COMMIT 在同一 frame 附 eot.decision。EndFrame 收尾例外不套用 EotController。 | src/kitt_stt_service.py:1681src/eot.py:176 |
ZonalUserStoppedSpeakingFrame | OUT | COMMIT 且沒有 final_frame | 如有效 EOT deadline 到期、wake-only、ASR error;以 explicit stop 承載 eot.decision,不是每個 final 都加送 stop。 | src/eot.py:211 |
InterruptionFrame | OUT | STT wake 命中/Active re-wake | reason=agent_active;喚醒或重申共用 Active 狀態。manual 不以 transcript 觸發這條路徑。 | src/kitt_stt_service.py:583src/kitt_stt_service.py:1599 |
InterruptionFrame | OUT | exit word 命中 | reason=agent_standby;清除 wake state 並取消 room-wide pending turn,不送 exit transcript。 | src/kitt_stt_service.py:1398src/kitt_stt_service.py:1633 |
InterruptionFrame | OUT | Standby 且無可送 final | reason=agent_standby;通常是 wake/bypass 無匹配,CANCEL / no_wake 丟棄 pending turn。 | src/kitt_stt_service.py:1774 |
InterruptionFrame | OUT | 共用 wake idle/watchdog timeout 到期 | reason=agent_standby;callback 先確認無 user 正在 speaking/finalizing。這個 timer 與 per-user EOT deadline 不同。 | src/kitt_stt_service.py:471 |
InterruptionFrame | OUT | 轉送 LM 的 UPSTREAM agent_standby | 向 DOWNSTREAM relay 同一 frame,讓 Web UI 回 Standby。 | src/kitt_stt_service.py:1013 |
TTSSpeakFrame | OUT | 符合 Standby wake-only 全部條件 | 送 wake.response_text,append_to_context=false;COMMIT / wake_only 另以 explicit stop 結束控制 turn。 | src/kitt_stt_service.py:1789src/kitt_stt_service.py:1801 |
需求列承接歷輪測試聯集,結果採用本次驗證。表中 PASS 僅代表所列測項通過;部分覆蓋與平台限制見附錄 C,分項數量與案例對應見測試證據。
下表計算需求列,不是 pytest case 數;同一需求可能跨 Feature,同一測試也可涵蓋多個需求,因此各組不能相加當成測試總數。執行命令見重現方式。
| PRD F_id | Feature | 有 STT SW_id? | 需求列數 | 2026-09-05 驗證狀態 |
|---|---|---|---|---|
| F_2 | One-shot(喚醒詞 + 指令連說) | 有;見分組細表 | 12 個需求列 | PASS 10 / FAIL 2 |
| F_3 | 聆聽等待 / 智慧斷句 / 解除喚醒時機 | 有;見分組細表 | 26 個需求列 | PASS 18 / FAIL 6 / PARTIAL 2 |
| F_4.3 | 語音打斷 Barge-in / 解除喚醒詞 | 有;見分組細表 | 3 個需求列 | FAIL 1 / PASS 2 |
| UX 專有 | PRD 無對應 F_id | 有;見分組細表 | 3 個需求列 | FAIL 2 / PASS 1 |
| STT_EXTRA | PRD 未描述、STT 已具備 | 有;見分組細表 | 65 個需求列 | PASS 53 / PARTIAL 1 / — 9 / FAIL 1 / SKIP 1 |
| F_1 | 多音區識別/控制 | 下游/OUT_OF_SCOPE | — | 未執行下游驗收 |
| F_4.1 | 背景併行 | 下游/OUT_OF_SCOPE | — | 未執行下游驗收 |
| F_4.2 | 後令壓前令 | 下游/OUT_OF_SCOPE | — | 未執行下游驗收 |
| F_5 | 連續指令 | 下游/OUT_OF_SCOPE | — | 未執行下游驗收 |
| F_6 | 上下文理解 | 下游/OUT_OF_SCOPE | — | 未執行下游驗收 |
| SW_id | 行為(規格) | 測試 | 結果 |
|---|---|---|---|
SW-W-03 | Standby→Active(喚醒詞在句首):喚醒詞+指令連說,辨識其後之指令;喚醒詞不得出現在 final,且不得因前期聽歪而誤顯示喚醒詞 | test_wake.py | ✓ PASS |
SW-W-04 | 喚醒詞 <停頓> 指令 亦能喚醒,final 無喚醒詞 | test_wake.py | ✓ PASS |
SW-W-05 | 喚醒詞不在句首不觸發 | test_standby.py | ✓ PASS |
SW-W-08 | Active 期間:喚醒後任何話都辨識並往後送;句首喚醒詞於 final 過濾、非句首喚醒詞保留;interim 出現喚醒詞可接受 | test_active.py | ✓ PASS |
SW-W-09 | Active 句首喚醒詞 + smart-turn,仍不顯示喚醒詞 | test_active.py | ✓ PASS |
SW-W-13 | Standby 第一句未命中 → turn 關閉,故第二句句首的喚醒詞是新 turn 的句首,正常觸發喚醒 | test_smart_turn_wake.py | ✓ PASS |
SW-W-14 | 英文出廠喚醒詞 Hi Foxtron 須觸發(大小寫無關),且喚醒詞不得留在 final | test_wake_factory_words.py | ✓ PASS |
SW-W-15 | 第一次主動問候的時機(UX§1.3.2):喚醒成立後須送出問候的 TTSSpeakFrame,STT 側上界 500ms | test_active_greeting.py · test_wake_latency.py | ✗ FAIL |
SW-W-16 | 喚醒成立後 <550ms 內有人說話 → 不觸發第一次主動問候。窗的起點是 InterruptionFrame(agent_active) 送出的那一刻——下游能觀測到的「喚醒成功」就是這個 frame | test_active_greeting.py | ✗ FAIL |
SW-W-17 | 喚醒詞+指令連說須觸發喚醒:連讀成一句時同樣要送出 InterruptionFrame(agent_active),不因喚醒詞未單獨成句而不通知下游 | test_active_greeting.py | ✓ PASS |
SW-W-18 | 喚醒詞+指令連說不得出現問候語:使用者在喚醒當下就把指令說完了,等同已在抑制窗內說過話 | test_active_greeting.py | ✓ PASS |
SW-WM-01 | 喚醒詞比對與剝除:latin 大小寫無關、分隔字元先剝除、喚醒詞後可直接接指令、剝除喚醒詞後指令完整保留 | tests/test_wake_matcher.py | ✓ PASS |
| SW_id | 行為(規格) | 測試 | 結果 |
|---|---|---|---|
SW-W-01 | 非喚醒(Standby):說喚醒詞以外任何句子,STT 不出任何文字、不往後送;相似音喚醒詞不得觸發 | test_standby.py | ✓ PASS |
SW-W-02 | 非喚醒下說無關長語音,需立即 smart-turn stop | test_standby.py | ✓ PASS |
SW-W-07 | smart-turn 斷句不因 VAD 誤判過度斷句 | test_smart_turn_wake.py | ✓ PASS |
SW-W-09 | Active 句首喚醒詞 + smart-turn,仍不顯示喚醒詞 | test_active.py | ✓ PASS |
SW-W-10 | Active 期間 smart-turn 功能正常(跨段黏合) | test_active.py | ✗ FAIL |
SW-W-11 | Active 第二句開頭喚醒詞不過濾(正常顯示) | test_smart_turn_wake.py | ✓ PASS |
SW-W-12 | 斷句前後不得因雜音產生語助詞(嗯/啊/喔) | test_active.py | ✓ PASS |
SW-W-13 | Standby 第一句未命中 → turn 關閉,故第二句句首的喚醒詞是新 turn 的句首,正常觸發喚醒 | test_smart_turn_wake.py | ✓ PASS |
SW-WM-02 | alias 只能買回實測誤聽,不得擴大誤觸發:全中文 alias 與 canonical 距離 ≤1 字;普通語句不得誤觸發 | tests/test_wake_matcher.py | ✓ PASS |
SW-B-03 | Prefix + smart-turn 正常合併 | test_bypass_prefix.py | ✗ FAIL |
SW-B-08 | 特定指令於 smart-turn 第一句句首觸發,只傳「關閉空調」 | test_bypass_cmd.py | ✓ PASS |
SW-B-10 | Standby 第一句未命中 → turn 關閉,故第二句句首的 Prefix 是新 turn 的句首,正常觸發 | test_smart_turn_bypass.py | ✓ PASS |
SW-B-11 | 同上,第二句句首的特定指令正常觸發 | test_smart_turn_bypass.py | ✓ PASS |
SW-X-01 | Timeout 15s:TTS 說完起算,15s 無人說話 → 回 Standby | test_timeout.py | ✓ PASS |
SW-X-02 | 重新喚醒後 timeout 重新計時 | test_timeout.py | ✓ PASS |
SW-X-05 | 第二次主動問候的時機(UX§1.3.3):喚醒起算 =10秒 任何座位都沒說話 → 播「你好,需要我為你做什麼呢?」 | test_active_greeting.py · test_remaining_ux_gaps.py | ✗ FAIL |
SW-X-06 | 10 秒內有人說話 → 不觸發第二次主動問候 | test_active_greeting.py | 部分覆蓋 |
SW-X-07 | 退出聆聽路徑一(UX§1.3.4):第二次問候播完後再 =5秒 無人說話 → 回 Standby | test_active_greeting.py | 部分覆蓋 |
SW-TURN-01 | 一個 turn 內只有第一個 VAD segment 是 turn head;其餘為續段,不跑喚醒/免喚醒偵測 | tests/test_turn_arbitration.py | ✓ PASS |
SW-TURN-02 | 續段的送出權依 bypass 種類授權:prefix 授予(SW-B-03 需要),exact 不授予(SW-B-07 的語意) | tests/test_turn_arbitration.py | ✓ PASS |
SW-TURN-03 | 新 turn head 清除上一個 turn 的指令送出權,續段則保留 | tests/test_turn_arbitration.py | ✓ PASS |
SW-EOT-01 | STT 是唯一 EOT authority:每個 VAD stop 以語尾模型評分 turn tail(跨 segment,最後 8 秒),COMPLETE 立即結束 turn,INCOMPLETE/INVALID 等固定秒數,上限 500ms(UX§3.1 的 command_wait_timeout;可由狀態頁調整,見 SW-OPS-04);等待內有新語音則延續同一 turn。立即完成且有非空 final 時,文字與 eot.decision(action=commit + reason)必須由同一個 TranscriptionFrame 原子傳遞;timeout 或無 final 時才以 UserStoppedSpeakingFrame 承載同一 commit contract | tests/test_eot_state.py、tests/turnsense/test_policy.py、tests/test_eot_kws_precedence.py、tests/test_ai_agent_ux_spec.py · live:test_remaining_ux_gaps.py | ✗ FAIL |
SW-EOT-02 | KWS 事件(standby 無匹配/離開詞/agent_standby/連線結束)一律丟棄 turn,優先於強制停止與模型判定;被丟棄的 turn 永不進 LLM。ASR final 失敗不屬 KWS cancel:該段不送 transcription,改以 asr_error 結束 turn | 離線:tests/test_eot_kws_precedence.py · live(wire contract):test_forced_stop.py | ✓ PASS |
SW-EOT-05 | 拒識門檻一:連續語音 >15 秒 → 不得往下游送 | test_rejection_thresholds.py | ✗ FAIL |
SW-EOT-06 | 拒識門檻二:連續語音 >50 字 → 不得往下游送 | test_rejection_thresholds.py | ✗ FAIL |
SW-EOT-07 | 兩門檻皆未越過者必須照常送出(拒識的反向對照) | test_rejection_thresholds.py | ✓ PASS |
| SW_id | 行為(規格) | 測試 | 結果 |
|---|---|---|---|
SW-X-04 | 說解除喚醒詞 → 切 Standby(UX§2.1 指定 13 個:謝謝/再見/退出/退下/滾蛋/滾/Thank you/Thanks/Goodbye/ByeBye/Dismiss/Quiet/Shut up) | live:test_exit_words.py · test_btn_control.py · 離線比對層:tests/test_exit_word.py、tests/test_ai_agent_ux_spec.py | ✗ FAIL |
SW-WM-03 | 退出詞 alias 必須錨定到已設定的退出詞:alias 群組的 canonical 不在 exit_words 內則整組忽略 | tests/test_wake_matcher.py | ✓ PASS |
SW-EOT-02 | KWS 事件(standby 無匹配/離開詞/agent_standby/連線結束)一律丟棄 turn,優先於強制停止與模型判定;被丟棄的 turn 永不進 LLM。ASR final 失敗不屬 KWS cancel:該段不送 transcription,改以 asr_error 結束 turn | 離線:tests/test_eot_kws_precedence.py · live(wire contract):test_forced_stop.py | ✓ PASS |
| SW_id | 行為(規格) | 測試 | 結果 |
|---|---|---|---|
SW-X-08 | 拒識之後必須維持聆聽(UX§10.2):越過 UX§8.2 門檻的語句丟棄不往下送,但不得因此離開 Active——拒識是「裝沒聽到」,不是「結束這一輪」 | test_rejection_thresholds.py | ✗ FAIL |
SW-LANG-01 | 整句英文指令須被辨識,且不需切換任何語言設定 | test_bilingual.py | ✓ PASS |
SW-LANG-02 | 同一句內中英夾雜時兩種文字都要保留:辨識器須在句中換文字系統,不是為整句選一種語言 | test_bilingual.py | ✗ FAIL |
| SW_id | 行為(規格) | 測試 | 結果 |
|---|---|---|---|
SW-W-19 | kws.method.name=stt 執行 transcript 喚醒;manual 跳過 match_wake 與 strip_wake_prefix | test_kws_method_policy.py · test_kws_method_manual.py | ✓ PASS |
SW-B-12 | manual 保留 match_bypass;已驗證 current-segment exact/prefix,非句首與跨段尚未完整覆蓋 | test_kws_method_policy.py · test_kws_method_manual.py | 部分覆蓋 |
SW-UI-07 | stt / manual 共用 InterruptionFrame(agent_active/agent_standby) 控制 | test_kws_method_policy.py · test_kws_method_manual.py | ✓ PASS |
SW-CFG-03 | kws.method.name 預設 stt、只接受 stt / manual;舊設定鍵拒絕啟動 | test_kws_method_config.py · test_status_page_settings.py | ✓ PASS |
SW-B-01 | Prefix(default「冷氣溫度*」「導航到*」):非喚醒下前綴符合即整句往後送 | test_bypass_prefix.py | ✓ PASS |
SW-B-02 | Prefix 不在句首不觸發 | test_bypass_prefix.py | ✓ PASS |
SW-B-05 | 特定指令(exact,default「關閉空調」):非喚醒下整句相符即往後送 | test_bypass_cmd.py | ✓ PASS |
SW-B-06 | 特定指令 不在句首不觸發 | test_bypass_cmd.py | ✓ PASS |
SW-B-07 | 特定指令句中夾雜其他話不觸發 | test_bypass_cmd.py | ✓ PASS |
SW-X-03 | 按 WebUI 綠色 active 按鈕 → 回 Standby | test_btn_control.py | ✓ PASS |
SW-UI-01 | WebUI Standby 按鈕可啟動喚醒(灰→綠),之後任何話都辨識往後送 | test_btn_control.py | ✓ PASS |
SW-UI-02 | 每次 connect 後狀態不壞:Connect→喚醒→disconnect ×5 都正常 | test_btn_control.py | ✓ PASS |
SW-UI-03 | 頻繁切換穩定:連點喚醒按鈕 ≥10 次後,切換仍正常 | test_btn_control.py | ✓ PASS |
SW-UI-04 | 連點後於 Standby 說「嗨鴻華」仍能觸發 | test_btn_control.py | ✓ PASS |
SW-UI-05 | 講話中瞬間切 Standby,WebUI 不得有灰字卡住 | test_btn_control.py | ✓ PASS |
SW-UI-06 | 講話中瞬間切靜音(mic),WebUI 不得卡住 | STT_EXTRA | — |
SW-MU-01 | 同車多 user 喚醒狀態同步(按鈕同開同關) | —(歸屬:web-ui) | — |
SW-MU-02 | 多 user 按鈕/語音喚醒穩定度(交互點擊 ≥5 次仍正常) | —(歸屬:web-ui) | — |
SW-MU-03 | UserA 講話中(final 未送),UserB 切 standby → STT 立即停聽、WebUI 無卡字 | —(歸屬:web-ui + STT) | — |
SW-MU-04 | 新 connect 的 user 同步當前喚醒狀態 | —(歸屬:web-ui) | — |
SW-MU-05 | 開關 mic 不影響喚醒狀態同步 | —(歸屬:web-ui) | — |
SW-MU-06 | 多 user timeout 穩定:長句期間不得誤切 standby | —(歸屬:web-ui + STT) | — |
SW-MU-07 | 自定義喚醒詞在多 user 間同步(含刪除同步) | —(歸屬:web-ui) | — |
SW-MU-08 | 多車隔離:Car1 喚醒/自定義詞不影響 Car2 | —(歸屬:web-ui(STT 以 ?car= 分段)) | — |
SW-CFG-01 | 可經 WebUI 客製化喚醒詞/免喚醒詞,行為與原廠一致 | test_stt_config.py | ✓ PASS |
SW-CFG-02 | 刪除客製化詞後不再觸發 | test_stt_config.py | ✓ PASS |
SW-PERF-01 | 連續長句(≥90 秒)講話期間,interim 重新解碼排程不得因緩衝區持續變長而失控卡住 | test_audio_stress.py | ✓ PASS |
SW-PERF-02 | 反應式 interim 重解碼排程的設定解析:間隔由上一次解碼延遲 × 安全係數決定,並受下限約束 | tests/test_audio_cfg.py | ✓ PASS |
SW-PERF-03 | 整車多人同時講話(1 條連線、4 個座位帶不同 user_id):interim 重新解碼排程不得因共用辨識器的鎖爭用而卡住;每個座位都必須拿到自己的 final,且不得有非本車座位的 user_id(不串話) | tests/functional/live/test_multiuser_concurrency.py(5 條)|離線機制測試 tests/test_interim_concurrency.py(13 條)、tests/test_itn_off_frame_path.py(3 條) | ✓ PASS |
SW-PERF-04 | 喚醒通知須在 200ms 內送出(UX§1.3.1):UI 動效由此 frame 觸發 | test_wake_latency.py | ✗ FAIL |
SW-PERF-05 | 喚醒率回歸下限 ≥90%(UX§1.1) | test_wake_rate.py | ✓ PASS |
SW-EOT-03 | 語尾模型的音訊前處理必須與訓練時逐位元相同(fbank 80 → LFR 7/6 → CMVN,裁到最後 8 秒),否則三分類機率不成立 | tests/turnsense/test_frontend.py | ✓ PASS |
SW-EOT-04 | 語尾模型只在 CUDA 上執行(與 SW-OPS-06 同一原則,見 kitt-stt-sw-spec.md §10):provider 未生效時伺服器拒絕啟動而非降級到 CPU;行程內單例、推論序列化且不佔用 event loop | tests/turnsense/test_runtime.py | ✓ PASS |
SW-ITN-01 | final 的 ITN:中文數字正規化 + 繁簡轉換 | tests/test_text_converter.py | ✓ PASS |
SW-ITN-02 | interim 與 final 的 ITN 刻意不同:interim 只做 s2t(),final 做完整 itn();故兩者在數字上可以不同,這是設計不是 bug | tests/test_batch_asr_manager_itn_split.py | ✓ PASS |
| SW-ITN-03 2026-09-04 | 「這個數字字元是不是數字」由詞庫決定而非執行期斷詞器;緊鄰受保護詞的真數字仍必須轉換;執行期不得持有斷詞器(jieba 不在 runtime 依賴內) | tests/test_itn_lexicon.py(43,offline) | ✓ PASS |
| SW-ITN-04 2026-09-04 | 整數與小數(含正負號)轉阿拉伯數字:一→1、負十→-10、負三點一四一六九九九九九→-3.141699999 | test_text_converter.py::test_all(pytest -k "G1- or G2- or G12-") | ✓ PASS |
| SW-ITN-05 2026-09-04 | 百分比(含正負號)轉阿拉伯數字:百分之一→1%、百分之負零點五→-0.5% | test_text_converter.py::test_all(pytest -k G3-) | ✓ PASS |
| SW-ITN-06 2026-09-04 | 分數(含正負號)轉阿拉伯數字:二分之一→1/2、負三分之一→-1/3 | test_text_converter.py::test_all(pytest -k G4-) | ✓ PASS |
| SW-ITN-07 2026-09-04 | 日期/時間:數字轉阿拉伯數字,單位詞維持中文:一月五號→1月5號、十一點五十九分五十九秒→11點59分59秒 | test_text_converter.py::test_all(pytest -k "G5- or G8-") | ✓ PASS |
| SW-ITN-08 2026-09-04 | 程度副詞維持全中文、不得數字化:一點點、一些、十分滿意 等 40+ 慣用語 | test_text_converter.py::test_all(pytest -k G7-) | ✓ PASS |
| SW-ITN-09 2026-09-04 | 完整車內出貨指令語料 495 列、29 個產品功能分類,逐句 100% 正確;分類本身不得靜默缺漏 | test_itn_lexicon.py::test_every_incar_command_normalises_as_adjudicated/test_every_product_category_is_represented | ✓ PASS |
SW-OPS-01 | 模型解析:get_local_model_path 維持純函式(不觸發下載);ensure_local_model_path 只在 bundle 真的缺失時 pull、且只 pull 自己那個 .dvc;失敗訊息必須指名該跑的指令 | tests/test_model_manager.py | ✓ PASS |
SW-OPS-02 | 出貨模型的五處必須一致:config-basic.yaml 的 model.key、utils/model_manager.py 註冊表、三個 Dockerfile* 的 COPY、deploy.sh 的 MODEL_DVC_FILES、.dockerignore 的 build context 白名單 | tests/test_augment.py | ✓ PASS |
SW-OPS-03 | Per-turn debug log 檢索端點(GET ,2026-08-20):features.enable_debug_log_endpoint 關閉時回 404;開啟時可依 trace_id(來自 WS 握手 ?trace_id=,經 logger.contextualize 標記,比照既有 ?car= 機制)與時間窗(since_ms/until_ms/minutes)篩選 in-memory ring buffer(debug.debug_log_buffer_lines 筆數上限);零筆符合回 200 而非錯誤 | tests/test_debug_log_buffer.py、tests/test_debug_log_config.py、tests/test_debug_log_endpoint.py、tests/functional/live/test_debug_logs.py | ✓ PASS |
SW-OPS-04 | 狀態頁設定介面:EOT 等待秒數以滑桿呈現,其上下界與步進即 clamp() 實際夾制的範圍;整頁只有一個儲存動作,任一欄位驗證失敗則全部不送出。上界必須低於 kitt-core 的 user_turn_stop_timeout,否則該 fallback 會搶在語尾判定之前結束 turn | tests/test_status_page_settings.py | ✓ PASS |
SW-OPS-05 | live 測試 harness 不得產生 false pass:tests/docker-test.sh 重用映像的新鮮度檢查,必須涵蓋 Dockerfile 所有 COPY 進映像的路徑。清單以 Dockerfile 為來源推導驗證,不得手工維護——漏一個路徑就會讓套件對著不是受測版本的程式碼跑出綠燈 | tests/test_augment.py::test_docker_test_rebuilds_when_any_baked_in_path_changes | ✓ PASS |
SW-OPS-06 | provider=trt 不得靜默降級成 CUDA(與 SW-EOT-04 是同一原則的兩個實例:指定的 provider 沒生效就拒絕啟動),兩層:① 註冊層——TensorRT EP 註冊失敗時(onnxruntime build 沒有 TRT、libnvinfer 不在載入路徑、ORT 退回選項),vendored sherpa-onnx 中止行程而非 fallback;② 執行層——recognizer 建好之後,若 model.provider 要的是 trt 而 libnvinfer 未常駐於本行程,服務啟動必須失敗。①擋不到②:engine 因 sm 或 TRT 版本不符而無法反序列化時 EP 仍註冊成功,ORT 可以把節點丟回 CUDA。兩者的共同理由是該降級在執行期不可見——服務照常啟動、答案正確,只是慢數倍,該輪就因此量到一組標著 TensorRT 卻跑在 CUDA 的數字 | tests/test_trt_provider_guard.py | ✓ PASS |
SW-FT-01 | 訓練語料建構:目標詞以 config-basic.yaml 為單一事實來源;句型展開不污染標籤;音色池與配額可重現;AISHELL-3 全程只當評估、永不進訓練 | tests/test_finetune_corpus.py | ✓ PASS |
SW-FT-02 | 量測與判定:MODEL/PRODUCT 雙軸(別名不計入模型能力)、三軸判定須同時成立、checkpoint 選擇規則(一般 ASR 品質門檻未通過者不得被選中、全 NO-GO 時不得回傳贏家) | tests/test_finetune_eval.py | ✓ PASS |
SW-FT-03 | LoRA 接線:不可達目標必須拋錯而非靜默不啟用;可訓練集合非空且只含 lora;merge 後鍵集合=base 且權重確實改變 | tests/test_finetune_lora.py | SKIP |
SW-FT-04 | 波形增強:SNR 精度、訓練/評估池不相交、確定性、不削波;預設 AUG_RATIO=0(乾淨語料) | tests/test_augment.py | ✓ PASS |
SW-FT-05 | 論文基準計分不得與一般 ASR 品質驗收計分共用程式碼;中英文正規化分流、論文目標值釘住;精度以 --model-file 選擇(預設 model.onnx,歷史呼叫方式不變),且寫進 report JSON 讓每個數字帶著它的精度來源 | tests/test_paper_bench.py | ✓ PASS |
SW-FT-06 | 模型量化匯出:sherpa-onnx 的 metadata_props(model_type / lfr_window_size / neg_mean / inv_stddev / lang_* / with_itn …)在 INT8 與 FP16 轉換後必須逐鍵存活——少一個,sherpa-onnx 就載不起來;FP16 圖必須保持 fp32 的 graph I/O(keep_io_types),否則餵 fp32 waveform 會型別不符;INT8 的量化參數(op_types_to_quantize / weight_type)只允許存在一份,exporter 與獨立量化工具共用同一個函式,不得各寫一份而漂移 | tests/test_quantize_bundle.py | ✓ PASS |
SW-FT-07 | 量測後端可換為 ONNX:--onnx-dir(sherpa-onnx)與 --init-param(PyTorch)互斥,避免報告出現一個不知道用哪個後端量的數字;--require-cache 時,付費 TTS 語料只要有一個 clip 不在快取裡就在發出任何 TTS 請求之前失敗(Google TTS 按字計費,一次誤觸就是真實支出) | tests/test_eval_onnx_backend.py | ✓ PASS |
SW-FT-08 | 運算子的裝置可攜性:量化會把 MatMul 換成 MatMulInteger/MatMulNBits 等運算子,而目標裝置的 execution provider 未必實作它們——未實作時 ORT 會靜默指派回 CPU,模型照跑、文字照樣正確,只是速度不是部署時假設的那個。工具須:①列出圖中所有運算子;②列出某個量化方案新增/移除了哪些運算子;③以 ORT profiler 的實際節點指派回答「哪些落在目標 provider、哪些退回 CPU」;④把「provider 根本沒載入」與「部分運算子退回」分開報告(前者是環境問題,後者才是運算子支援問題)。輸入由圖的簽章合成,所以在沒有語料的邊緣裝置上也能重跑 | tests/test_op_support.py | ✓ PASS |
SW-DOC-01 | 新增測試檔必須在本規格留下紀錄:掛在某個 SW_id 之下,或明示「刻意不給 ID」與理由。反向亦然——本規格不得引用已不存在的測試檔(重新命名或刪除後留下的空指向,比未覆蓋更危險,因為它看起來有覆蓋)。§8/§9 兩區與其 ID 前綴不得被靜默移除 | tests/test_spec_traceability.py | ✓ PASS |
SW-DOC-02 | cycle 報告的累積 ledger 只增不減:最新一份報告必須涵蓋歷輪聯集的所有 SW_id(不只是對前一輪比對——那會讓某個 ID 消失一輪後就永遠消失,因為下一次比的是兩份都已缺它的報告)。報告檔名須與 docs/dev-specs/ 的 cycle stem 對應 | tests/test_report_integrity.py | ✓ PASS |
SW-DOC-03 | 報告要定義自己用的技術名詞(CLAUDE.md Rule 5):凡讀者需要查才看得懂、且結論依賴其意義的名詞(sm89/RTF/MatMulInteger/CMVN…),必須在報告的名詞定義節裡說明「是什麼」與「該輪為何重要」。⚠️ 機械檢查的範圍是「有名詞表的報告,其涵蓋必須完整」;「報告有沒有名詞表」判不了誰是該輪的 cycle,故列入 close-out checklist | tests/test_report_glossary.py | ✓ PASS |
SW-DOC-04 | 報告的圖表要能被讀懂(CLAUDE.md §6 item 4b):每張圖需有 aria-label;每張數據圖需有 caption,且 caption 要寫出結論而非重複標題(架構/流程圖屬 item 4,豁免)。⚠️ 規則不追溯——報告以「至少有一張帶 caption 的圖」表示採用此慣例,之後其圖才受檢;該輪之前無任何報告為圖加 caption | tests/test_report_charts.py | ✓ PASS |
SW-DOC-05 | 報告的章節交叉引用必須指得到(CLAUDE.md §6 item 7e):報告是獨立閱讀的文件,§N 是讀者從結論走到證據的唯一途徑;重新編號章節時,引用它的文字必須同步改。⚠️ 檢查只驗指得到,無法判斷「§9 其實該寫 §10」。既有 4 份報告的 12 個懸空引用列成 KNOWN_DANGLING 明帳,只能減不能加 | tests/test_report_crossrefs.py | ✓ PASS |
SW-DOC-06 | 報告的 ID 對照表要逐項定義(CLAUDE.md Rule 3):報告引用的每一個 A/D/E/F/R 都要在表裡有自己一列——只定義「家族」與範圍不算數,那回答的是「A 是什麼」不是「其中某一個 id 是什麼」。⚠️ 規則不追溯:以報告是否含「ID 對照」章節判定是否受檢;既有 2 份報告的 18 個未定義 ID 列成 KNOWN_UNDEFINED 明帳,只能減不能加 | tests/test_report_ids.py | ✓ PASS |
SW-DOC-07 | 報告的小節要掛在自己的章節底下(CLAUDE.md §6 item 7f):不得有 <h3> 排在本節 <h2> 之前;編號 N.M 的小節必須位於編號 N 的 <section> 內;站內連結必須指得到錨點。該輪發生兩次——插入時以「下一個 h2」定位,內容落進下一節,而 HTML 解析/標籤平衡/錨點檢查全部看不出來 | tests/test_report_structure.py | ✓ PASS |
SW-DOC-08 | 報告引用的測試檔必須存在(CLAUDE.md §3 懸空引用原則):ledger 是審閱者判斷「這個需求有沒有人守」的依據,指向不存在的檔案讀起來和有覆蓋一模一樣,比空白更糟——空白至少會促使人去查。SW-DOC-01 守的是規格↔測試,這條守的是報告↔測試,而後者才是審閱者實際會讀的。⚠️ 只驗檔名;函式是否存在、結果是否與實跑相符,仍是收尾檢查表的工作 | tests/test_report_test_refs.py | ✓ PASS |
| SW-DOC-09 2026-09-04 | 累積 ledger 裡「該需求所屬 cycle新增」的高亮必須跟著換手:沒被該需求所屬 cycle新增的列要清掉 class="hl",只有該需求所屬 cycle自己新增的列能保留,且要帶明確日期(CLAUDE.md §6 rule 7g)。原編號 SW-DOC-08,rebase 到 2026-09-04-ai-agent-ux-alignment 時撞號而改號 | test_report_highlighting.py(1) | ✓ PASS |
| SW_id | 行為(規格) | 測試 | 結果 |
|---|---|---|---|
SW-W-06 | smart-turn 第二句開頭說喚醒詞不觸發喚醒 · 2026-08-17 廢止,與 SW-W-02 互斥,見 SW 規格的廢止紀錄。由 SW-W-13 取代 | — | — |
SW-B-04 | Prefix 出現在 smart-turn 第二句句首不觸發 · 2026-08-17 廢止,與 SW-W-02 互斥,見 SW 規格的廢止紀錄。由 SW-B-10 取代 | — | — |
SW-B-09 | 特定指令於 smart-turn 第二句句首不觸發 · 2026-08-17 廢止,與 SW-W-02 互斥,見 SW 規格的廢止紀錄。由 SW-B-11 取代 | — | — |
| —(已移除) | — |
| 驗收 ID | 行為 | 測試(file::test) | 結果 |
|---|---|---|---|
| A1 | 第一次 interim 無前次延遲 → 用 initial_interval | test_audio_cfg::test_next_interval_uses_initial_when_no_prior_latency | ✓ PASS |
| A2 | 間隔 = max(延遲×margin, 地板),無上限 | test_audio_cfg::test_next_interval_is_latency_times_margin_above_the_floor / test_next_interval_has_no_upper_ceiling | ✓ PASS |
| 延遲很小時被地板夾住 | test_audio_cfg::test_next_interval_clamped_to_floor_for_small_latency | ✓ PASS | |
| A3–A5 | margin≤1 / 地板≤0 / 初始值≤0 → ValidationError | test_audio_cfg::test_safety_margin_must_be_greater_than_one / test_min_interval_must_be_positive / test_initial_interval_must_be_positive | ✓ PASS |
| A6 | ASR_INTERIM_SAFETY_MARGIN 覆寫 / 未設時吃 YAML | test_audio_cfg::test_env_var_overrides_margin / test_no_env_var_keeps_yaml_default | ✓ PASS |
| 驗收 ID | 行為 | 測試(file::test) | 結果 |
|---|---|---|---|
| SW-PERF-01 | 連線無錯誤 | test_audio_stress::test_audio_stress_no_errors | ✓ PASS |
| SW-PERF-01 | 90 秒連續長句仍收到 final | test_audio_stress::test_audio_stress_final_received | ✓ PASS |
| SW-PERF-01 | time to final 有界 | test_audio_stress::test_audio_stress_time_to_final_bounded | ✓ PASS |
| SW-PERF-01 | 相鄰 interim 最大間隔有界 | test_audio_stress::test_audio_stress_interim_gap_bounded | ✓ PASS |
| 驗收 ID | 行為 | 測試(file::test) | 結果 |
|---|---|---|---|
| B1 | interim 只套用 s2t(),不做數字正規化 | test_batch_asr_manager_itn_split::test_interim_inference_only_applies_s2t_not_numeral_normalization | ✓ PASS |
| B2 | final 仍套用完整 itn()(s2t + 數字),不受影響 | test_batch_asr_manager_itn_split::test_offline_inference_still_applies_full_itn | ✓ PASS |
| 驗收 ID | 行為 | 測試(file::test) | 結果 |
|---|---|---|---|
| B14-R1 | RTF 只計 decode_stream() 的時間,不含鎖等待 | test_interim_concurrency::test_decode_ms_and_latency_ms_agree_with_no_contention / test_decode_ms_excludes_lock_queueing_but_latency_ms_includes_it | ✓ PASS |
| B14-R2 | 每個 session 有獨立的 buffer_lock,與 inference_lock 分開,且真的序列化併發存取 | test_interim_concurrency::test_buffer_lock_is_per_session_and_separate_from_inference_lock / test_buffer_lock_serializes_append_against_read | ✓ PASS |
| B19-R1 | _interim_redecode_body 不得被 inline await;恰有一次背景派發,且必須是 self.create_task | test_interim_concurrency::test_interim_redecode_is_dispatched_never_awaited | ✓ PASS |
| B19-R2 | ×人數 不得偷渡回來:呼叫端只能帶 1 個位置引數,函式簽名不得有人數參數 | test_interim_concurrency::test_the_schedule_is_never_given_a_speaker_count | ✓ PASS |
| B19-R3 | 三個已移除的旗標保持移除:FeaturesCfg 無欄位、config-basic.yaml 無鍵,舊 override 檔仍可載入且為惰性 | test_interim_concurrency::test_the_removed_knobs_stay_removed | ✓ PASS |
| F_id / SW_id | Feature / 行為 | 歸屬 |
|---|---|---|
| F_1 | 多音區識別/控制(權限·AreaID·多區並行) | 下游 + STT per-user_id hook |
| F_4.1 | 語音打斷_背景併行處理 | 下游 DM/TTS |
| F_4.2 | 語音打斷_後令壓前令 | 下游 DM 仲裁 |
| F_5 | 連續指令 | 下游 NLU 拆解(UX§4.2.1 拆解成功率同歸此列) |
| F_6 | 上下文理解 | 下游 DM 快取(UX§5 保留輪數同歸此列) |
| F_3.4c | 最大錄音時限自動停止 | kitt-web-ui——✓ 已實作,設定 20s(2026-09-04 UX cycle 記錄的使用者確認;2026-09-05 未驗證 Web UI) |
| SW-UI-06 | 講話中切 mic 靜音、WebUI 不卡字 | web-ui(無 STT 測試) |
| SW-MU-01..08 | 多使用者/多車喚醒同步、隔離 | web-ui(STT 提供 per-user_id / ?car= hook) |
UX§1.3.1/UX§7/UX§9/UX§10(除 11.3) | 問候語 UI/Guardrail/回復策略/顯示策略 | 下游 UI/LLM/TTS |
| SW_id | 行為 | 測試 | 結果 |
|---|---|---|---|
| — 刻意不掛 SW_id |
interim 重解碼的特徵抽取增量化:增量餵入與一次性餵入產生的特徵必須逐 bit 相同;
持續 stream 不得跨 utterance 復用;該句的 final 沿用同一個 stream 只補未餵的尾巴;
餵入失敗必須可見且可復原(拋 IncrementalFeedError、游標只在成功後推進、
半餵的 stream 丟棄重建);交棒不得在 interim 餵入中途發生(否則 final 重複餵同一段音訊) |
tests/test_offline_stream_incremental.py(8) tests/test_batch_asr_manager_incremental_prep.py(8) tests/test_interim_incremental_wiring.py(6) tests/test_final_stream_reuse.py(9) |
31/31 PASS · 2026-09-05 offline |
驗證日期與環境見驗證結果。offline PASS 表示該列所列測項於全套執行中通過;其他範圍與限制如下。下列分項數量可能共用測試,不可相加當作整套總數。
| 需求 | 驗證範圍/補充證據 |
|---|---|
SW-W-03、SW-W-04、SW-W-05、SW-W-13、SW-W-01、SW-W-02、SW-W-07、SW-W-11、SW-B-10、SW-B-11、SW-X-01、SW-X-02、SW-CFG-01、SW-CFG-02、SW-OPS-03 | STT live:2 passed / 0 failed。 |
SW-W-08、SW-W-12 | STT live:1 passed / 0 failed。 對應測項:1。 |
SW-W-09 | STT live:1 passed / 0 failed。 對應測項:2。 |
SW-W-14 | STT live:1 passed / 0 failed。 |
SW-W-15 | STT live:1 passed / 1 failed。 對應測項:4、84。 |
SW-W-16 | STT live:0 passed / 4 failed。 對應測項:5、6、7、8。 |
SW-W-17 | STT live:1 passed / 0 failed。 對應測項:9。 |
SW-W-18 | STT live:1 passed / 0 failed。 對應測項:10。 |
SW-W-10 | STT live:0 passed / 1 failed。 對應測項:3。 |
SW-B-03 | STT live:0 passed / 1 failed。 對應測項:32。 |
SW-B-08、SW-B-05、SW-B-06、SW-B-07、SW-PERF-01、SW-PERF-05 | STT live:4 passed / 0 failed。 |
SW-X-05 | STT live:0 passed / 2 failed。 對應測項:11、67。 |
SW-X-06 | STT live:1 passed / 0 failed。測項 PASS,但未驗證第二次問候確實發生;SW-X-05 為 FAIL,不能據此宣稱完整 UX 時序成立。 對應測項:12。 |
SW-X-07 | STT live:1 passed / 0 failed。測項 PASS,但未驗證第二次問候確實發生;SW-X-05 為 FAIL,不能據此宣稱完整 UX 時序成立。 對應測項:13。 |
SW-EOT-01 | STT live:1 passed / 1 failed。離線 500ms 設定檢查亦 FAIL;490ms 預期 1 個 final、實際 2 個,510ms PASS。 對應測項:68、69。 |
SW-EOT-02 | STT live:3 passed / 0 failed。 |
SW-EOT-05 | STT live:0 passed / 1 failed。 對應測項:60。 |
SW-EOT-06 | STT live:0 passed / 1 failed。 對應測項:61。 |
SW-EOT-07 | STT live:1 passed / 0 failed。 對應測項:62。 |
SW-X-04 | STT live:1 passed / 12 failed。離線退出詞清單/英文大小寫檢查亦 FAIL。 對應測項:35、36、37、38、39、40、41、42、43、44、45、46、47。 |
SW-X-08 | STT live:0 passed / 2 failed。 對應測項:63、64。 |
SW-LANG-01 | STT live:1 passed / 0 failed。 對應測項:19。 |
SW-LANG-02 | STT live:0 passed / 1 failed。 對應測項:18。 |
SW-W-19、SW-UI-07 | focused offline 與 manual live 4 passed。 |
SW-B-12 | focused offline 與 manual live 4 passed。僅 current-segment exact/prefix;非句首與跨段未完整覆蓋。 |
SW-B-01 | STT live:1 passed / 0 failed。 對應測項:30。 |
SW-B-02 | STT live:1 passed / 0 failed。 對應測項:31。 |
SW-X-03、SW-UI-01、SW-UI-02、SW-UI-03、SW-UI-04、SW-UI-05 | STT live:6 passed / 0 failed。 |
SW-UI-06、SW-MU-01、SW-MU-02、SW-MU-03、SW-MU-04、SW-MU-05、SW-MU-06、SW-MU-07、SW-MU-08 | 無 STT 自動化驗證;下游行為不由本表判定。 |
SW-PERF-03 | STT live:5 passed / 0 failed。 |
SW-PERF-04 | STT live:0 passed / 2 failed。 |
SW-FT-03 | offline:模組需要 funasr,未執行;不沿用舊 PASS。 |
SW-W-06、SW-B-04、SW-B-09、SW-PERF-06 | 已廢止/移除,保留歷史 ID,不列入通過數。 |
下表逐一保留 STT live 的執行結果;序號供上表對應,不是新的需求 ID。
| 序號 | 測項 | 結果 |
|---|---|---|
| 1 | tests/functional/live/test_active.py::test_active_wake_filter | PASSED |
| 2 | tests/functional/live/test_active.py::test_active_smart_turn_wake_head | PASSED |
| 3 | tests/functional/live/test_active.py::test_active_smart_turn | FAILED |
| 4 | tests/functional/live/test_active_greeting.py::test_ux_1_3_2_first_greeting_is_sent_within_500ms | PASSED |
| 5 | tests/functional/live/test_active_greeting.py::test_ux_1_3_2_speaking_inside_the_window_suppresses_the_first_greeting[50ms] | FAILED |
| 6 | tests/functional/live/test_active_greeting.py::test_ux_1_3_2_speaking_inside_the_window_suppresses_the_first_greeting[200ms] | FAILED |
| 7 | tests/functional/live/test_active_greeting.py::test_ux_1_3_2_speaking_inside_the_window_suppresses_the_first_greeting[350ms] | FAILED |
| 8 | tests/functional/live/test_active_greeting.py::test_ux_1_3_2_speaking_inside_the_window_suppresses_the_first_greeting[500ms] | FAILED |
| 9 | tests/functional/live/test_active_greeting.py::test_ux_1_3_one_shot_wake_emits_active_like_a_bare_wake | PASSED |
| 10 | tests/functional/live/test_active_greeting.py::test_ux_1_3_2_one_shot_wake_suppresses_the_first_greeting | PASSED |
| 11 | tests/functional/live/test_active_greeting.py::test_ux_1_3_3_second_greeting_fires_at_10s_when_nobody_speaks | FAILED |
| 12 | tests/functional/live/test_active_greeting.py::test_ux_1_3_3_speaking_within_10s_suppresses_the_second_greeting | PASSED |
| 13 | tests/functional/live/test_active_greeting.py::test_ux_1_3_4_exits_5s_after_the_second_greeting | PASSED |
| 14 | tests/functional/live/test_audio_stress.py::test_audio_stress_no_errors | PASSED |
| 15 | tests/functional/live/test_audio_stress.py::test_audio_stress_final_received | PASSED |
| 16 | tests/functional/live/test_audio_stress.py::test_audio_stress_time_to_final_bounded | PASSED |
| 17 | tests/functional/live/test_audio_stress.py::test_audio_stress_interim_gap_bounded | PASSED |
| 18 | tests/functional/live/test_bilingual.py::test_code_switching_within_one_command | FAILED |
| 19 | tests/functional/live/test_bilingual.py::test_english_command_after_chinese_wake_word | PASSED |
| 20 | tests/functional/live/test_btn_control.py::test_btn_activate | PASSED |
| 21 | tests/functional/live/test_btn_control.py::test_btn_rapid_toggle_active | PASSED |
| 22 | tests/functional/live/test_btn_control.py::test_btn_rapid_toggle_wake | PASSED |
| 23 | tests/functional/live/test_btn_control.py::test_btn_deactivate | PASSED |
| 24 | tests/functional/live/test_btn_control.py::test_btn_standby_voice | PASSED |
| 25 | tests/functional/live/test_btn_control.py::test_btn_standby_mid | PASSED |
| 26 | tests/functional/live/test_bypass_cmd.py::test_cmd_trigger | PASSED |
| 27 | tests/functional/live/test_bypass_cmd.py::test_cmd_not_at_start | PASSED |
| 28 | tests/functional/live/test_bypass_cmd.py::test_cmd_extra_words | PASSED |
| 29 | tests/functional/live/test_bypass_cmd.py::test_standby_cmd_smart_turn | PASSED |
| 30 | tests/functional/live/test_bypass_prefix.py::test_prefix_trigger | PASSED |
| 31 | tests/functional/live/test_bypass_prefix.py::test_prefix_not_at_start | PASSED |
| 32 | tests/functional/live/test_bypass_prefix.py::test_prefix_smart_turn | FAILED |
| 33 | tests/functional/live/test_debug_logs.py::test_trace_id_scopes_retrieved_logs_to_its_own_connection | PASSED |
| 34 | tests/functional/live/test_debug_logs.py::test_missing_trace_id_query_param_returns_a_404_when_the_route_itself_is_missing | PASSED |
| 35 | tests/functional/live/test_exit_words.py::test_ux_2_1_tier1_exit_word_returns_to_standby[\u8b1d\u8b1d] | FAILED |
| 36 | tests/functional/live/test_exit_words.py::test_ux_2_1_tier1_exit_word_returns_to_standby[\u518d\u898b] | FAILED |
| 37 | tests/functional/live/test_exit_words.py::test_ux_2_1_tier1_exit_word_returns_to_standby[\u9000\u51fa] | FAILED |
| 38 | tests/functional/live/test_exit_words.py::test_ux_2_1_tier1_exit_word_returns_to_standby[\u9000\u4e0b] | PASSED |
| 39 | tests/functional/live/test_exit_words.py::test_ux_2_1_tier1_exit_word_returns_to_standby[\u6efe\u86cb] | FAILED |
| 40 | tests/functional/live/test_exit_words.py::test_ux_2_1_tier1_exit_word_returns_to_standby[\u6efe] | FAILED |
| 41 | tests/functional/live/test_exit_words.py::test_ux_2_1_tier1_exit_word_returns_to_standby[Thank you] | FAILED |
| 42 | tests/functional/live/test_exit_words.py::test_ux_2_1_tier1_exit_word_returns_to_standby[Thanks] | FAILED |
| 43 | tests/functional/live/test_exit_words.py::test_ux_2_1_tier1_exit_word_returns_to_standby[Goodbye] | FAILED |
| 44 | tests/functional/live/test_exit_words.py::test_ux_2_1_tier1_exit_word_returns_to_standby[ByeBye] | FAILED |
| 45 | tests/functional/live/test_exit_words.py::test_ux_2_1_tier1_exit_word_returns_to_standby[Quiet] | FAILED |
| 46 | tests/functional/live/test_exit_words.py::test_ux_2_1_tier1_exit_word_returns_to_standby[Shut up] | FAILED |
| 47 | tests/functional/live/test_exit_words.py::test_ux_2_1_tier1_exit_word_returns_to_standby[Dismiss] | FAILED |
| 48 | tests/functional/live/test_forced_stop.py::test_forced_vad_stop_commits_immediately[max_duration] | PASSED |
| 49 | tests/functional/live/test_forced_stop.py::test_forced_vad_stop_commits_immediately[mic_off] | PASSED |
| 50 | tests/functional/live/test_forced_stop.py::test_forced_vad_stop_commits_immediately[audio_stall] | PASSED |
| 51 | tests/functional/live/test_kws_method_manual.py::test_wake_transcript_does_not_activate_manual_mode | SKIPPED |
| 52 | tests/functional/live/test_kws_method_manual.py::test_web_ui_active_allows_speech_without_wake_stripping | SKIPPED |
| 53 | tests/functional/live/test_kws_method_manual.py::test_web_ui_standby_blocks_speech_again | SKIPPED |
| 54 | tests/functional/live/test_kws_method_manual.py::test_bypass_still_emits_in_manual_standby | SKIPPED |
| 55 | tests/functional/live/test_multiuser_concurrency.py::test_multiuser_no_errors | PASSED |
| 56 | tests/functional/live/test_multiuser_concurrency.py::test_multiuser_no_stray_user_ids | PASSED |
| 57 | tests/functional/live/test_multiuser_concurrency.py::test_multiuser_every_seat_gets_a_final | PASSED |
| 58 | tests/functional/live/test_multiuser_concurrency.py::test_multiuser_time_to_final_bounded | PASSED |
| 59 | tests/functional/live/test_multiuser_concurrency.py::test_multiuser_interim_gap_bounded | PASSED |
| 60 | tests/functional/live/test_rejection_thresholds.py::test_ux_8_2_speech_longer_than_15s_is_not_forwarded | FAILED |
| 61 | tests/functional/live/test_rejection_thresholds.py::test_ux_8_2_speech_longer_than_50_chars_is_not_forwarded | FAILED |
| 62 | tests/functional/live/test_rejection_thresholds.py::test_ux_8_2_speech_under_both_thresholds_is_forwarded_normally | PASSED |
| 63 | tests/functional/live/test_rejection_thresholds.py::test_ux_10_2_rejection_keeps_the_room_listening[over-15s] | FAILED |
| 64 | tests/functional/live/test_rejection_thresholds.py::test_ux_10_2_rejection_keeps_the_room_listening[over-50-chars] | FAILED |
| 65 | tests/functional/live/test_remaining_ux_gaps.py::test_non_wake_speech_never_activates[multiuser-10s.wav] | PASSED |
| 66 | tests/functional/live/test_remaining_ux_gaps.py::test_non_wake_speech_never_activates[stress-90s.wav] | PASSED |
| 67 | tests/functional/live/test_remaining_ux_gaps.py::test_ten_second_prompt_stage_exists_end_to_end | FAILED |
| 68 | tests/functional/live/test_remaining_ux_gaps.py::test_command_wait_timeout_boundary[490ms-one-turn] | FAILED |
| 69 | tests/functional/live/test_remaining_ux_gaps.py::test_command_wait_timeout_boundary[510ms-two-turns] | PASSED |
| 70 | tests/functional/live/test_smart_turn_bypass.py::test_standby_smart_turn_prefix_2nd | PASSED |
| 71 | tests/functional/live/test_smart_turn_bypass.py::test_standby_smart_turn_cmd_2nd | PASSED |
| 72 | tests/functional/live/test_smart_turn_wake.py::test_standby_smart_turn_wake_2nd | PASSED |
| 73 | tests/functional/live/test_smart_turn_wake.py::test_active_smart_turn_wake_2nd | PASSED |
| 74 | tests/functional/live/test_standby.py::test_standby_rejection | PASSED |
| 75 | tests/functional/live/test_standby.py::test_standby_wake_not_at_start | PASSED |
| 76 | tests/functional/live/test_stt_config.py::test_custom_stt_config_active | PASSED |
| 77 | tests/functional/live/test_stt_config.py::test_custom_stt_config_deleted | PASSED |
| 78 | tests/functional/live/test_timeout.py::test_timeout_deactivate | PASSED |
| 79 | tests/functional/live/test_timeout.py::test_timeout_reset | PASSED |
| 80 | tests/functional/live/test_wake.py::test_wake_immediate | PASSED |
| 81 | tests/functional/live/test_wake.py::test_wake_pause | PASSED |
| 82 | tests/functional/live/test_wake_factory_words.py::test_wake_hi_foxtron | PASSED |
| 83 | tests/functional/live/test_wake_latency.py::test_wake_to_agent_active_fits_the_ui_budget | FAILED |
| 84 | tests/functional/live/test_wake_latency.py::test_wake_only_greeting_fits_the_response_budget | FAILED |
| 85 | tests/functional/live/test_wake_rate.py::test_ux_1_1_wake_rate_meets_the_90_percent_floor[\u55e8\u9d3b\u83ef] | PASSED |
| 86 | tests/functional/live/test_wake_rate.py::test_ux_1_1_wake_rate_meets_the_90_percent_floor[Hi Foxtron] | PASSED |
| 87 | tests/functional/live/test_wake_rate.py::test_ux_1_1_false_wake_floor_is_zero_over_repeated_replays[multiuser-10s] | PASSED |
| 88 | tests/functional/live/test_wake_rate.py::test_ux_1_1_false_wake_floor_is_zero_over_repeated_replays[say-wake-midsentence] | PASSED |
| 驗證範圍 | 命令/環境 |
|---|---|
| Targeted offline | .venv/bin/python -m pytest -q tests/test_kws_method_config.py tests/test_kws_method_policy.py tests/test_status_page_settings.py tests/test_eot_state.py tests/test_turn_arbitration.py |
| Offline full | UV_NO_SYNC=1 ASR_PORT=65534 ./tests/test.sh -q(live 另以隔離容器執行) |
| Default STT live | UV_NO_SYNC=1 HOST_PORT=19342 IMAGE=kitt-stt:rebase-20260905 ./tests/docker-test.sh --build · RTX 4090 / CUDA |
| Manual live | UV_NO_SYNC=1 HOST_PORT=19343 IMAGE=kitt-stt:rebase-20260905 KWS_METHOD=manual LIVE_TEST_TARGET=tests/functional/live/test_kws_method_manual.py ./tests/docker-test.sh --build |
| 490ms 單項重測 | UV_NO_SYNC=1 HOST_PORT=19344 IMAGE=kitt-stt:rebase-20260905 LIVE_TEST_TARGET='tests/functional/live/test_remaining_ux_gaps.py::test_command_wait_timeout_boundary[490ms-one-turn]' ./tests/docker-test.sh --build -s · CUDA |
| Static | Branch runtime/config 與 KWS 測試 Ruff;method/config/policy 測試 scoped Pyright;bash -n、git diff --check |
下列為本機 log 路徑,非雲端下載連結。
| 範圍 | 本機紀錄 |
|---|---|
| Offline | /tmp/kitt-stt-rebase-20260905-offline-closeout.log |
| STT live | /tmp/kitt-stt-rebase-20260905-live-rerun.log |
| Manual live | /tmp/kitt-stt-rebase-20260905-manual.log |
| 490ms 重測 | /tmp/kitt-stt-490ms-retest-u10L7Z.log |
文件/traceability 檢查:61 passed/1 skipped(未使用數字編號章節);頁內連結另以瀏覽器檢查。110 個 SW ID 全數保留。文件整理未重跑 runtime,執行結果日期見驗證基準。
test_command_wait_timeout_boundary[490ms-one-turn]:預期 1 個 final,實際為「打開車窗。」與「打開車門。」兩個 final,與本次全套測試的失敗相同。測試程式在兩段之間加入 490ms 等待,停頓不在原始 WAV 中。ai-agent-ux-alignment cycle 已將 500ms 需求列為 MISSING;該輪測試註解寫 490ms 為 RED,報告卻記為通過。歷史紀錄不一致,尚未判定此失敗是否為本輪回歸。