AI-Powered Bilingual Picture Book Creator IDE
Project description
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
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
No source distribution files available for this release.See tutorial on generating distribution archives.
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file storyide-1.2.2-py3-none-any.whl.
File metadata
- Download URL: storyide-1.2.2-py3-none-any.whl
- Upload date:
- Size: 1.1 MB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e5ebe26c37fc4eee8d4897f6bc34ef787478e68dc7a33c281aea36bcf5ddd313
|
|
| MD5 |
10242b871b66e70e2911c8644d06afcd
|
|
| BLAKE2b-256 |
d2c5b65b5d6f100cac037f41800c9985509369890d48f2b786bc472458e4e3f8
|