[真实流程命令]:完成完整链路自测入口,包含真实Provider CLI、播放验收和文档测试

This commit is contained in:
mkbk
2026-06-17 23:57:24 +08:00
parent b2822dc1af
commit b9b501cf74
9 changed files with 462 additions and 3 deletions
+9
View File
@@ -114,6 +114,14 @@ python3.11 scripts/download_speech_models.py --dir models
.venv/bin/python -m owner_voice_pet simulate-live --turns 2 --fixture /tmp/owner-simulated-mic.jsonl
```
真实 Provider 完整链路自测:
```bash
.venv/bin/python -m owner_voice_pet real-live-check --turns 2
```
这个命令不用真人对着麦克风说话,会用 macOS `say/afconvert` 生成“小杰小杰”和两轮问题音频,再驱动真实 `VoiceAssistantPipeline`:本地 KWS、本地 VAD、本地降噪、本地实时字幕、本地 final STT、云端 LLM、本地 TTS、Transport 播放、恢复待机都会跑到。默认会真实播放 ACK 和回复;如果只想检查链路但不发声,可以加 `--no-playback`。输出 JSON 中 `success=true` 表示完整链路通过,并会检查第二轮 LLM 请求是否携带第一轮临时历史。
单轮验收:
```bash
@@ -134,6 +142,7 @@ python3.11 scripts/download_speech_models.py --dir models
.venv/bin/python -m compileall src tests scripts
.venv/bin/python -m unittest discover -s tests
.venv/bin/python -m owner_voice_pet simulate-live --turns 2
.venv/bin/python -m owner_voice_pet real-live-check --turns 2
.venv/bin/python -m owner_voice_pet acceptance
.venv/bin/python -m owner_voice_pet validate-assets
.venv/bin/python -m owner_voice_pet security-check