verify_delivery/README.md
2026-06-14 16:16:01 +08:00

85 lines
1.9 KiB
Markdown
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# verify-delivery-service
KTV产线交付质检HTTP服务 — 4项QA检查
## 服务说明
将KTV产线的交付质检流程封装为HTTP服务提供统一的质检入口。
### 4项QA检查
1. **QA1 字幕时间精准性** — 时间单调递增、无重叠、无gap>2s
2. **QA2 字幕歌词正确性** — ASS中歌词与原始歌词逐行比对
3. **QA3 MTV使用原音频** — 单轨、duration匹配原曲
4. **QA4 KTV双轨音序** — Track1=伴奏(Accompaniment), Track2=原唱(Original)
## 部署
```bash
git clone git@git.opencomputing.cn:yumoqing/verify_delivery.git
cd verify_delivery
chmod +x start.sh stop.sh
./start.sh
```
服务运行在 `http://0.0.0.0:9085`
## API端点
### GET /api/status
服务状态检查
### POST /api/submit
提交质检任务
参数:
- `mtv_path`: MTV视频路径可选
- `ktv_path`: KTV视频路径可选
- `ass_path`: ASS字幕路径可选
- `lyrics_path`: 原始歌词路径(可选)
- `calibrated_path`: calibrated.json路径可选用于QA1
- `original_duration`: 原曲时长(秒,可选)
返回:
```json
{
"status": "submitted",
"task_id": "xxx",
"message": "质检任务已提交"
}
```
### GET /api/task?task_id=xxx
查询质检任务结果
返回:
```json
{
"task_id": "xxx",
"status": "completed",
"result": {
"status": "PASSED",
"qa_results": {
"QA1_timeline": {"passed": true, "errors": []},
"QA2_lyrics": {"passed": true, "errors": []},
"QA3_mtv": {"passed": true, "errors": []},
"QA4_ktv": {"passed": true, "errors": []}
},
"total_errors": 0,
"errors": []
}
}
```
## 技术栈
- ahserver (ahserver.webapp)
- longtasks (异步任务队列)
- ffprobe (视频/音频元数据提取)
- Python 3.10
## Git仓库
- 远端:`git@git.opencomputing.cn:yumoqing/verify_delivery.git`
- 本地:`~/test/verify-delivery-service/`