aliyun-qwen-tts-voice-clone

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese
Category: provider
Category: provider

Model Studio Qwen TTS Voice Clone

Model Studio Qwen TTS 声音克隆

Use voice cloning models to replicate timbre from enrollment audio samples.
使用声音克隆模型从录入的音频样本中复刻音色。

Critical model names

关键模型名称

Use one of these exact model strings:
  • qwen3-tts-vc-2026-01-22
  • qwen3-tts-vc-realtime-2026-01-15
请使用以下准确的模型字符串之一:
  • qwen3-tts-vc-2026-01-22
  • qwen3-tts-vc-realtime-2026-01-15

Prerequisites

前置要求

  • Install SDK in a virtual environment:
bash
python3 -m venv .venv
. .venv/bin/activate
python -m pip install dashscope
  • Set
    DASHSCOPE_API_KEY
    in your environment, or add
    dashscope_api_key
    to
    ~/.alibabacloud/credentials
    .
  • 在虚拟环境中安装SDK:
bash
python3 -m venv .venv
. .venv/bin/activate
python -m pip install dashscope
  • 在环境中设置
    DASHSCOPE_API_KEY
    ,或将
    dashscope_api_key
    添加到
    ~/.alibabacloud/credentials
    文件中。

Normalized interface (tts.voice_clone)

标准化接口(tts.voice_clone)

Request

请求参数

  • text
    (string, required)
  • voice_sample
    (string | bytes, required) enrollment sample
  • voice_name
    (string, optional)
  • stream
    (bool, optional)
  • text
    (字符串,必填)
  • voice_sample
    (字符串 | 字节流,必填) 录入的语音样本
  • voice_name
    (字符串,可选)
  • stream
    (布尔值,可选)

Response

返回结果

  • audio_url
    (string) or streaming PCM chunks
  • voice_id
    (string)
  • request_id
    (string)
  • audio_url
    (字符串) 或流式PCM分片
  • voice_id
    (字符串)
  • request_id
    (字符串)

Operational guidance

操作指南

  • Use clean speech samples with low background noise.
  • Respect consent and policy requirements for cloned voices.
  • Persist generated
    voice_id
    and reuse for future synthesis requests.
  • 使用背景噪音低的干净语音样本。
  • 遵守声音克隆相关的知情同意和政策要求。
  • 持久化存储生成的
    voice_id
    ,后续合成请求可复用。

Local helper script

本地辅助脚本

Prepare a normalized request JSON and validate response schema:
bash
.venv/bin/python skills/ai/audio/aliyun-qwen-tts-voice-clone/scripts/prepare_voice_clone_request.py \
  --text "Welcome to this voice-clone demo" \
  --voice-sample "https://example.com/voice-sample.wav"
准备标准化的请求JSON并校验响应 schema:
bash
.venv/bin/python skills/ai/audio/aliyun-qwen-tts-voice-clone/scripts/prepare_voice_clone_request.py \
  --text "Welcome to this voice-clone demo" \
  --voice-sample "https://example.com/voice-sample.wav"

Output location

输出位置

  • Default output:
    output/ai-audio-tts-voice-clone/audio/
  • Override base dir with
    OUTPUT_DIR
    .
  • 默认输出路径:
    output/ai-audio-tts-voice-clone/audio/
  • 可通过
    OUTPUT_DIR
    环境变量覆盖基础目录。

Validation

校验

bash
mkdir -p output/aliyun-qwen-tts-voice-clone
for f in skills/ai/audio/aliyun-qwen-tts-voice-clone/scripts/*.py; do
  python3 -m py_compile "$f"
done
echo "py_compile_ok" > output/aliyun-qwen-tts-voice-clone/validate.txt
Pass criteria: command exits 0 and
output/aliyun-qwen-tts-voice-clone/validate.txt
is generated.
bash
mkdir -p output/aliyun-qwen-tts-voice-clone
for f in skills/ai/audio/aliyun-qwen-tts-voice-clone/scripts/*.py; do
  python3 -m py_compile "$f"
done
echo "py_compile_ok" > output/aliyun-qwen-tts-voice-clone/validate.txt
通过条件:命令退出码为0,且成功生成
output/aliyun-qwen-tts-voice-clone/validate.txt
文件。

Output And Evidence

输出与凭证

  • Save artifacts, command outputs, and API response summaries under
    output/aliyun-qwen-tts-voice-clone/
    .
  • Include key parameters (region/resource id/time range) in evidence files for reproducibility.
  • 将产物、命令输出和API响应摘要保存到
    output/aliyun-qwen-tts-voice-clone/
    目录下。
  • 在凭证文件中包含关键参数(地域/资源ID/时间范围)以便复现。

Workflow

工作流程

  1. Confirm user intent, region, identifiers, and whether the operation is read-only or mutating.
  2. Run one minimal read-only query first to verify connectivity and permissions.
  3. Execute the target operation with explicit parameters and bounded scope.
  4. Verify results and save output/evidence files.
  1. 确认用户意图、地域、标识符,以及操作是只读还是会变更资源。
  2. 先运行一次最小化的只读查询,验证连通性和权限。
  3. 使用明确的参数和限定范围执行目标操作。
  4. 验证结果并保存输出/凭证文件。

References

参考文档

  • references/sources.md
  • references/sources.md