giggle-generation-music
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseGiggle Music
Giggle Music
Source: giggle-official/skills · API: giggle.pro
Generates AI music via giggle.pro. Supports simplified and custom modes. Submit task → query when ready. No polling or Cron.
API Key: Set system environment variable . Log in to Giggle.pro and obtain the API Key from account settings.
GIGGLE_API_KEYImportant: Never passin exec'sGIGGLE_API_KEYparameter. API Key is read from system environment variable.env
No Retry on Error: If script execution encounters an error, do not retry. Report the error to the user directly and stop.
来源:giggle-official/skills · API:giggle.pro
通过giggle.pro生成AI音乐。支持简化模式和自定义模式。提交任务→就绪时查询。无需轮询或Cron。
API密钥:设置系统环境变量。登录Giggle.pro并从账户设置中获取API密钥。
GIGGLE_API_KEY重要提示:绝对不要在exec的参数中传递env。API密钥从系统环境变量中读取。GIGGLE_API_KEY
错误时不重试:如果脚本执行遇到错误,请勿重试。直接向用户报告错误并停止操作。
Interaction Guide
交互指南
Mode Selection (priority: high to low)
模式选择(优先级从高到低)
| User input | Mode | Description |
|---|---|---|
| User provides full lyrics | Custom mode (B) | Must be lyrics, not description |
| User requests instrumental/background music | Instrumental mode (C) | No vocals |
| Other cases (description, style, vocals, etc.) | Simplified mode (A) | Use user description as prompt; AI composes |
Key rule: If the user does not provide lyrics, always use simplified mode A. Use the user's description exactly as; do not add or rewrite. E.g. user says "female voice, 1 min, ancient romance", use--promptdirectly.--prompt "female voice, 1 min, ancient romance"
| 用户输入 | 模式 | 说明 |
|---|---|---|
| 用户提供完整歌词 | 自定义模式(B) | 必须是歌词,而非描述 |
| 用户请求器乐/背景音乐 | 器乐模式(C) | 无 vocals |
| 其他情况(描述、风格、人声等) | 简化模式(A) | 使用用户描述作为提示词;由AI完成编曲 |
核心规则:如果用户未提供歌词,始终使用简化模式A。直接将用户的描述作为参数;请勿添加或改写。例如:用户说“女声,1分钟,古风言情”,则直接使用--prompt。--prompt "女声,1分钟,古风言情"
Guidance when info is lacking
信息缺失时的引导
Only when the user input is very vague (e.g. "generate music" with no description), ask:
Question: "What type of music would you like to generate?"
Options: AI compose (describe style) / Use my lyrics / Instrumental仅当用户输入非常模糊时(例如仅输入“生成音乐”且无其他描述),询问:
问题:“你想要生成什么类型的音乐?”
选项:AI创作(描述风格)/ 使用我的歌词 / 器乐Execution Flow: Submit and Query
执行流程:提交与查询
Music generation is asynchronous (typically 1–3 minutes). Submit a task to get , then query when the user wants to check status.
task_id音乐生成为异步操作(通常需要1–3分钟)。提交任务以获取,然后在用户想要查看状态时进行查询。
task_idStep 1: Submit Task
步骤1:提交任务
First send a message to the user: "Music generation submitted. Usually takes 1–3 minutes. You can ask me about the progress anytime."
首先向用户发送消息:“音乐生成任务已提交。通常需要1–3分钟完成。你可以随时询问进度。”
A: Simplified Mode
A: 简化模式
bash
python3 scripts/giggle_music_api.py --prompt "user description"bash
python3 scripts/giggle_music_api.py --prompt "用户描述"B: Custom Mode
B: 自定义模式
bash
python3 scripts/giggle_music_api.py --custom \
--prompt "lyrics content" \
--style "pop, ballad" \
--title "Song Title" \
--vocal-gender femalebash
python3 scripts/giggle_music_api.py --custom \
--prompt "歌词内容" \
--style "pop, ballad" \
--title "歌曲标题" \
--vocal-gender femaleC: Instrumental
C: 器乐模式
bash
python3 scripts/giggle_music_api.py --prompt "user description" --instrumentalResponse example:
json
{"status": "started", "task_id": "xxx"}Store task_id in memory ():
addMemorygiggle-generation-music task_id: xxx (submitted: YYYY-MM-DD HH:mm)bash
python3 scripts/giggle_music_api.py --prompt "用户描述" --instrumental响应示例:
json
{"status": "started", "task_id": "xxx"}将task_id存储到内存中():
addMemorygiggle-generation-music task_id: xxx (submitted: YYYY-MM-DD HH:mm)Step 2: Query When User Asks
步骤2:用户询问时查询
When the user asks about music progress (e.g. "is my music ready?", "progress?"), run:
bash
python3 scripts/giggle_music_api.py --query --task-id <task_id>Output handling:
| stdout pattern | Action |
|---|---|
| Plain text with music links (🎶 音乐已就绪) | Forward to user as-is |
| Plain text with error | Forward to user as-is |
JSON | Tell user "Still in progress, please ask again in a moment" |
Link return rule: Audio links in stdout must be full signed URLs (with Policy, Key-Pair-Id, Signature query params). Correct: . Keep as-is when forwarding.
https://assets.giggle.pro/...?Policy=...&Key-Pair-Id=...&Signature=...当用户询问音乐进度时(例如“我的音乐好了吗?”、“进度如何?”),运行:
bash
python3 scripts/giggle_music_api.py --query --task-id <task_id>输出处理:
| 标准输出格式 | 操作 |
|---|---|
| 包含音乐链接的纯文本(🎶 音乐已就绪) | 直接转发给用户 |
| 包含错误信息的纯文本 | 直接转发给用户 |
JSON格式 | 告知用户“仍在处理中,请稍后再问” |
链接返回规则:标准输出中的音频链接必须是完整的签名URL(包含Policy、Key-Pair-Id、Signature查询参数)。正确示例:。转发时保持原样即可。
https://assets.giggle.pro/...?Policy=...&Key-Pair-Id=...&Signature=...Recovery
恢复机制
When the user asks about previous music progress:
- task_id in memory → Run directly. Do not resubmit
--query --task-id xxx - No task_id in memory → Tell the user, ask if they want to regenerate
当用户询问之前的音乐进度时:
- 内存中有task_id → 直接运行。请勿重新提交任务
--query --task-id xxx - 内存中无task_id → 告知用户,并询问是否需要重新生成
Parameter Reference
参数参考
| Parameter | Description |
|---|---|
| Music description or lyrics (required in simplified mode) |
| Enable custom mode |
| Music style (required in custom mode) |
| Song title (required in custom mode) |
| Generate instrumental |
| Vocal gender: male / female (custom mode only) |
| Query task status |
| Task ID (use with --query) |
| 参数 | 说明 |
|---|---|
| 音乐描述或歌词(简化模式下为必填项) |
| 启用自定义模式 |
| 音乐风格(自定义模式下为必填项) |
| 歌曲标题(自定义模式下为必填项) |
| 生成器乐 |
| 人声性别:male / female(仅适用于自定义模式) |
| 查询任务状态 |
| 任务ID(与--query配合使用) |