From f6eca8e186a14605c30a66d2e298504e94cef824 Mon Sep 17 00:00:00 2001 From: wehub-resource-sync Date: Mon, 13 Jul 2026 09:51:04 +0000 Subject: [PATCH] docs: preserve upstream English README --- README.en.md | 481 +++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 481 insertions(+) create mode 100644 README.en.md diff --git a/README.en.md b/README.en.md new file mode 100644 index 0000000..913c8c5 --- /dev/null +++ b/README.en.md @@ -0,0 +1,481 @@ +
+ +# MoneyPrinterTurbo 💸 + +### 一站式 AI 短视频生成工具 + +只需提供视频主题关键词,即可自动生成视频脚本、匹配素材、生成字幕和背景音乐,并合成高清短视频。 + +[![Version](https://img.shields.io/github/v/release/harry0703/MoneyPrinterTurbo?color=blue&label=version)](https://github.com/harry0703/MoneyPrinterTurbo/releases) +[![Platform](https://img.shields.io/badge/platform-Windows%20%7C%20macOS%20%7C%20Linux-lightgrey.svg)](https://github.com/harry0703/MoneyPrinterTurbo/releases/latest) +[![Python](https://img.shields.io/badge/python-3.11%2B-3776AB?logo=python&logoColor=white)](https://www.python.org/) +[![Downloads](https://img.shields.io/github/downloads/harry0703/MoneyPrinterTurbo/total)](https://github.com/harry0703/MoneyPrinterTurbo/releases/latest) + +harry0703%2FMoneyPrinterTurbo | Trendshift +Star History Rank + +简体中文 | [English](README-en.md) | [版本发布](https://github.com/harry0703/MoneyPrinterTurbo/releases) | [问题反馈](https://github.com/harry0703/MoneyPrinterTurbo/issues) + +
+ +## 界面预览 🖥️ + +

WebUI

+ +![](docs/webui.jpg) + +

API

+ +![](docs/api.jpg) + +## 特别感谢 ❤️ + +
+ Kimi 赞助 MoneyPrinterTurbo +
+ +感谢 [Kimi](https://platform.kimi.com?aff=MoneyPrinterTurbo) 赞助本项目![Kimi K2.7 Code](https://platform.kimi.com/docs/guide/kimi-k2-7-code-quickstart) 是 Moonshot AI 推出的编程专用开源智能体模型,在真实长程编程与复杂软件工程工作流中显著提升端到端任务成功率,同时优化推理效率,相比 K2.6 平均减少约 30% 的推理 token 消耗。而在本项目中,Kimi 大模型能直接驱动视频创作,不仅撰写视频文案,还会提炼素材搜索关键词、决定成片画面,文案理解越精准,匹配到的素材就越贴题。 + +**本项目已接入 Kimi 大模型。前往 [Kimi 开放平台](https://platform.kimi.com?aff=MoneyPrinterTurbo)([中文站](https://platform.kimi.com?aff=MoneyPrinterTurbo)|[Global](https://platform.kimi.ai?aff=MoneyPrinterTurbo))体验 API,或了解高性价比 [Coding Plan 套餐](https://www.kimi.com/code?aff=MoneyPrinterTurbo)。** +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
+ 火山引擎
+ 火山引擎 +
+ 感谢 火山引擎 赞助了本项目!方舟 Agent Plan 模型订阅套餐集成了包含 Doubao-Seed、Doubao-Seedance、Doubao-Seedream 等在内的字节跳动自研 SOTA 级模型,覆盖文本、代码、图像、视频等多模态任务。最新支持 MiniMax-M3、DeepSeek-V4 系列、GLM-5.2、Doubao-Seed-2.0 系列、Kimi-K2.7 等模型,工具不限。超全模态模型与 Harness 升级一步到位,深度支持 Agent 框架与 AI 编程工具。一次订阅,可以为不同任务切换合适的 AI 引擎。方舟 Agent Plan 限时 2.5 折订阅,点击链接抢购,名额有限,先到先得。 +
+ CCSub
+ CCSub +
+ 感谢 CCSub 赞助本项目!CCSub 是稳定、实惠的 AI API 中转平台,是 Claude Code 官方订阅的超强平替。一个 API Key 即可调用 Claude Opus 4.8、Sonnet 4.6、Haiku 4.5、GPT-5、Gemini 等模型,价格约为官方直连的 1/3,全球直连无需梯子。兼容 Claude Code、Codex、Cursor、Cline、Continue、Windsurf 等所有主流 AI 编程工具。前往 www.ccsub.net 注册即送 $5 体验额度。 +
+ 优云智算
+ 优云智算 +
+ 感谢 优云智算 赞助本项目!优云智算是 UCloud 旗下 AI 云平台,一站式提供国内外主流模型的 API 服务,一个 Key 即可调用所有模型。主打高性价比国产模型 CodingPlan 套餐(GLM5.2、Deepseek-v4等),同时提供官方转发的稳定海外模型通道,满足多场景开发需求。已兼容 Claude Code、Codex 等主流 AI 编程工具及通用 API 调用,支持企业级高并发、7×24 技术支持和自助开票。点击注册,最高可获得 ¥10 免费体验金。 +
+ Cubence
+ Cubence +
+ 感谢 Cubence 对本项目的支持。Cubence 是一家专注于 AI 模型 API 接入服务的平台,致力于为开发者和团队提供稳定、便捷的模型调用体验。自 2025 年 9 月上线以来,Cubence 已支持 Claude Code、Codex、Gemini 等多种 AI 模型与开发工具相关的 API 接入场景,适合需要统一管理和调用多模型能力的用户使用。Cubence 为本开源项目用户提供了专属优惠码:MPT。首次购买时使用该优惠码,可享受 9 折优惠。 +
+ 录咖
+ 录咖 AI +
+ 由于该项目的 部署使用,对于一些小白用户来说,还是 有一定的门槛,在此特别感谢 录咖(AI智能 多媒体服务平台) 网站基于该项目,提供的免费 AI视频生成器 服务,可以不用部署,直接在线使用,非常方便。 +
+ 佐糖
+ 佐糖 +
+ 感谢 佐糖 对该项目的支持和赞助,使得该项目能够持续的更新和维护。佐糖专注于图像处理领域,提供丰富的图像处理工具,将复杂操作极致简化,真正实现让图像处理更简单。 +
+ +## 功能特性 🎯 + +- [x] 提供 **AI Agent**、**WebUI**、**API** 和 **CLI** 四种使用方式,代码按控制器、服务和模型等职责分层 +- [x] 支持 **AI 自动生成视频脚本**,也可以使用自定义脚本 +- [x] 支持多种 **高清视频** 尺寸 + - [x] 竖屏 9:16,`1080x1920` + - [x] 横屏 16:9,`1920x1080` +- [x] 支持 **批量视频生成**,可以一次生成多个视频,然后选择一个最满意的 +- [x] 支持 **视频片段时长** 设置,方便调节素材切换频率 +- [x] 支持 **多语言视频脚本** 生成 +- [x] 支持 **Edge TTS**、**Azure Speech**、**SiliconFlow**、**Google Gemini**、**小米 MiMo**、**ElevenLabs** 和 **Chatterbox** 语音合成,可实时试听 +- [x] 支持 **字幕生成**,可调整字体、位置、颜色、大小、描边和背景样式 +- [x] 支持 **背景音乐**,可随机选择或使用指定音乐,并调整音量 +- [x] 支持使用自己的 **本地素材**,也可从 **Pexels**、**Pixabay** 和 **Coverr** 获取可免费使用的高清素材 +- [x] 支持 **Kimi / Moonshot AI**、**OpenAI**、**Google Gemini**、**DeepSeek**、**阿里云通义千问**、**Microsoft Azure OpenAI**、**火山引擎方舟**、**xAI Grok**、**MiniMax**、**小米 MiMo** 等主流模型服务,并兼容 **Cloudflare AI Gateway**、**魔搭 ModelScope**、**AIHubMix**、**AIML API**、**EvoLink**、**Ollama**、**OneAPI**、**LiteLLM**、**Groq**、**Pollinations AI** 等统一网关、聚合平台和本地运行环境 +- [x] 支持一键 **跨平台发布**,生成完成后可自动上传至 **TikTok**、**Instagram** 和 **YouTube Shorts** + +## 作品展示 🎬 + +以下示例均由 MoneyPrinterTurbo 实际生成。 + +### 竖屏 9:16 + + + + + + + + + + + + + + +
城市醒来的时刻
城市醒来的时刻
中文 · 14 秒
清洁能源的未来
清洁能源的未来
中文 · 24 秒
为什么我们仍要探索太空
为什么我们仍要探索太空
中文 · 27 秒
一粒种子的旅程
一粒种子的旅程
中文 · 44 秒
The Future of Everyday Robotics
The Future of Everyday Robotics
English · 21 sec
Small Habits, Lasting Change
Small Habits, Lasting Change
English · 19 sec
Making Space for Creative Work
Making Space for Creative Work
English · 20 sec
The Science Inside Coffee
The Science Inside Coffee
English · 23 sec
+ +### 横屏 16:9 + + + + + + + + + + + + + + +
深海里的微光
深海里的微光
中文 · 23 秒
阅读如何塑造我们
阅读如何塑造我们
中文 · 23 秒
一杯手冲咖啡的细节
一杯手冲咖啡的细节
中文 · 23 秒
春天适合出发
春天适合出发
中文 · 14 秒
Why Ocean Conservation Matters
Why Ocean Conservation Matters
English · 25 sec
Designing More Sustainable Cities
Designing More Sustainable Cities
English · 27 sec
What Mountains Teach Us
What Mountains Teach Us
English · 18 sec
A Brief History of Human Flight
A Brief History of Human Flight
English · 59 sec
+ +## 配置要求 📦 + +- 建议系统:Windows 10、macOS 11.0 或更高版本,以及主流 Linux 发行版 +- 本地部署需要 Python 3.11 或更高版本,推荐使用 Python 3.11 +- GPU 不是必需项,但如果你希望本地转录、更快的视频处理或更顺畅的批量生成体验,建议使用带显存的独立显卡 + +| 项目 | 最低配置 | 推荐配置 | 理想配置 | +| ---- | -------- | --------------- | --------------- | +| CPU | 4 核 | 6 到 8 核 | 8 核及以上 | +| RAM | 4 GB | 8 GB | 16 GB 及以上 | +| GPU | 非必须 | 4 GB 显存及以上 | 8 GB 显存及以上 | + +- 如果你主要依赖云端 LLM、云端 TTS 和在线素材源,CPU 与内存比 GPU 更重要 +- 如果你启用 `faster-whisper`、批量生成或更重的本地处理链路,GPU 会明显提升速度 + +## 快速开始 🚀 + +### 推荐使用方式 + +- 不想手动安装和配置:直接使用 AI Agent 生成视频 +- Windows 用户:优先使用一键启动包,适合快速体验 +- macOS / Linux 用户:优先使用 `uv` 进行本地部署 +- 想要隔离运行环境:优先使用 Docker 部署 + +### 使用 AI Agent 生成视频 + +如果你的 AI Agent 支持读取 Skill 文档并操作本地终端,可以直接发送下面这段话。Agent 会自动完成安装、配置和视频生成;只有缺少必要的 API Key 时才会向你询问,完成后会返回生成的视频文件路径。目前支持 macOS 和 Windows。 + +```text +使用这个 Skill:https://raw.githubusercontent.com/harry0703/MoneyPrinterTurbo/main/docs/skill/SKILL.md +帮我生成一个主题为“人工智能如何改变普通人的日常生活”的视频。 +``` + +### 在 Google Colab 中运行 + +免去本地环境配置,点击直接在 Google Colab 中快速体验 MoneyPrinterTurbo + +[![Open in Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/harry0703/MoneyPrinterTurbo/blob/main/docs/MoneyPrinterTurbo.ipynb) + +### Windows 一键启动包 + +下载一键启动包,解压直接使用(路径不要有 **中文**、**特殊字符**、**空格**) + +- GitHub Releases:https://github.com/harry0703/MoneyPrinterTurbo/releases/latest + +下载后,建议先**双击执行** `update.bat` 更新到**最新代码**,然后双击 `start.bat` 启动 + +启动后,会自动打开浏览器(如果打开是空白,建议换成 **Chrome** 或者 **Edge** 打开) + +## 安装部署 📥 + +### 前提条件 + +- 本地部署需要 Python 3.11 或更高版本 +- Windows 用户建议避免使用包含中文、特殊字符或空格的项目路径 + +#### ① 克隆代码 + +```shell +git clone https://github.com/harry0703/MoneyPrinterTurbo.git +``` + +#### ② 配置项目(可选) + +首次启动时,项目会根据 `config.example.toml` 自动创建 `config.toml`。大模型 Provider、素材来源和相关 API Key 可以直接在 WebUI 的基础设置中配置。 + +### Docker 部署 🐳 + +#### ① 启动 Docker + +如果未安装 Docker,请先安装 https://www.docker.com/products/docker-desktop/ + +Windows 用户可以参考微软的文档: + +1. https://learn.microsoft.com/zh-cn/windows/wsl/install +2. https://learn.microsoft.com/zh-cn/windows/wsl/tutorials/wsl-containers + +```shell +cd MoneyPrinterTurbo +docker compose -f docker-compose.release.yml up +``` + +> 默认推荐使用 `docker-compose.release.yml`,它会直接拉取 GitHub Container Registry 上的预构建镜像:`ghcr.io/harry0703/moneyprinterturbo:latest`。 +> 如果你需要本地重新构建镜像,可以继续使用 `docker compose up`。 +> 首次启动前,请将 `config.example.toml` 复制为 `config.toml`,供容器挂载使用。 + +#### ② 访问 WebUI + +打开浏览器,访问 http://127.0.0.1:8501 + +#### ③ 访问 API 文档 + +打开浏览器,访问 http://127.0.0.1:8080/docs 或者 http://127.0.0.1:8080/redoc + +### 手动部署 📦 + +> 视频教程 + +- 完整的使用演示:https://v.douyin.com/iFhnwsKY/ +- 如何在 Windows 上部署:https://v.douyin.com/iFyjoW3M + +#### ① 创建虚拟环境 + +推荐使用 [uv](https://docs.astral.sh/uv/) 管理 Python 环境和依赖。项目支持 Python 3.11 或更高版本,以下示例使用 Python 3.11。 + +```shell +git clone https://github.com/harry0703/MoneyPrinterTurbo.git +cd MoneyPrinterTurbo +uv python install 3.11 +uv sync --frozen +``` + +如果你暂时不使用 `uv`,也可以继续使用 `venv + pip` + +```shell +python3.11 -m venv .venv +source .venv/bin/activate +pip install -r requirements.txt +``` + +说明: + +- `pyproject.toml` 是主依赖定义文件 +- `uv.lock` 是锁文件,建议默认执行 `uv sync --frozen` +- `requirements.txt` 仅保留给旧的 `pip` 安装方式兼容使用 + +#### ② 启动 WebUI 🌐 + +注意需要到 MoneyPrinterTurbo 项目 `根目录` 下执行以下命令 + +###### Windows + +```powershell +.\webui.bat +``` + +在 CMD 中也可以执行 `webui.bat`。 +`webui.bat` 会优先使用项目 `.venv` 或一键包内置 Python;如果没有找到项目 Python,但已安装 `uv`,会自动切换为 `uv run streamlit`。 +如需允许局域网内其他设备访问 WebUI,可以先执行 `set MPT_WEBUI_HOST=0.0.0.0`,再运行 `webui.bat`。 + +###### macOS 或 Linux + +```shell +sh webui.sh +``` + +脚本会自动使用项目虚拟环境或 `uv`,并选择可用的本地端口。如需允许局域网内其他设备访问,可以执行: + +```shell +MPT_WEBUI_HOST=0.0.0.0 sh webui.sh +``` + +启动后,会自动打开浏览器(如果打开是空白,建议换成 **Chrome** 或者 **Edge** 打开) + +#### ③ 启动 API 服务 🚀 + +```shell +uv run python main.py +``` + +如果你已经手动激活了虚拟环境,也可以直接执行: + +```shell +python main.py +``` + +#### ④ 纯命令行方式(无浏览器)⌨️ + +如果你无法使用浏览器或端口转发,可以直接在命令行生成视频。最简单的完整视频生成命令如下: + +```shell +uv run python cli.py --video-subject "人工智能如何改变日常生活" +``` + +如需查看完整命令、参数说明和使用方法,可以执行: + +```shell +uv run python cli.py --help +``` + +## 语音合成 🗣 + +默认使用免费的 **Edge TTS**,在 WebUI 中显示为 **Azure TTS V1**。项目同时支持 **Azure TTS V2**、**SiliconFlow TTS**、**Google Gemini TTS**、**小米 MiMo TTS**、**ElevenLabs TTS**、自托管 **Chatterbox TTS**,以及无配音模式。 + +可直接在 WebUI 中选择 Provider 和音色,并按照界面提示填写所需凭据。Edge TTS 不需要 API Key;[Azure TTS V2](https://portal.azure.com/) 及其他云端服务需要对应平台的凭据。Edge TTS 音色可查看:[音色列表](./docs/voice-list.txt)。 + +## 字幕生成 📜 + +当前支持两种字幕生成方式: + +- **edge**:使用 TTS 时间戳生成字幕,速度快,不需要 GPU,默认使用该模式。 +- **whisper**:使用本地 `faster-whisper` 转写音频,适用于需要更准确字幕时间轴的场景。首次使用时需要下载模型。 + +在 `config.toml` 中修改 `subtitle_provider` 即可切换模式。Whisper 默认使用约 3 GB 的 `large-v3`;如需更小、更快的模型,可以使用约 1.6 GB 的 `large-v3-turbo`: + +```toml +[app] +subtitle_provider = "whisper" + +[whisper] +model_size = "large-v3-turbo" +``` + +> 首次使用 Whisper 时,程序会自动从 Hugging Face 下载模型。如果当前网络无法自动下载,可以从 [Hugging Face](https://huggingface.co/Systran/faster-whisper-large-v3) 手动下载 `whisper-large-v3`。 + +下载并解压后,将整个目录放到 `.\MoneyPrinterTurbo\models`,最终路径应为 `.\MoneyPrinterTurbo\models\whisper-large-v3`: + +``` +MoneyPrinterTurbo + ├─models + │ └─whisper-large-v3 + │ config.json + │ model.bin + │ preprocessor_config.json + │ tokenizer.json + │ vocabulary.json +``` + +## 背景音乐 🎵 + +用于视频的背景音乐,位于项目的 `resource/songs` 目录下。 + +> 当前项目里面放了一些默认的音乐,来自于 YouTube 视频,如有侵权,请删除。 + +## 字幕字体 🅰 + +用于视频字幕的渲染,位于项目的 `resource/fonts` 目录下,你也可以放进去自己的字体。 + +## 常见问题 🤔 + +
+如何发布到 TikTok、Instagram 或 YouTube Shorts? + +注册 [Upload-Post](https://upload-post.com/) 账号并获取 API Key,然后在 `config.toml` 的 `[app]` 下添加以下配置: + +```toml +[app] +upload_post_enabled = true +upload_post_api_key = "your-api-key" +upload_post_username = "your-username" +upload_post_platforms = ["tiktok", "instagram", "youtube"] +upload_post_auto_upload = true +upload_post_youtube_privacy_status = "public" +``` + +保存配置并重启项目。视频生成完成后,程序会自动发布到已配置的平台。YouTube 可见性可设置为 `public`、`unlisted` 或 `private`。 + +
+ +
+RuntimeError: No ffmpeg exe could be found + +通常情况下,ffmpeg 会被自动下载,并且会被自动检测到。 +但是如果你的环境有问题,无法自动下载,可能会遇到如下错误: + +``` +RuntimeError: No ffmpeg exe could be found. +Install ffmpeg on your system, or set the IMAGEIO_FFMPEG_EXE environment variable. +``` + +此时你可以从 https://www.gyan.dev/ffmpeg/builds/ 下载ffmpeg,解压后,设置 `ffmpeg_path` 为你的实际安装路径即可。 + +```toml +[app] +# 请根据你的实际路径设置,注意 Windows 路径分隔符为 \\ +ffmpeg_path = "C:\\Users\\harry\\Downloads\\ffmpeg.exe" +``` + +
+ +
+OSError: [Errno 24] Too many open files + +这个问题是由于系统打开文件数限制导致的,可以通过修改系统的文件打开数限制来解决。 + +查看当前限制 + +```shell +ulimit -n +``` + +如果过低,可以调高一些,比如 + +```shell +ulimit -n 10240 +``` + +
+ +
+Whisper 模型下载失败 + +``` +LocalEntryNotFoundError: Cannot find an appropriate cached snapshot folder for the specified revision on the local disk and +outgoing traffic has been disabled. +To enable repo look-ups and downloads online, pass 'local_files_only=False' as input. +``` + +或者 + +``` +An error occurred while synchronizing the model Systran/faster-whisper-large-v3 from the Hugging Face Hub: +An error happened while trying to locate the files on the Hub and we cannot find the appropriate snapshot folder for the +specified revision on the local disk. Please check your internet connection and try again. +Trying to load the model directly from the local cache, if it exists. +``` + +解决方法:[查看如何从 Hugging Face 手动下载模型](#%E5%AD%97%E5%B9%95%E7%94%9F%E6%88%90-) + +
+ +## 反馈建议 📢 + +- 可以提交 [issue](https://github.com/harry0703/MoneyPrinterTurbo/issues) 或者 [pull request](https://github.com/harry0703/MoneyPrinterTurbo/pulls)。 + +## 许可证 📝 + +点击查看 [`LICENSE`](LICENSE) 文件 + +## Star History + + + + + + Star History Chart + +