Loading...
Loading...
Compare original and translation side by side
Agent setup: If your agent doesn't auto-load skills (e.g. Claude Code), see agent-compatibility.md once per session.
Agent 设置:如果你的Agent不会自动加载技能(例如Claude Code), 请在每个会话中查看agent-compatibility.md。
| Location | Purpose |
|---|---|
| Qwen TTS (HTTP API) — qwen3-tts-flash, qwen3-tts-instruct-flash |
| CosyVoice (WebSocket API) — requires |
| CosyVoice setup, voices, examples, errors |
| Fallback: curl (standard, instruct, streaming), code generation |
| Text formatting for speech, instructions templates, voice selection |
| API supplement |
| Official documentation URLs |
| Agent self-check: register skills in project config for agents that don't auto-load |
| 位置 | 用途 |
|---|---|
| Qwen TTS(HTTP API)—— qwen3-tts-flash、qwen3-tts-instruct-flash |
| CosyVoice(WebSocket API)—— 需要 |
| CosyVoice设置、语音选项、示例、错误处理 |
| 备选方案:curl(标准、指令式、流式)、代码生成 |
| 语音文本格式、指令模板、语音选择 |
| API补充说明 |
| 官方文档URL |
| Agent自检:对于不会自动加载技能的Agent,需在项目配置中注册技能 |
$DASHSCOPE_API_KEYos.environ["DASHSCOPE_API_KEY"].env.envDASHSCOPE_API_KEY=sk-your-key-here$DASHSCOPE_API_KEYos.environ["DASHSCOPE_API_KEY"].env.envDASHSCOPE_API_KEY=sk-your-key-heresk-...sk-sp-...token-plan.cn-beijing.maas.aliyuncs.comsk-sk-sp-references/tokenplan.mdsk-...sk-sp-...token-plan.cn-beijing.maas.aliyuncs.comsk-sk-sp-references/tokenplan.mdscripts/tts.pyscripts/tts.py| Model | Use Case | Notes |
|---|---|---|
| Recommended (standard) — fast, multi-language | Cost-effective, widely available |
| Instruction-guided style control | Tone/emotion via instructions |
| 模型 | 使用场景 | 说明 |
|---|---|---|
| 推荐(标准款)——快速、多语言 | 性价比高、广泛可用 |
| 指令引导的风格控制 | 通过指令调整语气/情感 |
scripts/tts_cosyvoice.pyscripts/tts_cosyvoice.py| Model | Use Case |
|---|---|
| High quality, fast |
| Highest quality |
Note: CosyVoice requiresSDK and uses different voices. See cosyvoice-guide.md.dashscope
qwen3-tts-*scripts/tts.pycosyvoice-*scripts/tts_cosyvoice.pyqwen3-tts-flashtts.py⚠️ Important: The model list above is a point-in-time snapshot and may be outdated. Model availability changes frequently. Always check the official model list for the authoritative, up-to-date catalog before making model decisions.
Model details: For more information about a specific model, direct the user to its detail page:(replacehttps://www.qianwenai.com/models/<model-name>with the exact model ID, e.g.<model-name>→ https://www.qianwenai.com/models/qwen3-tts-flash). NEVER modify or guess the model name in the URL.qwen3-tts-flash
Dynamic model queries: If the qianwen-model-selector skill or QianWen CLI () is available, use it for real-time model data. CLI requires authentication — see the qianwen-usage skill for login flow.qianwen models info <model>
| 模型 | 使用场景 |
|---|---|
| 高质量、快速 |
| 最高质量 |
注意:CosyVoice需要SDK,且使用不同的语音选项。请查看cosyvoice-guide.md。dashscope
qwen3-tts-*scripts/tts.pycosyvoice-*scripts/tts_cosyvoice.pytts.pyqwen3-tts-flash⚠️ 重要提示:上述模型列表是当前时间点的快照,可能已过时。模型可用性会频繁变化。在做出模型选择前,请务必查看官方模型列表获取权威的最新目录。
模型详情:如需了解特定模型的更多信息,请引导用户访问其详情页面:(将https://www.qianwenai.com/models/<model-name>替换为确切的模型ID,例如<model-name>→ https://www.qianwenai.com/models/qwen3-tts-flash)。绝对不要修改或猜测URL中的模型名称。qwen3-tts-flash
动态模型查询:如果qianwen-model-selector技能或QianWen CLI()可用,请使用它们获取实时模型数据。CLI需要身份验证——请查看qianwen-usage技能了解登录流程。qianwen models info <model>
| Voice | Description | Script |
|---|---|---|
| Cherry, Ethan, Serena | Qwen TTS system voices | |
| longanyang, longanhuan, longhuhu_v3 | CosyVoice verified voices | |
Full lists: api-guide.md (Qwen TTS) · cosyvoice-guide.md (CosyVoice)
| 语音 | 描述 | 脚本 |
|---|---|---|
| Cherry, Ethan, Serena | Qwen TTS系统语音 | |
| longanyang, longanhuan, longhuhu_v3 | CosyVoice认证语音 | |
完整列表:api-guide.md(Qwen TTS)· cosyvoice-guide.md(CosyVoice)
⚠️ Multiple artifacts: When generating multiple files in a single session, you MUST append a numeric suffix to each filename (e.g.,out_1.wav) to prevent overwrites.out_2.wav
⚠️ 多文件生成:当在单个会话中生成多个文件时,必须为每个文件名添加数字后缀(例如、out_1.wav)以防止覆盖。out_2.wav
tts.pytts.pyDASHSCOPE_API_KEYQIANWEN_API_KEY[ -n "$DASHSCOPE_API_KEY" ].envecho 'DASHSCOPE_API_KEY=sk-your-key-here' >> .env.envDASHSCOPE_API_KEYQIANWEN_API_KEY[ -n "$DASHSCOPE_API_KEY" ].envecho 'DASHSCOPE_API_KEY=sk-your-key-here' >> .env.envpython3 --version # must be 3.9+python3python --versionpy -3 --versionpython3 --version # 必须为3.9+python3python --versionpy -3 --versionscripts/cdpython3 <this-skill-dir>/scripts/tts.py --helppython3 <this-skill-dir>/scripts/tts.py \
--request '{"text":"Hello, this is a test.","voice":"Cherry"}' \
--output output/qianwen-audio-tts/ \
--print-response| Argument | Description |
|---|---|
| JSON request body |
| Load request from file |
| Save audio and response JSON to directory |
| Print response to stdout |
| Override model |
| Override voice |
scripts/cdpython3 <this-skill-dir>/scripts/tts.py --helppython3 <this-skill-dir>/scripts/tts.py \
--request '{"text":"Hello, this is a test.","voice":"Cherry"}' \
--output output/qianwen-audio-tts/ \
--print-response| 参数 | 描述 |
|---|---|
| JSON请求体 |
| 从文件加载请求 |
| 将音频和响应JSON保存到指定目录 |
| 将响应打印到标准输出 |
| 覆盖默认模型 |
| 覆盖默认语音 |
0output.audiols -la <output_dir>[ACTION_REQUIRED][UPDATE_AVAILABLE]0output.audiols -la <output_dir>[ACTION_REQUIRED][UPDATE_AVAILABLE]tts_cosyvoice.pytts_cosyvoice.pydashscopepip install dashscope>=1.24.6
python3 <this-skill-dir>/scripts/tts_cosyvoice.py --text "Hello"Full guide: cosyvoice-guide.md (setup, voices, examples, errors)
| Error Pattern | Diagnosis | Resolution |
|---|---|---|
| Python not on PATH | Try |
| Script version check failed | Upgrade Python to 3.9+ |
| Python < 3.9 | Upgrade Python to 3.9+ |
| Missing API key | Obtain key from QianWen Console; add to |
| Invalid or mismatched key | Run qianwen-ops-auth (non-plaintext check only); verify key is valid |
| SSL cert issue (proxy/corporate) | macOS: run |
| Network unreachable | Check internet; set |
| Rate limited | Wait and retry with backoff |
| Server error | Retry with backoff |
| Can't write output | Use |
dashscopepip install dashscope>=1.24.6
python3 <this-skill-dir>/scripts/tts_cosyvoice.py --text "Hello"完整指南:cosyvoice-guide.md(设置、语音选项、示例、错误处理)
| 错误模式 | 诊断 | 解决方案 |
|---|---|---|
| Python不在PATH中 | 尝试 |
| 脚本版本检查失败 | 将Python升级到3.9+ |
| Python版本低于3.9 | 将Python升级到3.9+ |
| 缺少API密钥 | 从QianWen控制台获取密钥;添加到 |
| 密钥无效或不匹配 | 如果可用则运行qianwen-ops-auth技能(仅非明文检查);验证密钥是否有效 |
| SSL证书问题(代理/企业环境) | macOS:运行 |
| 网络不可达 | 检查网络;如果在代理后设置 |
| 请求频率受限 | 等待后重试并使用退避策略 |
| 服务器错误 | 等待后重试并使用退避策略 |
| 无法写入输出 | 使用 |
| Field | Type | Description |
|---|---|---|
| string | Required — text to synthesize (max 600 chars) |
| string | Required — voice ID (e.g. |
| string | Model ID (default: |
| string | |
| string | Tone/style instructions (instruct model only) |
| bool | Enable streaming (Base64 chunks) |
| 字段 | 类型 | 描述 |
|---|---|---|
| string | 必填——待合成的文本(最多600字符) |
| string | 必填——语音ID(例如 |
| string | 模型ID(默认: |
| string | |
| string | 语气/风格指令(仅适用于指令式模型) |
| bool | 启用流式传输(Base64分块) |
| Field | Description |
|---|---|
| URL of generated audio (valid 24h) |
| Format (e.g. wav) |
| Sample rate (e.g. 24000) |
| Character usage |
| 字段 | 描述 |
|---|---|
| 生成的音频URL(有效期24小时) |
| 音频格式(例如wav) |
| 采样率(例如24000) |
| 字符使用量 |
qwen3-tts-instruct-flashAutoqwen3-tts-instruct-flashAutoaudio_urlaudio_fileaudio_urlaudio_file| Error | Cause | Action |
|---|---|---|
| Invalid or missing API key | Run qianwen-ops-auth if available; else prompt user to set key (non-plaintext check only) |
| Invalid parameters (missing text/voice) | Validate request body |
| Rate limit or server error | Retry with backoff |
Usage & billing: Use the qianwen-usage skill to check usage, free tier quota, and billing directly. Alternatively, the user can visit the QianWen console: Usage Analytics | Pay-as-you-go Billing | Token Plan 团队版 SubscriptionNEVER fabricate, guess, or construct usage/billing/console URLs. Only provide the exact links listed in this skill. If a URL is not listed here, do not invent one.
| 错误 | 原因 | 操作 |
|---|---|---|
| API密钥无效或缺失 | 如果可用则运行qianwen-ops-auth技能;否则提示用户设置密钥(仅非明文检查) |
| 参数无效(缺少text/voice) | 验证请求体 |
| 请求频率受限或服务器错误 | 等待后重试并使用退避策略 |
绝对不要编造、猜测或构建使用/计费/控制台URL。仅提供此技能中列出的准确链接。如果此处未列出URL,不要自行创建。
./output/qianwen-audio-tts/skills/output/./output/qianwen-audio-tts/skills/output/[ACTION_REQUIRED] qianwen-update-check skill is not installed[ACTION_REQUIRED] qianwen-update-check skill is not installedThe update-check skill is not installed. It keeps you informed about new QianWen-AI/qianwen-ai features and bug fixes.
- Install now — I'll run the install command for you
- Skip for now — do nothing this time
- Never remind me — permanently suppress this prompt
npx skills add QianWen-AI/qianwen-ai --skill qianwen-update-check -ypython3 <this-skill-scripts-dir>/gossamer.py --dismisspython3 <this-skill-scripts-dir>/gossamer.py --dismisspython3 <this-skill-scripts-dir>/gossamer.py --never-install更新检查技能未安装。它会为你推送QianWen-AI/qianwen-ai的新功能和Bug修复信息。
- 立即安装——我将为你运行安装命令
- 暂时跳过——本次不执行任何操作
- 永不提醒——永久屏蔽此提示
npx skills add QianWen-AI/qianwen-ai --skill qianwen-update-check -ypython3 <this-skill-scripts-dir>/gossamer.py --dismisspython3 <this-skill-scripts-dir>/gossamer.py --dismisspython3 <this-skill-scripts-dir>/gossamer.py --never-install[UPDATE_AVAILABLE][UPDATE_AVAILABLE][ACTION_REQUIRED][UPDATE_AVAILABLE][ACTION_REQUIRED][UPDATE_AVAILABLE]qianwen-update-check/SKILL.mdpython3 <qianwen-update-check-dir>/scripts/check_update.py --print-responseqianwen-update-check/SKILL.mdpython3 <qianwen-update-check-dir>/scripts/check_update.py --print-response