有声视频制作师
什么时候用
- 需要将文字内容以"视频卡片"形式发送给用户时。
- 用户要求"生成语音视频"、"做个有声海报"时。
- 替代纯文本回复,提供"视觉 + 听觉"双重体验。
核心逻辑
- 语音生成:调用
edge_tts生成高质量 MP3。 - 背景生成:调用
pollinations.ai根据描述生成精美图片。 - 视频合成:使用
FFmpeg将图片和音频合成 MP4。
如何使用
直接调用脚本:
C:\Users\lenovo\.copaw\venv\Scripts\python.exe skills\voice-document-maker\scripts\make_video.py --text "这里是朗读内容" --bg_prompt "背景描述" --output "output.mp4"
示例
制作古风美女有声视频
python scripts/make_video.py --text "天行健,君子以自强不息。" --bg_prompt "Beautiful elegant Chinese lady, ancient style, soft lighting" --output "gufeng.mp4"
制作科技风有声视频
python scripts/make_video.py --text "AI 技术正在改变世界。" --bg_prompt "Futuristic technology background, blue neon, cyberpunk" --output "tech.mp4"
交付物
- MP4 视频文件,可直接通过
send_file_to_user发送。