Files
2026-06-20 17:16:11 +08:00

64 lines
1.5 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.
# aIzhinengti 接入说明
## 1. 主项目调用点
主项目会通过 `scripts/digital_human_process.py` 调用 Gradio
```python
client = Client(api_url)
result = client.predict(
audio_file=handle_file(audio_file),
video_file={"video": handle_file(video_file)},
api_name="/process_single",
)
```
所以本服务必须保持 `/process_single` 接口可用。
## 2. 主项目中如何填写
`aIzhinengti` 数字人页面:
1. 打开设置。
2. `数字人模型` 选择 `自主算力机`
3. `数字人API地址` 填本服务地址,例如 `http://127.0.0.1:7860/`
4. 如果不用 CompShare 启停机器,服务器 ID 可以先填占位值用于通过界面校验。
5. 手动启动本服务,不依赖主项目启动按钮。
## 3. 本项目侧验证
先启动服务:
```powershell
cd D:\WYF-project\digital-human-lipsync-service
.\scripts\start.ps1
```
再用测试客户端:
```powershell
.\scripts\test-client.ps1 -Audio C:\test\audio.wav -Video C:\test\avatar.mp4
```
## 4. 主项目脚本验证
也可以直接用主项目脚本验证:
```powershell
cd D:\WYF-project\aIzhinengti
python .\scripts\digital_human_process.py http://127.0.0.1:7860/ C:\test\audio.wav C:\test\avatar.mp4
```
期望返回:
```json
{
"success": true,
"videoPath": "..."
}
```
## 5. 接口不要随意改
不要把 `/process_single` 改成其它名字;不要改输入参数名;不要改成多个输出组件。主项目脚本当前按固定协议解析。