Files
digital-human-lipsync-service/docs/architecture.md
T
2026-06-20 17:16:11 +08:00

36 lines
1.2 KiB
Markdown
Raw 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.
# 架构说明
## 数据流
```mermaid
flowchart LR
A["aIzhinengti 数字人任务"] --> B["scripts/digital_human_process.py"]
B --> C["Gradio Client"]
C --> D["本项目 /process_single"]
D --> E{"LIPSYNC_BACKEND"}
E --> F["ffmpeg_mux 链路验证"]
E --> G["command 外部模型命令"]
E --> H["未来专用模型后端"]
F --> I["outputs/*.mp4"]
G --> I
H --> I
I --> B
B --> A
```
## 模块职责
- `config.py`:从环境变量读取配置,创建输出/临时目录。
- `app.py`:创建 Gradio UI 和 `/process_single` API。
- `backends.py`:规范化输入文件,调用不同后端,返回输出视频路径。
- `scripts/start.ps1`Windows 启动入口。
- `scripts/test-client.ps1`:模拟主项目 Gradio client 调用。
## 当前实现状态
当前已经具备最小可运行服务骨架,但真实口型同步能力还没有接入。默认后端只做音频封装,便于先验证主项目能不能访问服务。
## 推荐演进
第一阶段不要急着改 Gradio 接口,先保持 `/process_single` 稳定。真实模型接入优先放到 `command` 后端,跑通后再封装专用 Python 后端。