diff --git a/packages/commands/src/commands/config/shared.ts b/packages/commands/src/commands/config/shared.ts index 2f4b78f4..1b95cc81 100644 --- a/packages/commands/src/commands/config/shared.ts +++ b/packages/commands/src/commands/config/shared.ts @@ -78,7 +78,7 @@ export const UI_MODEL_DEFAULTS: Record = { default_video_model: "wan3.0-video", default_image_to_video_model: "wan3.0-video", default_reference_to_video_model: "wan3.0-video", - default_speech_model: "cosyvoice-v3-flash", + default_speech_model: "qwen-audio-3.1-tts-flash", default_speech_recognition_model: "fun-asr", default_omni_model: "qwen3.8-omni-flash", }; @@ -123,8 +123,10 @@ export const UI_MODEL_CATALOG: Record = { { id: "happyhorse-1.1-r2v", role: "video/ref · reference-to-video" }, ], default_speech_model: [ - { id: "cosyvoice-v3-flash", role: "speech/synthesize (TTS) default" }, - { id: "qwen-audio-3.0-tts-plus", role: "Token Plan speech/synthesize (TTS)" }, + { id: "qwen-audio-3.1-tts-flash", role: "speech/synthesize (TTS) default · not Token Plan" }, + { id: "qwen-audio-3.1-tts-plus", role: "speech/synthesize (TTS) · not Token Plan" }, + { id: "cosyvoice-v3-flash", role: "speech/synthesize (TTS) · not Token Plan" }, + { id: "qwen-audio-3.0-tts-plus", role: "Token Plan speech/synthesize (TTS) only" }, ], default_speech_recognition_model: [ { id: "fun-asr", role: "speech/recognize (ASR) default" }, diff --git a/packages/commands/src/commands/speech/synthesize.ts b/packages/commands/src/commands/speech/synthesize.ts index 7b507f02..aafcc391 100644 --- a/packages/commands/src/commands/speech/synthesize.ts +++ b/packages/commands/src/commands/speech/synthesize.ts @@ -47,6 +47,43 @@ interface VoiceEntry { lang: string; } +// qwen-audio-3.1-tts-plus system voices (official docs list only these four) +const QWEN_AUDIO_31_TTS_PLUS_VOICES: VoiceEntry[] = [ + { voice: "longanlingxin_v3.1", name: "龙安灵心", desc: "知心温暖音", lang: "中文/英文" }, + { voice: "xunanchuan_v3.1", name: "许南川", desc: "沉稳男声", lang: "中文/英文" }, + { voice: "longanhuan_v3.1", name: "龙安欢", desc: "欢脱元气女", lang: "中文/英文" }, + { voice: "longanfengyue_v3.1", name: "龙安风悦", desc: "自然亲切音", lang: "中文/英文" }, +]; + +// qwen-audio-3.1-tts-flash system voices (curated; full list via docs URL) +const QWEN_AUDIO_31_TTS_FLASH_VOICES: VoiceEntry[] = [ + // Multilingual / dialect + { voice: "longanlingxin_v3.1", name: "龙安灵心", desc: "知心温暖音", lang: "中文/英文" }, + { voice: "xunanchuan_v3.1", name: "许南川", desc: "沉稳男声", lang: "中文/英文" }, + { voice: "longanhuan_v3.1", name: "龙安欢", desc: "欢脱元气女", lang: "中文/英文" }, + { voice: "longanfengyue_v3.1", name: "龙安风悦", desc: "自然亲切音", lang: "中文/英文" }, + // Social companion (premium Chinese) + { voice: "longanyuanfei_v3.1", name: "龙安元妃", desc: "高傲妃子音", lang: "中文" }, + { voice: "longanlingxi_v3.1", name: "龙安灵希", desc: "可爱甜美音", lang: "中文" }, + { voice: "longanyang_v3.1", name: "龙安洋", desc: "阳光大男孩", lang: "中文" }, + { voice: "longfeifei_v3.1", name: "龙菲菲", desc: "甜美娇气女", lang: "中文" }, + { voice: "longyan_v3.1", name: "龙颜", desc: "温暖春风女", lang: "中文" }, + { voice: "longcheng_v3.1", name: "龙橙", desc: "智慧青年男", lang: "中文" }, + { voice: "longze_v3.1", name: "龙泽", desc: "温暖元气男", lang: "中文" }, + // Kids / toys + { voice: "longjielidou_v3.1", name: "龙杰力豆", desc: "天真男童", lang: "中文" }, + { voice: "longpaopao_v3.1", name: "龙泡泡", desc: "软糯可爱音", lang: "中文" }, + { voice: "longke_v3.1", name: "龙可", desc: "懵懂童声", lang: "中文" }, + // Character / game + { voice: "longhuohuo_v3.1", name: "龙火火", desc: "顽皮少年音", lang: "中文" }, + // English + { voice: "loongbella_v3.1", name: "Bella", desc: "干练知性女", lang: "中文/英文" }, + { voice: "Emily_v3.1", name: "Emily", desc: "英式女声", lang: "英文" }, + { voice: "Eric_v3.1", name: "Eric", desc: "英式男声", lang: "英文" }, + { voice: "Abby_v3.1", name: "Abby", desc: "美式女声", lang: "英文" }, + { voice: "Andy_v3.1", name: "Andy", desc: "美式男声", lang: "英文" }, +]; + // qwen-audio-3.0-tts-plus system voices (official docs list only these two) const QWEN_AUDIO_30_TTS_PLUS_VOICES: VoiceEntry[] = [ { voice: "longanlingxin", name: "龙安灵心", desc: "知心温暖音", lang: "中文/英文" }, @@ -150,6 +187,8 @@ const COSYVOICE_V3_FLASH_VOICES: VoiceEntry[] = [ ]; const MODEL_VOICES: Record = { + "qwen-audio-3.1-tts-flash": QWEN_AUDIO_31_TTS_FLASH_VOICES, + "qwen-audio-3.1-tts-plus": QWEN_AUDIO_31_TTS_PLUS_VOICES, "qwen-audio-3.0-tts-plus": QWEN_AUDIO_30_TTS_PLUS_VOICES, "qwen-audio-3.0-tts-flash": QWEN_AUDIO_30_TTS_FLASH_VOICES, "cosyvoice-v3-flash": COSYVOICE_V3_FLASH_VOICES, @@ -261,9 +300,9 @@ const SYNTHESIZE_FLAGS = { valueHint: "", description: { "en-US": - "Model ID (default: configured Profile TTS model, otherwise cosyvoice-v3-flash). System voices vary by model", + "Model ID (default: configured Profile TTS model, otherwise qwen-audio-3.1-tts-flash). System voices vary by model", "zh-CN": - "模型 ID(默认:Profile 配置的 TTS 模型,否则为 cosyvoice-v3-flash)。系统音色因模型而异", + "模型 ID(默认:Profile 配置的 TTS 模型,否则为 qwen-audio-3.1-tts-flash)。系统音色因模型而异", }, }, voice: { @@ -271,9 +310,9 @@ const SYNTHESIZE_FLAGS = { valueHint: "", description: { "en-US": - "Voice ID. Use --list-voices for the selected model (e.g. qwen-audio-3.0-tts-plus/flash, cosyvoice-v3-flash); for v3.5-flash provide a clone/design voice ID", + "Voice ID. Use --list-voices for the selected model (e.g. qwen-audio-3.1-tts-flash/plus, qwen-audio-3.0-tts-plus/flash, cosyvoice-v3-flash); for v3.5-flash provide a clone/design voice ID", "zh-CN": - "音色 ID。使用 --list-voices 查看所选模型的内置音色(如 qwen-audio-3.0-tts-plus/flash、cosyvoice-v3-flash);使用 v3.5-flash 时需提供复刻/设计音色 ID", + "音色 ID。使用 --list-voices 查看所选模型的内置音色(如 qwen-audio-3.1-tts-flash/plus、qwen-audio-3.0-tts-plus/flash、cosyvoice-v3-flash);使用 v3.5-flash 时需提供复刻/设计音色 ID", }, }, listVoices: { @@ -384,11 +423,25 @@ export default defineCommand({ usageArgs: "--text [flags]", flags: SYNTHESIZE_FLAGS, exampleArgs: [ - "--list-voices --model qwen-audio-3.0-tts-plus", + { + "en-US": "# Ordinary API Key", + "zh-CN": "# 普通 API Key", + }, + "--list-voices --model qwen-audio-3.1-tts-flash", "--list-voices --model cosyvoice-v3-flash", { - "en-US": '--text "Hello, I am Qwen" --model qwen-audio-3.0-tts-plus --voice longanlingxin', - "zh-CN": '--text "你好,我是通义千问" --model qwen-audio-3.0-tts-plus --voice longanlingxin', + "en-US": + '--text "Hello, I am Qwen" --model qwen-audio-3.1-tts-flash --voice longanlingxin_v3.1', + "zh-CN": + '--text "你好,我是通义千问" --model qwen-audio-3.1-tts-flash --voice longanlingxin_v3.1', + }, + { + "en-US": "# Token Plan (omit --model to use Profile default qwen-audio-3.0-tts-plus)", + "zh-CN": "# Token Plan(省略 --model,使用 Profile 默认 qwen-audio-3.0-tts-plus)", + }, + { + "en-US": '--text "Hello, I am Qwen" --voice longanlingxin', + "zh-CN": '--text "你好,我是通义千问" --voice longanlingxin', }, { "en-US": '--text "Hello world" --voice --language en', @@ -423,6 +476,12 @@ export default defineCommand({ }, ], notes: [ + { + "en-US": + "Built-in default (when --model and Profile default_speech_model are both unset) is qwen-audio-3.1-tts-flash. Voice IDs are model-specific: keep CosyVoice voices such as longanyang only with --model cosyvoice-v3-flash; for the new default use matching IDs (e.g. longanlingxin_v3.1) via --list-voices.", + "zh-CN": + "未传 --model 且 Profile 未配置 default_speech_model 时,内置默认为 qwen-audio-3.1-tts-flash。音色 ID 与模型绑定:继续使用 CosyVoice 旧音色(如 longanyang)时请显式加 --model cosyvoice-v3-flash;使用新默认时请用匹配音色(如 longanlingxin_v3.1,可用 --list-voices 查看)。", + }, { "en-US": 'Model "auto" (via --model auto or a config default model of "auto") routes to the official Bailian MCP with a reduced parameter set; MCP-incompatible flags fail fast with a usage error instead of falling back to REST.', @@ -446,7 +505,7 @@ export default defineCommand({ return; } - const model = resolvedModel || "cosyvoice-v3-flash"; + const model = resolvedModel || "qwen-audio-3.1-tts-flash"; // --list-voices: print voice list for the model and exit if (flags.listVoices) { diff --git a/packages/commands/tests/e2e/speech-list-voices.e2e.test.ts b/packages/commands/tests/e2e/speech-list-voices.e2e.test.ts index 94d4ab79..4461a314 100644 --- a/packages/commands/tests/e2e/speech-list-voices.e2e.test.ts +++ b/packages/commands/tests/e2e/speech-list-voices.e2e.test.ts @@ -30,6 +30,21 @@ describe("e2e: speech list-voices", () => { }); // --list-voices 只读本地目录,但 auth: apiKey 在 run() 前仍要求凭证 + test("【qwen-audio-3.1-tts-flash】获取音色列表", async () => { + const { stdout, stderr, exitCode } = await runCommandE2e(SPEECH_ROUTES, [ + "speech", + "synthesize", + "--list-voices", + "--model", + "qwen-audio-3.1-tts-flash", + "--api-key", + "sk-e2e-placeholder", + ]); + expect(exitCode, stderr).toBe(0); + expect(stdout).toContain("longanlingxin_v3.1"); + expect(stdout).toContain("xunanchuan_v3.1"); + }); + test("【qwen-audio-3.0-tts-plus】获取音色列表", async () => { const { stdout, stderr, exitCode } = await runCommandE2e(SPEECH_ROUTES, [ "speech", diff --git a/packages/commands/tests/e2e/speech-synthesize.e2e.test.ts b/packages/commands/tests/e2e/speech-synthesize.e2e.test.ts index d91cb350..e55baf5f 100644 --- a/packages/commands/tests/e2e/speech-synthesize.e2e.test.ts +++ b/packages/commands/tests/e2e/speech-synthesize.e2e.test.ts @@ -71,6 +71,49 @@ describe("e2e: speech synthesize", () => { expect(data.request?.input?.format).toBe("mp3"); }); + // No --model and Profile without default_speech_model → built-in fallback. + test("未传 --model 且 Profile 未配置 TTS 默认时解析为 qwen-audio-3.1-tts-flash", async () => { + const configDir = makeE2eOutputDir("speech-synthesize-builtin-fallback"); + writeFileSync( + join(configDir, "config.json"), + JSON.stringify({ + default: { + api_key: "sk-e2e-placeholder", + }, + }), + ); + + const { stdout, stderr, exitCode } = await runCommandE2e( + SPEECH_ROUTES, + [ + "speech", + "synthesize", + "--config", + "default", + "--voice", + "longanlingxin_v3.1", + "--text", + "内置 TTS 默认模型测试", + "--dry-run", + "--output", + "json", + "--quiet", + ], + { + BAILIAN_CONFIG_DIR: configDir, + DASHSCOPE_API_KEY: "", + DASHSCOPE_BASE_URL: "", + }, + ); + + expect(exitCode, stderr).toBe(0); + const data = parseStdoutJson<{ + request?: { model?: string; input?: { voice?: string } }; + }>(stdout); + expect(data.request?.model).toBe("qwen-audio-3.1-tts-flash"); + expect(data.request?.input?.voice).toBe("longanlingxin_v3.1"); + }); + test("speech synthesize 流式模式未显式传 format 时保持 PCM", async () => { const { stdout, stderr, exitCode } = await runCommandE2e(SPEECH_ROUTES, [ "speech", @@ -154,5 +197,28 @@ describe.skipIf(!isBailianE2EMediaEnabled() || !isDashScopeE2EReady())( expect(data.saved).toBe(outMp3); expect(data.audio_url?.length ?? 0).toBeGreaterThan(0); }, 180_000); + + test("【qwen-audio-3.1-tts-flash】语音合成", async () => { + const outDir = makeE2eOutputDir("speech-synthesize-qwen-audio-31-flash"); + const outMp3 = join(outDir, "e2e-tts-3.1-flash.mp3"); + const { stdout, stderr, exitCode } = await runCommandE2e(SPEECH_ROUTES, [ + "speech", + "synthesize", + "--model", + "qwen-audio-3.1-tts-flash", + "--voice", + "longanlingxin_v3.1", + "--text", + "端到端语音测试", + "--out", + outMp3, + "--output", + "json", + ]); + expect(exitCode, stderr).toBe(0); + const data = parseStdoutJson<{ saved?: string; audio_url?: string }>(stdout); + expect(data.saved).toBe(outMp3); + expect(data.audio_url?.length ?? 0).toBeGreaterThan(0); + }, 180_000); }, ); diff --git a/packages/commands/tests/output/speech-synthesize-output.test.ts b/packages/commands/tests/output/speech-synthesize-output.test.ts index 7d3341dd..9365dc21 100644 --- a/packages/commands/tests/output/speech-synthesize-output.test.ts +++ b/packages/commands/tests/output/speech-synthesize-output.test.ts @@ -282,32 +282,51 @@ test("stream dry-run still allows JSON preview without --out", async () => { expect(requests).toEqual([]); expect(result.stderr).toBe(""); }); -test.each(["qwen-audio-3.0-tts-plus", "cosyvoice-v3.5-flash", "unknown-model"])( - "voice list returns one JSON result for %s", - async (model) => { - const result = await invoke({ listVoices: true, model }, { format: "json", quiet: true }); - expect(result.exitCode).toBe(0); - const data = JSON.parse(result.stdout); - expect(data.model).toBe(model); - expect(data.voice_list_url).toBeTypeOf("string"); - if (model === "unknown-model") { - expect(data.voices).toBeNull(); - expect(data.total).toBeNull(); - } else if (model === "cosyvoice-v3.5-flash") { - expect(data.voices).toEqual([]); - expect(data.total).toBe(0); - expect(data.clone_design_docs_url).toBeTypeOf("string"); - } else { - expect(data.total).toBe(2); - expect(data.voices.map((entry: { voice: string }) => entry.voice)).toEqual([ - "longanlingxin", - "longanlufeng", - ]); - } - expect(requests).toEqual([]); - expect(result.stderr).toBe(""); - }, -); +test.each([ + "qwen-audio-3.1-tts-flash", + "qwen-audio-3.1-tts-plus", + "qwen-audio-3.0-tts-plus", + "cosyvoice-v3.5-flash", + "unknown-model", +])("voice list returns one JSON result for %s", async (model) => { + const result = await invoke({ listVoices: true, model }, { format: "json", quiet: true }); + expect(result.exitCode).toBe(0); + const data = JSON.parse(result.stdout); + expect(data.model).toBe(model); + expect(data.voice_list_url).toBeTypeOf("string"); + if (model === "unknown-model") { + expect(data.voices).toBeNull(); + expect(data.total).toBeNull(); + } else if (model === "cosyvoice-v3.5-flash") { + expect(data.voices).toEqual([]); + expect(data.total).toBe(0); + expect(data.clone_design_docs_url).toBeTypeOf("string"); + } else if (model === "qwen-audio-3.1-tts-flash") { + expect(data.total).toBe(20); + expect(data.voices.map((entry: { voice: string }) => entry.voice).slice(0, 4)).toEqual([ + "longanlingxin_v3.1", + "xunanchuan_v3.1", + "longanhuan_v3.1", + "longanfengyue_v3.1", + ]); + } else if (model === "qwen-audio-3.1-tts-plus") { + expect(data.total).toBe(4); + expect(data.voices.map((entry: { voice: string }) => entry.voice)).toEqual([ + "longanlingxin_v3.1", + "xunanchuan_v3.1", + "longanhuan_v3.1", + "longanfengyue_v3.1", + ]); + } else { + expect(data.total).toBe(2); + expect(data.voices.map((entry: { voice: string }) => entry.voice)).toEqual([ + "longanlingxin", + "longanlufeng", + ]); + } + expect(requests).toEqual([]); + expect(result.stderr).toBe(""); +}); test.each(["submit", "empty", "download"] as const)( "nonstream %s failure retains one JSON error", async (mode) => { diff --git a/packages/runtime/src/pipeline/steps/bl-api.ts b/packages/runtime/src/pipeline/steps/bl-api.ts index b0472181..6b825635 100644 --- a/packages/runtime/src/pipeline/steps/bl-api.ts +++ b/packages/runtime/src/pipeline/steps/bl-api.ts @@ -522,7 +522,7 @@ export async function speechSynthesize( }); } - const model = input.model || "cosyvoice-v3-flash"; + const model = input.model || "qwen-audio-3.1-tts-flash"; const body: DashScopeTTSRequest = { model, diff --git a/skills/bailian-gen/SKILL.md b/skills/bailian-gen/SKILL.md index 79b5ab10..d48c3523 100644 --- a/skills/bailian-gen/SKILL.md +++ b/skills/bailian-gen/SKILL.md @@ -45,7 +45,7 @@ BAILIAN_CALLER_TYPE=agent BAILIAN_CALLER_NAME=codex BAILIAN_SKILL_NAME=bailian-g | Text-to-video / image-to-video | `bl video generate` | `wan3.0-video` | | Video edit / style transfer | `bl video edit` | `happyhorse-1.0-video-edit` | | Reference-to-video + voice | `bl video ref` | `wan3.0-video` | -| Speech synthesis (TTS / voiceover) | `bl speech synthesize` | `cosyvoice-v3-flash` | +| Speech synthesis (TTS / voiceover) | `bl speech synthesize` | API Key: `qwen-audio-3.1-tts-flash`; Token Plan: `qwen-audio-3.0-tts-plus` only (3.1 not supported) | | Voice clone / manage | `bl speech voice clone/list/get/update/delete/preview` | CosyVoice/Qwen-Audio: `voice-enrollment` → `speech synthesize --model`. Omni (non-realtime flash/plus only): `qwen-voice-enrollment` create/list/delete → `omni --model --voice` | | Voice design from text | `bl speech voice design` | `voice-enrollment` → preview saved locally; formal listen via `speech synthesize` (not for Omni targets) | | Audio content generation (podcast/dialogue) | `bl speech generate` | `qwen-audio-3.1-tts-next` (text_prompt/references; not voice IDs) | @@ -55,6 +55,10 @@ BAILIAN_CALLER_TYPE=agent BAILIAN_CALLER_NAME=codex BAILIAN_SKILL_NAME=bailian-g Unless the user explicitly specifies a model, omit `--model` and let the CLI use the active Profile’s default. +TTS migration: the built-in synthesize default is `qwen-audio-3.1-tts-flash`. CosyVoice voice IDs (e.g. `longanyang`) are not valid for that model — keep them only with explicit `--model cosyvoice-v3-flash`, or switch to matching 3.1 IDs (e.g. `longanlingxin_v3.1`; use `--list-voices`). + +Token Plan TTS: keep Profile `default_speech_model` (`qwen-audio-3.0-tts-plus`) — omit `--model`. Do **not** pass `qwen-audio-3.1-tts-flash` or `qwen-audio-3.1-tts-plus`; Token Plan does not support those models. + For ASR model selection, keep `fun-asr` (or other `*-filetrans`) for long recordings, repeated files, speaker diarization, or asynchronous task IDs. For one local or remote audio file up to about five minutes when the user asks for low-latency Flash models, use `--model fun-asr-flash-2026-06-15`, `--model qwen-audio-3.0-asr-flash`, or `--model qwen3-asr-flash`. Flash recognition is synchronous and accepts exactly one file per call. Voice clone vs design vs generate: diff --git a/skills/bailian-gen/reference/speech.md b/skills/bailian-gen/reference/speech.md index 7836c6bd..8b57a11d 100644 --- a/skills/bailian-gen/reference/speech.md +++ b/skills/bailian-gen/reference/speech.md @@ -159,36 +159,41 @@ bl speech recognize --url https://example.com/audio.mp3 --model qwen-audio-3.0-a #### Flags -| Flag | Type | Required | Description | -| -------------------------------- | ------ | -------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `--text ` | string | no | Text to synthesize into speech (or use --text-file) | -| `--text-file ` | string | no | Read text from a file instead of --text | -| `--model ` | string | no | Model ID (default: configured Profile TTS model, otherwise cosyvoice-v3-flash). System voices vary by model | -| `--voice ` | string | no | Voice ID. Use --list-voices for the selected model (e.g. qwen-audio-3.0-tts-plus/flash, cosyvoice-v3-flash); for v3.5-flash provide a clone/design voice ID | -| `--list-voices` | switch | no | List built-in system voices for the selected model and exit (console link shown in output) | -| `--format ` | string | no | Audio format: mp3, pcm, wav, opus (default: mp3; streaming default: pcm) | -| `--sample-rate ` | string | no | Audio sample rate in Hz (e.g. 24000) | -| `--volume ` | string | no | Volume 0-100 (default: 50) | -| `--rate ` | string | no | Speech rate 0.5-2.0 (default: 1.0) | -| `--pitch ` | string | no | Pitch multiplier 0.5-2.0 (default: 1.0) | -| `--seed ` | string | no | Random seed 0-65535 for reproducible synthesis | -| `--language ` | string | no | Language hint (e.g. zh, en, ja, ko, fr, de) | -| `--instruction ` | string | no | Natural language instruction to control speech style (e.g. "Use a gentle tone") | -| `--enable-ssml` | switch | no | Enable SSML markup parsing in input text | -| `--out ` | string | no | Save audio to file (default: auto-generate in temp dir) | -| `--stream` | switch | no | Stream raw PCM audio to stdout (pipe to player); JSON output requires --out | -| `--concurrent ` | number | no | Run N parallel requests (default: 1) | -| `--api-key ` | string | no | API key | -| `--base-url ` | string | no | API base URL | +| Flag | Type | Required | Description | +| -------------------------------- | ------ | -------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `--text ` | string | no | Text to synthesize into speech (or use --text-file) | +| `--text-file ` | string | no | Read text from a file instead of --text | +| `--model ` | string | no | Model ID (default: configured Profile TTS model, otherwise qwen-audio-3.1-tts-flash). System voices vary by model | +| `--voice ` | string | no | Voice ID. Use --list-voices for the selected model (e.g. qwen-audio-3.1-tts-flash/plus, qwen-audio-3.0-tts-plus/flash, cosyvoice-v3-flash); for v3.5-flash provide a clone/design voice ID | +| `--list-voices` | switch | no | List built-in system voices for the selected model and exit (console link shown in output) | +| `--format ` | string | no | Audio format: mp3, pcm, wav, opus (default: mp3; streaming default: pcm) | +| `--sample-rate ` | string | no | Audio sample rate in Hz (e.g. 24000) | +| `--volume ` | string | no | Volume 0-100 (default: 50) | +| `--rate ` | string | no | Speech rate 0.5-2.0 (default: 1.0) | +| `--pitch ` | string | no | Pitch multiplier 0.5-2.0 (default: 1.0) | +| `--seed ` | string | no | Random seed 0-65535 for reproducible synthesis | +| `--language ` | string | no | Language hint (e.g. zh, en, ja, ko, fr, de) | +| `--instruction ` | string | no | Natural language instruction to control speech style (e.g. "Use a gentle tone") | +| `--enable-ssml` | switch | no | Enable SSML markup parsing in input text | +| `--out ` | string | no | Save audio to file (default: auto-generate in temp dir) | +| `--stream` | switch | no | Stream raw PCM audio to stdout (pipe to player); JSON output requires --out | +| `--concurrent ` | number | no | Run N parallel requests (default: 1) | +| `--api-key ` | string | no | API key | +| `--base-url ` | string | no | API base URL | #### Notes +- Built-in default (when --model and Profile default_speech_model are both unset) is qwen-audio-3.1-tts-flash. Voice IDs are model-specific: keep CosyVoice voices such as longanyang only with --model cosyvoice-v3-flash; for the new default use matching IDs (e.g. longanlingxin_v3.1) via --list-voices. - Model "auto" (via --model auto or a config default model of "auto") routes to the official Bailian MCP with a reduced parameter set; MCP-incompatible flags fail fast with a usage error instead of falling back to REST. #### Examples ```bash -bl speech synthesize --list-voices --model qwen-audio-3.0-tts-plus +# Ordinary API Key +``` + +```bash +bl speech synthesize --list-voices --model qwen-audio-3.1-tts-flash ``` ```bash @@ -196,7 +201,15 @@ bl speech synthesize --list-voices --model cosyvoice-v3-flash ``` ```bash -bl speech synthesize --text "Hello, I am Qwen" --model qwen-audio-3.0-tts-plus --voice longanlingxin +bl speech synthesize --text "Hello, I am Qwen" --model qwen-audio-3.1-tts-flash --voice longanlingxin_v3.1 +``` + +```bash +# Token Plan (omit --model to use Profile default qwen-audio-3.0-tts-plus) +``` + +```bash +bl speech synthesize --text "Hello, I am Qwen" --voice longanlingxin ``` ```bash diff --git a/skills/bailian-protocol/assets/setup.md b/skills/bailian-protocol/assets/setup.md index fef75903..f53f7ad1 100644 --- a/skills/bailian-protocol/assets/setup.md +++ b/skills/bailian-protocol/assets/setup.md @@ -152,7 +152,7 @@ command again to persist a newer preset: - Text-to-video model (`default_video_model`): `happyhorse-1.1-t2v` - Image-to-video model (`default_image_to_video_model`): `happyhorse-1.1-i2v` - Reference-to-video model (`default_reference_to_video_model`): `happyhorse-1.1-r2v` -- Speech synthesis model (`default_speech_model`): `qwen-audio-3.0-tts-plus` +- Speech synthesis model (`default_speech_model`): `qwen-audio-3.0-tts-plus` (Token Plan does not support `qwen-audio-3.1-tts-flash` / `qwen-audio-3.1-tts-plus`) - Speech recognition model (`default_speech_recognition_model`): `qwen-audio-3.0-asr-flash` - API Key capabilities: `text.chat`, `vision.describe`, `image.generate`, `image.edit`, `speech.recognize`, `speech.synthesize`, `video.generate`, `video.ref`, `video.task.get`, `video.download`