Loading...
Loading...
Compare original and translation side by side
~/.openclaw/skills/giggle-generation-speech/logs/python3GIGGLE_API_KEYrequestsGIGGLE_API_KEYNo inline Python: All commands must be executed via thetool. Never use heredoc inline code.exec
No Retry on Error: If script execution encounters an error, do not retry. Report the error to the user directly and stop.
~/.openclaw/skills/giggle-generation-speech/logs/python3GIGGLE_API_KEYrequestsGIGGLE_API_KEY禁止内嵌Python代码:所有命令必须通过工具执行。绝对不要使用 heredoc 内嵌代码。exec
错误时不重试:若脚本执行出错,请勿重试。直接向用户报告错误并停止操作。
Important: Never passin exec'sGIGGLE_API_KEYparameter. API Key is read from system environment variable.env
重要提示:绝对不要在exec的参数中传递env。API密钥将从系统环境变量读取。GIGGLE_API_KEY
--list-voicespython3 scripts/text_to_audio_api.py --list-voices--list-voicespython3 scripts/text_to_audio_api.py --list-voicesundefinedundefined
Response example:
```json
{"status": "started", "task_id": "xxx"}addMemorygiggle-generation-speech task_id: xxx (submitted: YYYY-MM-DD HH:mm)
响应示例:
```json
{"status": "started", "task_id": "xxx"}addMemorygiggle-generation-speech task_id: xxx (submitted: YYYY-MM-DD HH:mm)cron{
"action": "add",
"job": {
"name": "giggle-generation-speech-<first 8 chars of task_id>",
"schedule": {
"kind": "every",
"everyMs": 30000
},
"payload": {
"kind": "systemEvent",
"text": "Speech task poll: exec python3 scripts/text_to_audio_api.py --query --task-id <full task_id>, handle stdout per Cron logic. If stdout is non-JSON plain text, forward to user and remove Cron. If stdout is JSON, do not send message, keep waiting. If stdout is empty, remove Cron immediately."
},
"sessionTarget": "main"
}
}| stdout pattern | Action |
|---|---|
Non-empty plain text (not starting with | Forward to user as-is, remove Cron |
| stdout empty | Already pushed, remove Cron immediately, do not send message |
JSON (starts with | Do not send message, do not remove Cron, keep waiting |
cron{
"action": "add",
"job": {
"name": "giggle-generation-speech-<first 8 chars of task_id>",
"schedule": {
"kind": "every",
"everyMs": 30000
},
"payload": {
"kind": "systemEvent",
"text": "Speech task poll: exec python3 scripts/text_to_audio_api.py --query --task-id <full task_id>, handle stdout per Cron logic. If stdout is non-JSON plain text, forward to user and remove Cron. If stdout is JSON, do not send message, keep waiting. If stdout is empty, remove Cron immediately."
},
"sessionTarget": "main"
}
}| 标准输出模式 | 操作 |
|---|---|
非空纯文本(不以 | 直接转发给用户,移除Cron任务 |
| 标准输出为空 | 结果已推送,立即移除Cron任务,不发送消息 |
JSON格式(以 | 不发送消息,不移除Cron任务,继续等待 |
python3 scripts/text_to_audio_api.py --query --task-id <task_id> --poll --max-wait 120python3 scripts/text_to_audio_api.py --query --task-id <task_id> --poll --max-wait 120python3 scripts/text_to_audio_api.py --list-voicesGET /api/v1/project/preset_tonespython3 scripts/text_to_audio_api.py --list-voicesGET /api/v1/project/preset_toneshttps://assets.giggle.pro/...?Policy=...&Key-Pair-Id=...&Signature=...~%7Ehttps://assets.giggle.pro/...?Policy=...&Key-Pair-Id=...&Signature=...~%7E| Parameter | Required | Default | Description |
|---|---|---|---|
| yes | - | Text to synthesize |
| yes | - | Voice ID; must get via |
| yes | - | Emotion: joy, sad, neutral, angry, surprise, etc. Guide user to choose |
| no | 1 | Speaking rate multiplier |
| - | - | Get available voice list |
| - | - | Query task status |
| required for query | - | Task ID |
| no | - | Sync poll with |
| no | 120 | Max wait seconds |
| 参数 | 必填 | 默认值 | 描述 |
|---|---|---|---|
| 是 | - | 待合成的文本 |
| 是 | - | 音色ID;必须通过 |
| 是 | - | 情绪:开心、悲伤、中性、愤怒、惊讶等。引导用户选择 |
| 否 | 1 | 语速倍数 |
| - | - | 获取可用音色列表 |
| - | - | 查询任务状态 |
| 查询时必填 | - | 任务ID |
| 否 | - | 结合 |
| 否 | 120 | 最大等待秒数 |
--list-voices--list-voices