merge: resolve conflicts with M5Max128 local changes

This commit is contained in:
M5Max128
2026-05-21 01:11:44 +08:00
parent bebaa743ed
commit 80812128e2
4 changed files with 34 additions and 4 deletions

View File

@@ -39,6 +39,7 @@ python3.11 scripts/demo_runner.py demo.json --voice en_US
| `markdown` | 用 md_reader Preview 渲染 .md 文件(含 Mermaid | `cmd`(檔案路徑) |
| `note` | 純文字解說 | `note` |
| `separator` | 章節分隔線 | `label` |
| `ask` | 互動問答 — 問問題、等回應、顯示解答 | `question`, `answer` |
## JSON 腳本結構
@@ -66,6 +67,12 @@ python3.11 scripts/demo_runner.py demo.json --voice en_US
"note": "說明文字",
"cmd": "docs_v1.0/API_V1.0.0/API_USAGE_GUIDE_V1.0.0.md",
"focus": "自動聚焦的章節名稱"
},
{
"type": "ask",
"label": "互動問答",
"question": "問題文字(語音會朗讀)",
"answer": "解答文字(語音會朗讀)"
}
]
}
@@ -92,7 +99,7 @@ python3.11 scripts/demo_runner.py demo.json --voice en_US
## 語音指令(--voice-control
啟用麥克風語音控制,可用說的操作展示流程:
啟用 Display Audio 麥克風語音控制,可用說的操作展示流程:
```bash
python3 scripts/demo_runner.py demo.json --voice zh_TW --voice-control
@@ -105,7 +112,25 @@ python3 scripts/demo_runner.py demo.json --voice zh_TW --voice-control
| "重複" | "repeat" / "again" | 重複朗讀當前解說 |
| "跳到第 5 步" | "go to 5" | 跳到指定步驟 |
語音辨識使用 Google Speech Recognition需網路),背景執行不影響主流程。
語音辨識使用 **faster-whisper small**(離線、中英雙語),背景執行不影響主流程。
模型快取:`~/.cache/huggingface/hub/models--Systran--faster-whisper-small/`
## 互動問答ask 步驟)
`ask` 步驟讓展示系統問問題、等待使用者回答、顯示預設解答:
-`--voice-control` 時:自動錄音 4 秒 → faster-whisper 轉文字 → 顯示辨識結果
- 無語音控制時鍵盤輸入Enter 送出)
- 解答由 TTS 朗讀 + 螢幕顯示
```json
{
"type": "ask",
"label": "互動問答",
"question": "您知道 Momentry Core 可以分析哪些類型的資料嗎?",
"answer": "可以分析影片中的人臉、文字、物件、姿勢、聲音等。"
}
```
## 展示節奏
@@ -155,5 +180,5 @@ python3 scripts/demo_runner.py demo.json --voice zh_TW --voice-control
| 檔案 | 說明 |
|------|------|
| `scripts/demo_runner.py` | 執行器主程式 |
| `docs_v1.0/API_V1.0.0/DEMO_SCRIPT_v1.0.0.json` | 21 步驟預設展示腳本 |
| `docs_v1.0/API_V1.0.0/DEMO_SCRIPT_v1.0.0.json` | 23 步驟預設展示腳本(含 ask 互動問答) |
| `~/_md_reader/target/release/md_reader` | Markdown 渲染工具 |