Files
ISISeg/工程分析/实现方案-2026-05-19-00-11-40.md

32 lines
1.3 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.
# 实现方案
开始时间2026-05-19-00-11-40
## Ubuntu 工具目录
新增 `Tools_scripts_XunFei-Ubuntu/`
- `requirements-ubuntu.txt`Ubuntu 脚本所需 Python 依赖。
- `xfyun_tts_ubuntu.py`:核心讯飞 TTS 脚本,支持普通 TTS 与超拟人 TTS。
- `synthesize_xfyun_tts.sh`:普通 TTS Bash 包装入口。
- `synthesize_xfyun_super_tts.sh`:超拟人 TTS Bash 包装入口。
- `check_audio_duration.sh`:检查音频时长的小工具。
- `build_final_video_ubuntu.py`:将单个视频与配音音频合成为最终视频,并根据配音时长自动调整画面速度。
## Ubuntu 工作流文档
新增 `配音生成工作流-Ubuntu-Agent.md`
- 说明目录结构、依赖安装和环境变量配置。
- 说明配音稿格式。
- 给出普通 TTS、超拟人 TTS、音频时长检查、视频合成的命令示例。
- 给出 Agent 执行清单和常见问题。
## 实现要点
- Python TTS 脚本通过 HMAC-SHA256 生成讯飞 WebSocket 鉴权 URL。
- 配音稿解析兼容 `## 1.``## 4.` 分段格式。
- `--dry-run` 可在无讯飞凭证时验证配音稿解析结果。
- 视频合成脚本使用 `ffprobe` 计算视频与音频时长,并用 `setpts=PTS/speed` 让画面匹配旁白。
- 输出视频使用 H.264/AAC、yuv420p、faststart保证浏览器兼容。