From 4df13fb5acd037bbf011279a70d23809a63b1f46 Mon Sep 17 00:00:00 2001 From: LingXuanYin <3546599908@qq.com> Date: Wed, 28 Oct 2026 08:11:06 +0800 Subject: [PATCH 1/3] Revert "fix: state each Qwen 3.1 tier in its declaration and share the tests" This reverts commit d2c91283016513711d8aa8c151da3e79eba8349e. --- README.md | 4 +- models/qwen-audio-3.1-tts-flash.yaml | 4 +- models/qwen-audio-3.1-tts-plus.yaml | 5 +- src/builtins.ts | 6 +-- test/adapters/audio-speech.test.ts | 68 ++++++++++++++++++---------- test/config.test.ts | 21 ++++----- 6 files changed, 64 insertions(+), 44 deletions(-) diff --git a/README.md b/README.md index a53e98b..adfef6f 100644 --- a/README.md +++ b/README.md @@ -406,14 +406,14 @@ await client.generate({ Each TTS request accepts exactly one non-empty text block and returns one URL audio block. Choose the model from the requested voice mode and priority before constructing the request: -| Requirement | Model choice (default tier) | +| Requirement | Model choice | | --- | --- | | Create a voice from a text-only description, without reference audio | `qwen-audio-3.1-tts-flash` with a `voice_prompt` | | Clone a voice from one reference recording | `qwen-audio-3.1-tts-flash`; pass one HTTP(S) reference URL and no `voice_prompt` | | Use a default voice, including a delegated choice expressed only as any, random, suitable, or natural | `qwen-audio-3.1-tts-flash` with a short generic `voice_prompt`, such as a natural, neutral narrator | - Qwen: `voice_prompt` design OR one-reference clone via `qwen-audio-3.1-tts-flash` (default) or `qwen-audio-3.1-tts-plus`; both require at least 15 Unicode code points. -- Tier: the table names `qwen-audio-3.1-tts-flash`, the default. In any row, use `qwen-audio-3.1-tts-plus` instead only when the user or an external policy selects it. Alibaba describes Flash as its low-latency tier and Plus as its quality tier for audiobooks and dubbing; the SDK has not measured either. +- Tier: use `qwen-audio-3.1-tts-plus` only when the user or an external policy selects it; otherwise use Flash. Alibaba describes Flash as its low-latency tier and Plus as its quality tier for audiobooks and dubbing; the SDK has not measured either. - Conflict: reference + redesign requires user choice before generation. - Dependency: clone prior generated audio. - Short text: input under 15 Unicode code points is rejected; ask the user to lengthen it. diff --git a/models/qwen-audio-3.1-tts-flash.yaml b/models/qwen-audio-3.1-tts-flash.yaml index 9fb2859..2f53bba 100644 --- a/models/qwen-audio-3.1-tts-flash.yaml +++ b/models/qwen-audio-3.1-tts-flash.yaml @@ -1,8 +1,8 @@ schema: neta.generation.model.v1 model: qwen-audio-3.1-tts-flash title: Qwen Audio 3.1 TTS Flash -description: "Modes: voice_prompt design OR one-reference clone. Text: >=15 Unicode code points. Tier: default; - Alibaba's low-latency tier. Conflict: ask user; never combine/reinterpret. Dependency: clone prior generated audio." +description: "Modes: voice_prompt design OR one-reference clone. Text: >=15 Unicode code points. Tier: default Qwen TTS. + Conflict: ask user; never combine/reinterpret. Dependency: clone prior generated audio." adapter: type: openai.audioSpeech content: diff --git a/models/qwen-audio-3.1-tts-plus.yaml b/models/qwen-audio-3.1-tts-plus.yaml index 281293b..4146d93 100644 --- a/models/qwen-audio-3.1-tts-plus.yaml +++ b/models/qwen-audio-3.1-tts-plus.yaml @@ -1,9 +1,8 @@ schema: neta.generation.model.v1 model: qwen-audio-3.1-tts-plus title: Qwen Audio 3.1 TTS Plus -description: "Modes: voice_prompt design OR one-reference clone. Text: >=15 Unicode code points. Tier: Alibaba's quality - tier (audiobooks, dubbing); only when user or external policy selects it. Conflict: ask user; never - combine/reinterpret. Dependency: clone prior generated audio." +description: "Modes: voice_prompt design OR one-reference clone. Text: >=15 Unicode code points. Tier: only when + user/policy selects Plus. Conflict: ask user; never combine/reinterpret. Dependency: clone prior generated audio." adapter: type: openai.audioSpeech content: diff --git a/src/builtins.ts b/src/builtins.ts index 90cf796..6218b90 100644 --- a/src/builtins.ts +++ b/src/builtins.ts @@ -715,7 +715,7 @@ function qwenAudio31TtsModel(model: string, title: string, tier: string): Genera schema: MODEL_SCHEMA, model, title, - description: `Modes: voice_prompt design OR one-reference clone. Text: >=15 Unicode code points. Tier: ${tier}. Conflict: ask user; never combine/reinterpret. Dependency: clone prior generated audio.`, + description: `Modes: voice_prompt design OR one-reference clone. Text: >=15 Unicode code points. ${tier} Conflict: ask user; never combine/reinterpret. Dependency: clone prior generated audio.`, adapter: { type: "openai.audioSpeech" }, content: { input: [ @@ -768,11 +768,11 @@ function qwenAudio31TtsModel(model: string, title: string, tier: string): Genera } const audioSpeechModels = [ - qwenAudio31TtsModel("qwen-audio-3.1-tts-flash", "Qwen Audio 3.1 TTS Flash", "default; Alibaba's low-latency tier"), + qwenAudio31TtsModel("qwen-audio-3.1-tts-flash", "Qwen Audio 3.1 TTS Flash", "Tier: default Qwen TTS."), qwenAudio31TtsModel( "qwen-audio-3.1-tts-plus", "Qwen Audio 3.1 TTS Plus", - "Alibaba's quality tier (audiobooks, dubbing); only when user or external policy selects it", + "Tier: only when user/policy selects Plus.", ), ] satisfies GenerationModelDeclaration[]; diff --git a/test/adapters/audio-speech.test.ts b/test/adapters/audio-speech.test.ts index 3660cb4..bedc9a3 100644 --- a/test/adapters/audio-speech.test.ts +++ b/test/adapters/audio-speech.test.ts @@ -68,10 +68,7 @@ function requestBody(call: { init: RequestInit } | undefined): Record { - it.each([ - "qwen-audio-3.1-tts-flash", - "qwen-audio-3.1-tts-plus", - ])("sends the fixed wire contract for %s and preserves Qwen input and voice prompt", async (model) => { + it("sends the fixed wire contract and preserves Qwen input and voice prompt", async () => { const { client, calls } = recordingClient(() => routerSuccess({}, { headers: { "x-request-id": "request-primary", "x-oneapi-request-id": "request-fallback" } }), ); @@ -79,7 +76,7 @@ describe("openai.audioSpeech adapter requests", () => { const voicePrompt = " 沉稳清晰的声音。\n"; const output = await client.generate({ - model, + model: "qwen-audio-3.1-tts-flash", content: [{ type: "text", text: input }], meta: { voice_prompt: voicePrompt }, }); @@ -91,7 +88,7 @@ describe("openai.audioSpeech adapter requests", () => { new Headers({ Authorization: "Bearer secret-key", "Content-Type": "application/json" }), ); expect(requestBody(calls[0])).toEqual({ - model, + model: "qwen-audio-3.1-tts-flash", input, metadata: { voice_prompt: voicePrompt }, }); @@ -104,6 +101,25 @@ describe("openai.audioSpeech adapter requests", () => { ]); }); + it("sends qwen-audio-3.1-tts-plus as given while preserving Qwen input and voice prompt", async () => { + const { client, calls } = recordingClient(); + const input = " 原样保留的朗读文本内容,不应被修改。\n"; + const voicePrompt = " 沉稳清晰的声音。\n"; + + await client.generate({ + model: "qwen-audio-3.1-tts-plus", + content: [{ type: "text", text: input }], + meta: { voice_prompt: voicePrompt }, + }); + + expect(calls).toHaveLength(1); + expect(requestBody(calls[0])).toEqual({ + model: "qwen-audio-3.1-tts-plus", + input, + metadata: { voice_prompt: voicePrompt }, + }); + }); + it("maps Qwen reference audio and trims only its URL", async () => { const { client, calls } = recordingClient(); await client.generate({ @@ -252,28 +268,34 @@ describe("openai.audioSpeech adapter validation", () => { ); }); - const QWEN_MODELS = ["qwen-audio-3.1-tts-flash", "qwen-audio-3.1-tts-plus"]; + it.each([ + { text: "a".repeat(14) }, + { text: "😀".repeat(14) }, + ])("rejects qwen-audio-3.1-tts-flash input below 15 Unicode code points ($text)", ({ text }) => { + const client = createGenerationClient({ apiKey: "key" }); + expect(() => + client.validate({ model: "qwen-audio-3.1-tts-flash", content: [{ type: "text", text }, audio()] }), + ).toThrow("requires input of at least 15 Unicode code points"); + }); - it.each( - QWEN_MODELS.flatMap((model) => [ - { model, text: "a".repeat(14) }, - { model, text: "😀".repeat(14) }, - ]), - )("rejects $model input below 15 Unicode code points ($text)", ({ model, text }) => { + it.each([ + { text: "a".repeat(14) }, + { text: "😀".repeat(14) }, + ])("rejects qwen-audio-3.1-tts-plus input below 15 Unicode code points ($text)", ({ text }) => { const client = createGenerationClient({ apiKey: "key" }); - expect(() => client.validate({ model, content: [{ type: "text", text }, audio()] })).toThrow( - "requires input of at least 15 Unicode code points", - ); + expect(() => + client.validate({ model: "qwen-audio-3.1-tts-plus", content: [{ type: "text", text }, audio()] }), + ).toThrow("requires input of at least 15 Unicode code points"); }); - it.each( - QWEN_MODELS.flatMap((model) => [ - { model, text: "a".repeat(15) }, - { model, text: ` ${"😀".repeat(15)} ` }, - ]), - )("accepts the $model input boundary ($text)", ({ model, text }) => { + it.each([ + { text: "a".repeat(15) }, + { text: ` ${"😀".repeat(15)} ` }, + ])("accepts the qwen-audio-3.1-tts-flash input boundary ($text)", ({ text }) => { const client = createGenerationClient({ apiKey: "key" }); - expect(() => client.validate({ model, content: [{ type: "text", text }, audio()] })).not.toThrow(); + expect(() => + client.validate({ model: "qwen-audio-3.1-tts-flash", content: [{ type: "text", text }, audio()] }), + ).not.toThrow(); }); it.each<{ label: string; request: GenerateRequest }>([ diff --git a/test/config.test.ts b/test/config.test.ts index dcef3c5..4fb1477 100644 --- a/test/config.test.ts +++ b/test/config.test.ts @@ -303,14 +303,15 @@ describe("config", () => { expect(JSON.parse(client.stringifyModelConfig(model, { format: "json" }))).toEqual(declaration); } - expect(client.getModel("qwen-audio-3.1-tts-flash")?.description).toBe( - "Modes: voice_prompt design OR one-reference clone. Text: >=15 Unicode code points. Tier: default; Alibaba's low-latency tier. Conflict: ask user; never combine/reinterpret. Dependency: clone prior generated audio.", - ); - expect(client.getModel("qwen-audio-3.1-tts-plus")?.description).toBe( - "Modes: voice_prompt design OR one-reference clone. Text: >=15 Unicode code points. Tier: Alibaba's quality tier (audiobooks, dubbing); only when user or external policy selects it. Conflict: ask user; never combine/reinterpret. Dependency: clone prior generated audio.", - ); - for (const model of qwenModels) { - expect(client.getModel(model)?.content.input.find((input) => input.type === "text")?.description).toContain( + for (const [model, tier] of [ + ["qwen-audio-3.1-tts-flash", "Tier: default Qwen TTS."], + ["qwen-audio-3.1-tts-plus", "Tier: only when user/policy selects Plus."], + ] as const) { + const declaration = client.getModel(model); + expect(declaration?.description).toBe( + `Modes: voice_prompt design OR one-reference clone. Text: >=15 Unicode code points. ${tier} Conflict: ask user; never combine/reinterpret. Dependency: clone prior generated audio.`, + ); + expect(declaration?.content.input.find((input) => input.type === "text")?.description).toContain( "at least 15 Unicode code points", ); } @@ -329,9 +330,7 @@ describe("config", () => { expect(readme).toContain("Conflict: reference + redesign requires user choice before generation"); expect(readme).toContain("Dependency: clone prior generated audio"); expect(readme).toContain("Short text: input under 15 Unicode code points is rejected"); - expect(readme).toContain( - "In any row, use `qwen-audio-3.1-tts-plus` instead only when the user or an external policy selects it", - ); + expect(readme).toContain("use `qwen-audio-3.1-tts-plus` only when the user or an external policy selects it"); expect(readme).not.toMatch(/quality prioritized over latency|latency prioritized over maximum quality/); }); From aaab70ab671c8c4711cc4d9bd9cc801d7a20dafa Mon Sep 17 00:00:00 2001 From: LingXuanYin <3546599908@qq.com> Date: Wed, 28 Oct 2026 08:11:06 +0800 Subject: [PATCH 2/3] Revert "feat: declare qwen-audio-3.1-tts-plus beside qwen-audio-3.1-tts-flash" This reverts commit 72789c3009d92625000630937d39bb89dd8edb51. --- README.md | 6 ++-- models/qwen-audio-3.1-tts-flash.yaml | 4 +-- models/qwen-audio-3.1-tts-plus.yaml | 45 ---------------------------- src/adapters/audio-speech.ts | 4 +-- src/builtins.ts | 32 +++++++------------- test/adapters/audio-speech.test.ts | 39 ------------------------ test/config.test.ts | 25 ++++++---------- test/live/audio-speech-live.test.ts | 8 ----- 8 files changed, 26 insertions(+), 137 deletions(-) delete mode 100644 models/qwen-audio-3.1-tts-plus.yaml diff --git a/README.md b/README.md index adfef6f..ce98f22 100644 --- a/README.md +++ b/README.md @@ -309,7 +309,6 @@ const client = createGenerationClient({ - `z-image-turbo` - `qwen-image-edit` - `qwen-audio-3.1-tts-flash` -- `qwen-audio-3.1-tts-plus` - `gemini-3.1-flash-image-preview` - `kling-text-to-video` - `kling-image-to-video` @@ -402,7 +401,7 @@ await client.generate({ ## Text to speech -`qwen-tts`, `qwen-audio-3.0-tts-plus` and `qwen-audio-3.0-tts-flash` are removed in this release. Migrate to `qwen-audio-3.1-tts-flash`, or to `qwen-audio-3.1-tts-plus`, which this release adds; both need input of at least 15 Unicode code points. +`qwen-tts`, `qwen-audio-3.0-tts-plus` and `qwen-audio-3.0-tts-flash` are removed in this release. Migrate to `qwen-audio-3.1-tts-flash`; its input must have at least 15 Unicode code points. Each TTS request accepts exactly one non-empty text block and returns one URL audio block. Choose the model from the requested voice mode and priority before constructing the request: @@ -412,8 +411,7 @@ Each TTS request accepts exactly one non-empty text block and returns one URL au | Clone a voice from one reference recording | `qwen-audio-3.1-tts-flash`; pass one HTTP(S) reference URL and no `voice_prompt` | | Use a default voice, including a delegated choice expressed only as any, random, suitable, or natural | `qwen-audio-3.1-tts-flash` with a short generic `voice_prompt`, such as a natural, neutral narrator | -- Qwen: `voice_prompt` design OR one-reference clone via `qwen-audio-3.1-tts-flash` (default) or `qwen-audio-3.1-tts-plus`; both require at least 15 Unicode code points. -- Tier: use `qwen-audio-3.1-tts-plus` only when the user or an external policy selects it; otherwise use Flash. Alibaba describes Flash as its low-latency tier and Plus as its quality tier for audiobooks and dubbing; the SDK has not measured either. +- Qwen: `voice_prompt` design OR one-reference clone via `qwen-audio-3.1-tts-flash`; requires at least 15 Unicode code points. - Conflict: reference + redesign requires user choice before generation. - Dependency: clone prior generated audio. - Short text: input under 15 Unicode code points is rejected; ask the user to lengthen it. diff --git a/models/qwen-audio-3.1-tts-flash.yaml b/models/qwen-audio-3.1-tts-flash.yaml index 2f53bba..10233cb 100644 --- a/models/qwen-audio-3.1-tts-flash.yaml +++ b/models/qwen-audio-3.1-tts-flash.yaml @@ -1,8 +1,8 @@ schema: neta.generation.model.v1 model: qwen-audio-3.1-tts-flash title: Qwen Audio 3.1 TTS Flash -description: "Modes: voice_prompt design OR one-reference clone. Text: >=15 Unicode code points. Tier: default Qwen TTS. - Conflict: ask user; never combine/reinterpret. Dependency: clone prior generated audio." +description: "Modes: voice_prompt design OR one-reference clone. Text: >=15 Unicode code points. Conflict: ask user; + never combine/reinterpret. Dependency: clone prior generated audio." adapter: type: openai.audioSpeech content: diff --git a/models/qwen-audio-3.1-tts-plus.yaml b/models/qwen-audio-3.1-tts-plus.yaml deleted file mode 100644 index 4146d93..0000000 --- a/models/qwen-audio-3.1-tts-plus.yaml +++ /dev/null @@ -1,45 +0,0 @@ -schema: neta.generation.model.v1 -model: qwen-audio-3.1-tts-plus -title: Qwen Audio 3.1 TTS Plus -description: "Modes: voice_prompt design OR one-reference clone. Text: >=15 Unicode code points. Tier: only when - user/policy selects Plus. Conflict: ask user; never combine/reinterpret. Dependency: clone prior generated audio." -adapter: - type: openai.audioSpeech -content: - input: - - type: text - required: true - min: 1 - max: 1 - description: Exactly one non-empty text block to speak, with at least 15 Unicode code points. - - type: audio - required: false - max: 1 - sources: - - url - description: "Clone: one URL; no voice_prompt. Dependency: use prior generated audio." -meta: - fields: - voice_prompt: - type: string - optional: true - description: "Design: custom voice text; no reference audio." -examples: - - title: Voice design - request: - model: qwen-audio-3.1-tts-plus - content: - - type: text - text: 这是一段长度足够并且表达清晰自然的语音合成测试文本。 - meta: - voice_prompt: 一位沉稳干练的男性播音员声音,吐字清晰有力 - - title: Voice clone - request: - model: qwen-audio-3.1-tts-plus - content: - - type: text - text: 这是一段长度足够并且表达清晰自然的语音合成测试文本。 - - type: audio - source: - type: url - url: https://example.com/reference.mp3 diff --git a/src/adapters/audio-speech.ts b/src/adapters/audio-speech.ts index afc438e..99d65b9 100644 --- a/src/adapters/audio-speech.ts +++ b/src/adapters/audio-speech.ts @@ -8,7 +8,7 @@ import type { } from "../types.js"; const REQUEST_TIMEOUT_MS = 210_000; -const QWEN_MODELS: ReadonlySet = new Set(["qwen-audio-3.1-tts-flash", "qwen-audio-3.1-tts-plus"]); +const QWEN_MODEL = "qwen-audio-3.1-tts-flash"; type TextBlock = Extract; type AudioBlock = Extract; @@ -97,7 +97,7 @@ function validateQwen(input: ResolvedGenerationRequest, text: TextBlock, audio: function validateAudioSpeechRequest(input: ResolvedGenerationRequest): void { const { text, audio } = validateCommonContent(input); - if (QWEN_MODELS.has(input.declaration.model)) { + if (input.declaration.model === QWEN_MODEL) { validateQwen(input, text, audio); return; } diff --git a/src/builtins.ts b/src/builtins.ts index 6218b90..ea719a4 100644 --- a/src/builtins.ts +++ b/src/builtins.ts @@ -708,14 +708,13 @@ function geminiImageModel( }; } -const QWEN_TTS_TEXT = "这是一段长度足够并且表达清晰自然的语音合成测试文本。"; - -function qwenAudio31TtsModel(model: string, title: string, tier: string): GenerationModelDeclaration { - return { +const audioSpeechModels = [ + { schema: MODEL_SCHEMA, - model, - title, - description: `Modes: voice_prompt design OR one-reference clone. Text: >=15 Unicode code points. ${tier} Conflict: ask user; never combine/reinterpret. Dependency: clone prior generated audio.`, + model: "qwen-audio-3.1-tts-flash", + title: "Qwen Audio 3.1 TTS Flash", + description: + "Modes: voice_prompt design OR one-reference clone. Text: >=15 Unicode code points. Conflict: ask user; never combine/reinterpret. Dependency: clone prior generated audio.", adapter: { type: "openai.audioSpeech" }, content: { input: [ @@ -748,32 +747,23 @@ function qwenAudio31TtsModel(model: string, title: string, tier: string): Genera { title: "Voice design", request: { - model, - content: [{ type: "text", text: QWEN_TTS_TEXT }], + model: "qwen-audio-3.1-tts-flash", + content: [{ type: "text", text: "这是一段长度足够并且表达清晰自然的语音合成测试文本。" }], meta: { voice_prompt: "一位沉稳干练的男性播音员声音,吐字清晰有力" }, }, }, { title: "Voice clone", request: { - model, + model: "qwen-audio-3.1-tts-flash", content: [ - { type: "text", text: QWEN_TTS_TEXT }, + { type: "text", text: "这是一段长度足够并且表达清晰自然的语音合成测试文本。" }, { type: "audio", source: { type: "url", url: "https://example.com/reference.mp3" } }, ], }, }, ], - }; -} - -const audioSpeechModels = [ - qwenAudio31TtsModel("qwen-audio-3.1-tts-flash", "Qwen Audio 3.1 TTS Flash", "Tier: default Qwen TTS."), - qwenAudio31TtsModel( - "qwen-audio-3.1-tts-plus", - "Qwen Audio 3.1 TTS Plus", - "Tier: only when user/policy selects Plus.", - ), + }, ] satisfies GenerationModelDeclaration[]; const meshyTaskParameters = { diff --git a/test/adapters/audio-speech.test.ts b/test/adapters/audio-speech.test.ts index bedc9a3..8d5d93d 100644 --- a/test/adapters/audio-speech.test.ts +++ b/test/adapters/audio-speech.test.ts @@ -101,25 +101,6 @@ describe("openai.audioSpeech adapter requests", () => { ]); }); - it("sends qwen-audio-3.1-tts-plus as given while preserving Qwen input and voice prompt", async () => { - const { client, calls } = recordingClient(); - const input = " 原样保留的朗读文本内容,不应被修改。\n"; - const voicePrompt = " 沉稳清晰的声音。\n"; - - await client.generate({ - model: "qwen-audio-3.1-tts-plus", - content: [{ type: "text", text: input }], - meta: { voice_prompt: voicePrompt }, - }); - - expect(calls).toHaveLength(1); - expect(requestBody(calls[0])).toEqual({ - model: "qwen-audio-3.1-tts-plus", - input, - metadata: { voice_prompt: voicePrompt }, - }); - }); - it("maps Qwen reference audio and trims only its URL", async () => { const { client, calls } = recordingClient(); await client.generate({ @@ -239,16 +220,6 @@ describe("openai.audioSpeech adapter validation", () => { ).toThrow("supports at most one reference audio"); }); - it("accepts the qwen-audio-3.1-tts-plus declaration and a valid request", () => { - const declaration = getBuiltinGenerationModel("qwen-audio-3.1-tts-plus"); - if (!declaration) throw new Error("qwen-audio-3.1-tts-plus declaration is unavailable"); - const client = createGenerationClient({ models: [declaration], includeBuiltinModels: false, apiKey: "key" }); - - expect(() => - client.validate({ model: "qwen-audio-3.1-tts-plus", content: [{ type: "text", text: QWEN_TEXT }, audio()] }), - ).not.toThrow(); - }); - it("rejects a higgs-tts declaration at the audio speech adapter", () => { const declaration = { schema: "neta.generation.model.v1", @@ -278,16 +249,6 @@ describe("openai.audioSpeech adapter validation", () => { ).toThrow("requires input of at least 15 Unicode code points"); }); - it.each([ - { text: "a".repeat(14) }, - { text: "😀".repeat(14) }, - ])("rejects qwen-audio-3.1-tts-plus input below 15 Unicode code points ($text)", ({ text }) => { - const client = createGenerationClient({ apiKey: "key" }); - expect(() => - client.validate({ model: "qwen-audio-3.1-tts-plus", content: [{ type: "text", text }, audio()] }), - ).toThrow("requires input of at least 15 Unicode code points"); - }); - it.each([ { text: "a".repeat(15) }, { text: ` ${"😀".repeat(15)} ` }, diff --git a/test/config.test.ts b/test/config.test.ts index 4fb1477..285e8d1 100644 --- a/test/config.test.ts +++ b/test/config.test.ts @@ -91,7 +91,6 @@ describe("config", () => { expect(byCategory.decision.sort()).toEqual([...expected.decision]); for (const model of [ "qwen-audio-3.1-tts-flash", - "qwen-audio-3.1-tts-plus", "suno_cover_chirp_v5", "suno_image_to_song_chirp_v5", "suno_infill_chirp_v5", @@ -283,7 +282,7 @@ describe("config", () => { it("publishes agent-discoverable audio speech declarations", () => { const client = createGenerationClient(); - const qwenModels = ["qwen-audio-3.1-tts-flash", "qwen-audio-3.1-tts-plus"]; + const qwenModels = ["qwen-audio-3.1-tts-flash"]; for (const model of qwenModels) { const declaration = client.getModel(model); @@ -303,18 +302,13 @@ describe("config", () => { expect(JSON.parse(client.stringifyModelConfig(model, { format: "json" }))).toEqual(declaration); } - for (const [model, tier] of [ - ["qwen-audio-3.1-tts-flash", "Tier: default Qwen TTS."], - ["qwen-audio-3.1-tts-plus", "Tier: only when user/policy selects Plus."], - ] as const) { - const declaration = client.getModel(model); - expect(declaration?.description).toBe( - `Modes: voice_prompt design OR one-reference clone. Text: >=15 Unicode code points. ${tier} Conflict: ask user; never combine/reinterpret. Dependency: clone prior generated audio.`, - ); - expect(declaration?.content.input.find((input) => input.type === "text")?.description).toContain( - "at least 15 Unicode code points", - ); - } + const flash = client.getModel("qwen-audio-3.1-tts-flash"); + expect(flash?.description).toBe( + "Modes: voice_prompt design OR one-reference clone. Text: >=15 Unicode code points. Conflict: ask user; never combine/reinterpret. Dependency: clone prior generated audio.", + ); + expect(flash?.content.input.find((input) => input.type === "text")?.description).toContain( + "at least 15 Unicode code points", + ); expect(client.getModel("higgs-tts")).toBeNull(); }); @@ -330,7 +324,6 @@ describe("config", () => { expect(readme).toContain("Conflict: reference + redesign requires user choice before generation"); expect(readme).toContain("Dependency: clone prior generated audio"); expect(readme).toContain("Short text: input under 15 Unicode code points is rejected"); - expect(readme).toContain("use `qwen-audio-3.1-tts-plus` only when the user or an external policy selects it"); expect(readme).not.toMatch(/quality prioritized over latency|latency prioritized over maximum quality/); }); @@ -567,7 +560,7 @@ describe("config", () => { it("does not publish the retired Qwen preview field", async () => { const client = createGenerationClient({ apiKey: "test" }); - for (const model of ["qwen-audio-3.1-tts-flash", "qwen-audio-3.1-tts-plus"]) { + for (const model of ["qwen-audio-3.1-tts-flash"]) { expect(client.stringifyModelConfig(model)).not.toContain("preview_text"); } expect(await readFile(join(process.cwd(), "README.md"), "utf8")).not.toContain("preview_text"); diff --git a/test/live/audio-speech-live.test.ts b/test/live/audio-speech-live.test.ts index f0f22ef..aedfb6c 100644 --- a/test/live/audio-speech-live.test.ts +++ b/test/live/audio-speech-live.test.ts @@ -52,14 +52,6 @@ liveDescribe("audio speech live router smoke", () => { meta: { voice_prompt: "一位沉稳干练的男性播音员声音,吐字清晰有力" }, }, }, - { - name: "qwen plus voice design", - request: { - model: "qwen-audio-3.1-tts-plus", - content: [text(`这是高质量音色设计端到端测试,运行编号${runId}。`)], - meta: { voice_prompt: "一位沉稳干练的男性播音员声音,吐字清晰有力" }, - }, - }, { name: "qwen voice clone", request: { From 67d5177b1213fc271d1ea98d98681da11b87a1c3 Mon Sep 17 00:00:00 2001 From: LingXuanYin <3546599908@qq.com> Date: Wed, 28 Oct 2026 08:11:23 +0800 Subject: [PATCH 3/3] docs: note that qwen-audio-3.1-tts-plus is withdrawn in 0.2.1 --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index ce98f22..71568ac 100644 --- a/README.md +++ b/README.md @@ -401,7 +401,7 @@ await client.generate({ ## Text to speech -`qwen-tts`, `qwen-audio-3.0-tts-plus` and `qwen-audio-3.0-tts-flash` are removed in this release. Migrate to `qwen-audio-3.1-tts-flash`; its input must have at least 15 Unicode code points. +`qwen-tts`, `qwen-audio-3.0-tts-plus` and `qwen-audio-3.0-tts-flash` are removed in 0.2.0, and `qwen-audio-3.1-tts-plus`, declared in 0.2.0, is withdrawn in 0.2.1. Migrate to `qwen-audio-3.1-tts-flash`; its input must have at least 15 Unicode code points. Each TTS request accepts exactly one non-empty text block and returns one URL audio block. Choose the model from the requested voice mode and priority before constructing the request: