StoryIDE - 童话语音故事创作工具
一个专业的童话故事创作与语音生成工具,基于 Python Flask 后端和 CodeMirror 前端编辑器构建。
✨ 功能特点
📖 故事编辑
- 目录式故事管理(每个故事一个文件夹,每章一个文件)
- CodeMirror Markdown 编辑器,大字体适合创作
- Markdown 实时预览
- 右键快速创建故事和章节
🔊 语音生成
- 基于 edge-tts 的高质量中文语音合成
- 4种中文语音:晓晓(温柔女声)、云希(阳光男声)、晓依(亲切女声)、云健(沉稳男声)
- 可调节语速(0.5x-2.0x)和音调
- 右键文件直接生成语音
- 异步生成,支持长故事
🧚 AI 童话助手
- 集成大语言模型(支持 Z.ai、OpenAI、Ollama 等)
- 专业童话故事创作系统提示词
- AI 可直接创建/编辑故事文件
- AI 可调用 TTS 生成语音
- 预设创作指令按钮
🚀 快速开始
安装依赖
pip install -r requirements.txt
启动服务器
python3 storyide_server.py
服务器将在 http://localhost:12400 启动。
环境变量
STORYIDE_PORT: 服务端口(默认 12400)STORYIDE_WORKSPACE: 工作区路径(默认 ~/storyide_workspace)
📁 项目结构
storyide/
├── storyide_server.py # 主服务器
├── utils.py # 工具函数
├── routes/
│ ├── files.py # 文件管理 API
│ ├── chat.py # AI 聊天 API
│ ├── tts.py # TTS 语音生成 API
│ └── system_prompt.txt # AI 系统提示词
├── static/
│ ├── index.html # 前端页面
│ ├── css/style.css # 样式(童话风格主题)
│ └── js/
│ ├── app.js # 核心应用
│ ├── files.js # 文件管理
│ ├── editor.js # 编辑器
│ ├── chat.js # AI 助手
│ └── tts.js # TTS 管理
├── requirements.txt # Python 依赖
└── start.sh # 启动脚本
🔧 API 接口
文件管理
GET /api/files/list- 列出文件GET /api/files/read- 读取文件POST /api/files/write- 写入文件POST /api/files/delete- 删除文件POST /api/files/create-dir- 创建目录
TTS 语音
POST /api/tts/generate- 生成语音(异步)POST /api/tts/quick- 快速生成语音(同步)GET /api/tts/voices- 获取可用语音列表GET /api/tts/status/<task_id>- 查询生成状态GET /api/tts/download/<task_id>- 下载音频文件
AI 助手
POST /api/chat/send- 发送消息(非流式)POST /api/chat/send/stream- 发送消息(流式SSE)
📝 技术栈
- 后端: Python 3, Flask, edge-tts
- 前端: HTML5, CSS3, JavaScript, CodeMirror 5
- AI: 支持 Z.ai SDK, OpenAI API, Ollama 等
📜 许可证
MIT License
Metadata
Release files for storyide 1.2.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| storyide-1.2.2-py3-none-any.whl | Python 3 | none | any | Details for storyide-1.2.2-py3-none-any.whl |
Release files / storyide-1.2.2-py3-none-any.whl
| Download URL | storyide-1.2.2-py3-none-any.whl |
|---|---|
| Size | 1.1 MB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
e5ebe26c37fc4eee8d4897f6bc34ef787478e68dc7a33c281aea36bcf5ddd313
|
|
BLAKE2b-256 checksum How to use checksums |
d2c5b65b5d6f100cac037f41800c9985509369890d48f2b786bc472458e4e3f8
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.14.4
|
Security for storyide 1.2.2
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.