{"id":42880940,"url":"https://github.com/jerryshell/onpu","last_synced_at":"2026-01-30T14:32:44.844Z","repository":{"id":318153741,"uuid":"1070066624","full_name":"jerryshell/onpu","owner":"jerryshell","description":"AI 音乐生成 SaaS 平台","archived":false,"fork":false,"pushed_at":"2025-12-23T06:36:53.000Z","size":490,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-12-24T21:33:46.292Z","etag":null,"topics":["ai","better-auth","drizzle","inngest","llm","music-generation","music-generator","nextjs","saas"],"latest_commit_sha":null,"homepage":"https://onpu.vercel.app","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"agpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jerryshell.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-10-05T07:35:01.000Z","updated_at":"2025-12-23T06:36:51.000Z","dependencies_parsed_at":"2025-10-05T14:32:10.789Z","dependency_job_id":"1a7491a9-2954-49c4-8009-dcb82cdb752a","html_url":"https://github.com/jerryshell/onpu","commit_stats":null,"previous_names":["jerryshell/onpu"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/jerryshell/onpu","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jerryshell%2Fonpu","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jerryshell%2Fonpu/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jerryshell%2Fonpu/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jerryshell%2Fonpu/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jerryshell","download_url":"https://codeload.github.com/jerryshell/onpu/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jerryshell%2Fonpu/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28914243,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-30T12:13:43.263Z","status":"ssl_error","status_checked_at":"2026-01-30T12:13:22.389Z","response_time":66,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ai","better-auth","drizzle","inngest","llm","music-generation","music-generator","nextjs","saas"],"created_at":"2026-01-30T14:32:44.682Z","updated_at":"2026-01-30T14:32:44.832Z","avatar_url":"https://github.com/jerryshell.png","language":"TypeScript","readme":"# Onpu - AI 音乐生成平台\n\n_Onpu_ 是一个使用 AI 生成音乐的 SaaS 平台，可以从简单的文本描述、自定义歌词或风格提示中创作音乐\n\n平台集成了包括 Better Auth 用户认证、Polar.sh 积分支付，以及用于处理 AI 工作流的后台队列 Inngest 等技术\n\n## 在线体验\n\nhttps://onpu.vercel.app\n\n_Demo 实例受成本限制，目前无法稳定提供服务。如果这个项目对你有价值，欢迎[为我充电](https://space.bilibili.com/281356255)！_\n\n## 技术栈\n\n**AI**\n\n- 音乐生成模型: [ACE-Step](https://github.com/ace-step/ACE-Step)\n- 歌词生成模型: [Qwen/Qwen2.5-7B-Instruct](https://huggingface.co/Qwen/Qwen2.5-7B-Instruct)\n- 封面生成模型: [stabilityai/sdxl-turbo](https://huggingface.co/stabilityai/sdxl-turbo)\n- 对象存储: [Cloudflare R2](https://developers.cloudflare.com/r2)\n- 推理设施: [Modal](https://modal.com)\n- 工作流: [Inngest](https://github.com/inngest/inngest)\n\n**Web**\n\n- [Next.js](https://nextjs.org)\n- [Zustand](https://github.com/pmndrs/zustand)\n- [Tailwind CSS](https://tailwindcss.com)\n- [shadcn/ui](https://ui.shadcn.com)\n- [Better Auth](https://www.better-auth.com)\n- [Drizzle ORM](https://orm.drizzle.team)\n- [PostgreSQL](https://www.postgresql.org)\n- [Polar.sh](https://polar.sh)\n\n## 运行\n\n按照以下步骤安装和设置项目\n\n### 克隆代码仓库\n\n```bash\ngit clone https://github.com/jerryshell/onpu.git\n```\n\n### AI\n\nModal 设置\n\n```bash\nmodal setup\n```\n\n配置 Modal Secrets\n\n需要在 Modal 中创建名为 `onpu-secret` 的 Secret，包含以下环境变量：\n\n- `S3_ENDPOINT_URL`: S3 兼容存储的端点 URL\n- `S3_BUCKET_NAME`: S3 存储桶名称\n- `S3_AWS_ACCESS_KEY_ID`: S3 访问密钥 ID\n- `S3_AWS_SECRET_ACCESS_KEY`: S3 访问密钥\n\nAPI 端点\n\n项目提供三个主要的音乐生成 API 端点：\n\n1. **从描述生成音乐** (`generate_from_description`)\n\n   - 输入：完整的音乐描述文本\n   - 自动生成提示词和歌词\n   - 请求参数：\n     ```python\n     {\n       \"full_described_song\": str,  # 完整的音乐描述\n       \"audio_duration\": float,     # 音频时长（秒），默认 180.0\n       \"seed\": int,                 # 随机种子，-1 为随机\n       \"guidance_scale\": float,      # 引导强度，默认 15.0\n       \"infer_step\": int,           # 推理步数，默认 60\n       \"instrumental\": bool          # 是否为纯音乐，默认 False\n     }\n     ```\n\n2. **使用自定义歌词生成** (`generate_with_lyrics`)\n\n   - 输入：提示词和自定义歌词\n   - 请求参数：\n     ```python\n     {\n       \"prompt\": str,               # 音乐风格提示词\n       \"lyrics\": str,               # 自定义歌词\n       \"audio_duration\": float,     # 音频时长（秒），默认 180.0\n       \"seed\": int,                 # 随机种子，-1 为随机\n       \"guidance_scale\": float,      # 引导强度，默认 15.0\n       \"infer_step\": int,           # 推理步数，默认 60\n       \"instrumental\": bool          # 是否为纯音乐，默认 False\n     }\n     ```\n\n3. **使用描述的歌词生成** (`generate_with_described_lyrics`)\n\n   - 输入：提示词和歌词描述\n   - 自动根据描述生成歌词\n   - 请求参数：\n     ```python\n     {\n       \"prompt\": str,               # 音乐风格提示词\n       \"described_lyrics\": str,     # 歌词描述\n       \"audio_duration\": float,     # 音频时长（秒），默认 180.0\n       \"seed\": int,                 # 随机种子，-1 为随机\n       \"guidance_scale\": float,     # 引导强度，默认 15.0\n       \"infer_step\": int,           # 推理步数，默认 60\n       \"instrumental\": bool         # 是否为纯音乐，默认 False\n     }\n     ```\n\n响应格式\n\n所有 API 端点返回以下格式：\n\n```python\n{\n  \"s3_key\": str,              # 音频文件在 S3 中的键\n  \"cover_image_s3_key\": str,  # 封面图在 S3 中的键\n  \"categories\": List[str]     # 音乐分类标签列表\n}\n```\n\nModal 本地运行\n\n```bash\nmodal run main.py\n```\n\nModal 部署\n\n```bash\nmodal deploy main.py\n```\n\n### Web\n\n安装依赖项\n\n```bash\ncd web\n```\n\n```bash\nnpm i\n```\n\n`.env` 文件\n\n```env\n# Database\nDATABASE_URL=\n# Better Auth\nBETTER_AUTH_SECRET=\nGITHUB_CLIENT_ID=\nGITHUB_CLIENT_SECRET=\n# S3\nS3_ENDPOINT_URL=\nS3_BUCKET_NAME=\nS3_AWS_ACCESS_KEY_ID=\nS3_AWS_SECRET_ACCESS_KEY=\n# Modal\nMODAL_KEY=\nMODAL_SECRET=\nMODAL_URL_GENERATE_WITH_LYRICS=\nMODAL_URL_GENERATE_WITH_DESCRIBED_LYRICS=\nMODAL_URL_GENERATE_FROM_DESCRIPTION=\n# Polar\nPOLAR_SERVER=sandbox\nPOLAR_ACCESS_TOKEN=\nPOLAR_WEBHOOKS_SECRET=\nNEXT_PUBLIC_POLAR_SAMLL_CREDIT_PACK=\nNEXT_PUBLIC_POLAR_MEDIUM_CREDIT_PACK=\nNEXT_PUBLIC_POLAR_LARGE_CREDIT_PACK=\n```\n\n运行\n\n```bash\nnpm run dev\n```\n\n### Inngest 队列本地开发服务器\n\n```bash\ncd web\n```\n\n```bash\nnpx inngest-cli@latest dev\n```\n\n## 项目截图\n\n\u003cdiv align=\"center\"\u003e\n  \u003cimg src=\"./readme.img/1.jpg\" width=\"80%\" alt=\"主页\"\u003e\n  \u003cp\u003e\u003cem\u003e主页\u003c/em\u003e\u003c/p\u003e\n\n  \u003cimg src=\"./readme.img/2.jpg\" width=\"80%\" alt=\"创作\"\u003e\n  \u003cp\u003e\u003cem\u003e创作\u003c/em\u003e\u003c/p\u003e\n\u003c/div\u003e\n\n## 开源协议\n\n[GNU Affero General Public License v3.0](LICENSE)\n","funding_links":["https://polar.sh"],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjerryshell%2Fonpu","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjerryshell%2Fonpu","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjerryshell%2Fonpu/lists"}