fix: remove unsupport voice

This commit is contained in:
clh02467605
2026-06-23 17:08:37 +08:00
parent 30a0bbbc87
commit fd36db5cab
3 changed files with 20 additions and 24 deletions
+3 -7
View File
@@ -31,18 +31,14 @@ interface VoiceEntry {
// qwen-omni 系统音色
const OMNI_VOICES: VoiceEntry[] = [
{ voice: "Tina", name: "甜妹", desc: "甜美亲切", lang: "中文/英文" },
{ voice: "Dylan", name: "北京-晓东", desc: "胡同少年", lang: "中文/北京" },
{ voice: "Kiki", name: "粤语-阿清", desc: "甜美港妹", lang: "中文/英文" },
{ voice: "Li", name: "南京-老李", desc: "南京大叔", lang: "中文/英文" },
{ voice: "Sunny", name: "四川-晴儿", desc: "甜飒川妹", lang: "中文" },
{ voice: "Elias", name: "墨讲师", desc: "学术讲师女", lang: "中文/英文" },
{ voice: "Nofish", name: "不吃鱼", desc: "南方口音男", lang: "中文/英文" },
{ voice: "Marcus", name: "陕西-秦川", desc: "陕北汉子", lang: "中文/英文" },
{ voice: "Eric", name: "四川-程川", desc: "成都大哥", lang: "中文/英文" },
{ voice: "Jada", name: "上海-阿珍", desc: "沪上阿姐", lang: "中文" },
{ voice: "Rocky", name: "粤语-阿强", desc: "幽默港仔", lang: "中文/英文" },
{ voice: "Cherry", name: "芊悦", desc: "阳光自然女", lang: "中文/英文" },
{ voice: "Roy", name: "闽南-阿杰", desc: "闽南哥仔", lang: "中文/英文" },
{ voice: "Jennifer", name: "詹妮弗", desc: "美剧大女主", lang: "中文/英文" },
{ voice: "Ryan", name: "甜茶", desc: "美剧张力男", lang: "中文/英文" },
{ voice: "Katerina", name: "卡捷琳娜", desc: "御姐深情女", lang: "中文/英文" },
@@ -150,7 +146,7 @@ export default defineCommand({
},
{
flag: "--voice <voice>",
description: "Output voice ID (default: Cherry). Use --list-voices to see all options",
description: "Output voice ID (default: Tina). Use --list-voices to see all options",
},
{
flag: "--list-voices",
@@ -199,7 +195,7 @@ export default defineCommand({
}
const model = (flags.model as string) || config.defaultOmniModel || "qwen3.5-omni-plus";
const voice = (flags.voice as string) || "Cherry";
const voice = (flags.voice as string) || "Tina";
const audioFormat = (flags.audioFormat as string) || "wav";
const textOnly = flags.textOnly === true;
const format = detectOutputFormat(config.output);
+2 -2
View File
@@ -24,9 +24,9 @@ describe.skipIf(!isBailianE2EMediaEnabled() || !isDashScopeE2EReady())(
const { stdout, stderr, exitCode } = await runCli(["omni", "--list-voices"]);
expect(exitCode, stderr).toBe(0);
expect(stdout).toMatch(/Omni output voices:/);
expect(stdout).toMatch(/Tina/);
expect(stdout).toMatch(/Dylan/);
expect(stdout).toMatch(/Cherry/);
expect(stdout).toMatch(/Total: 17 voices/);
expect(stdout).toMatch(/Total: 13 voices/);
});
test("omni 缺少 --message 时打印子命令帮助并退出 (0)", async () => {
const { stderr, exitCode } = await runCli([
+15 -15
View File
@@ -23,21 +23,21 @@ Index: [index.md](index.md)
#### Options
| Flag | Type | Required | Description |
| ---------------------- | ------- | -------- | ----------------------------------------------------------------------- |
| `--message <text>` | array | yes | Message text (repeatable, prefix role: to set role) |
| `--model <model>` | string | no | Model ID (default: qwen3.5-omni-plus) |
| `--system <text>` | string | no | System prompt |
| `--image <url>` | array | no | Image URL or local file (repeatable) |
| `--audio <url>` | array | no | Audio URL or local file (.wav/.mp3/.amr/.aac/.m4a/.ogg/.3gp/.3gpp) |
| `--video <url>` | array | no | Video file URL / local path, or comma-separated frame URLs |
| `--voice <voice>` | string | no | Output voice ID (default: Cherry). Use --list-voices to see all options |
| `--list-voices` | boolean | no | List available output voices and exit |
| `--audio-format <fmt>` | string | no | Audio output format (default: wav) |
| `--audio-out <path>` | string | no | Save audio to file (default: auto-generate) |
| `--text-only` | boolean | no | Output text only, no audio generation |
| `--max-tokens <n>` | number | no | Maximum tokens to generate |
| `--temperature <n>` | number | no | Sampling temperature (0.0, 2.0] |
| Flag | Type | Required | Description |
| ---------------------- | ------- | -------- | --------------------------------------------------------------------- |
| `--message <text>` | array | yes | Message text (repeatable, prefix role: to set role) |
| `--model <model>` | string | no | Model ID (default: qwen3.5-omni-plus) |
| `--system <text>` | string | no | System prompt |
| `--image <url>` | array | no | Image URL or local file (repeatable) |
| `--audio <url>` | array | no | Audio URL or local file (.wav/.mp3/.amr/.aac/.m4a/.ogg/.3gp/.3gpp) |
| `--video <url>` | array | no | Video file URL / local path, or comma-separated frame URLs |
| `--voice <voice>` | string | no | Output voice ID (default: Tina). Use --list-voices to see all options |
| `--list-voices` | boolean | no | List available output voices and exit |
| `--audio-format <fmt>` | string | no | Audio output format (default: wav) |
| `--audio-out <path>` | string | no | Save audio to file (default: auto-generate) |
| `--text-only` | boolean | no | Output text only, no audio generation |
| `--max-tokens <n>` | number | no | Maximum tokens to generate |
| `--temperature <n>` | number | no | Sampling temperature (0.0, 2.0] |
#### Examples