Skip to content

armgit / cindy

Public Imported from GitHub
0

Consider it done. The open-source AI agent that works out of the box · 想到,就能做到。开源、开箱即用的 AI Agent。

feat(desktop): add Gateway speech reference voices

JiangJiahao273270ad5688
diff --git a/apps/desktop/scripts/fixtures/voice-settings/ui-page.mjs b/apps/desktop/scripts/fixtures/voice-settings/ui-page.mjs
index fbaccac669..7de049f7a7 100644
--- a/apps/desktop/scripts/fixtures/voice-settings/ui-page.mjs
+++ b/apps/desktop/scripts/fixtures/voice-settings/ui-page.mjs
@@ -12,6 +12,36 @@ export default {
'const empty = {}; export const EMPTY_LIGHT_STATE = empty; export const makerChatStore = { subscribeLight: () => () => {}, getLightSnapshot: () => empty };',
},
cases: {
+ 'gateway-elevenlabs': {
+ about: 'Gateway replacement reference voices with separate selection and audition',
+ data: {
+ gatewayReference: true,
+ protocol: 'openai',
+ modelId: 'elevenlabs/eleven_v3',
+ menu: true,
+ },
+ },
+ 'gateway-minimax': {
+ about: 'Gateway MiniMax system candidates in a narrow drawer, still labeled as references',
+ viewport: { width: 320, height: 900 },
+ data: {
+ gatewayReference: true,
+ protocol: 'openai',
+ modelId: 'minimax/speech-2.8-turbo',
+ menu: true,
+ },
+ },
+ 'gateway-manual': {
+ about: 'A saved manual Gateway voice survives a populated reference catalog and preview',
+ viewport: { width: 320, height: 900 },
+ data: {
+ gatewayReference: true,
+ protocol: 'openai',
+ modelId: 'elevenlabs/eleven_multilingual_v2',
+ manual: true,
+ speed: 0.95,
+ },
+ },
default: { about: 'ElevenLabs default 1× without an override', data: {} },
narrow: {
about: 'Saved speed in a narrow settings drawer',
@@ -170,6 +200,39 @@ export default {
return;
}
assert.equal(await standalonePreview.count(), 0);
+ if (ui.data.gatewayReference) {
+ const label = await ui.t('bots.voiceMode.voice');
+ const trigger = page.getByRole('button', { name: label, exact: true });
+ const menu = page.getByRole('dialog', { name: label });
+ const voices = await page.evaluate(() => window.__uiPage.ctx.data.gatewayVoices);
+ const choice = voices[1];
+ await page.getByText(await ui.t('bots.voiceMode.voicesReference'), { exact: true }).waitFor();
+ await menu.getByRole('button', { name: choice.name, exact: true }).focus();
+ await page.keyboard.press('Tab');
+ const preview = menu.getByRole('button', {
+ name: await ui.t('bots.voiceMode.previewVoice', { voice: choice.name }),
+ exact: true,
+ });
+ assert.equal(await preview.evaluate((el) => el === document.activeElement), true);
+ await ui.capture('reference-menu');
+ await page.keyboard.press('Enter');
+ await page.waitForFunction(() => window.__uiPage.ctx.data.previewRequests.length === 1);
+ const request = await page.evaluate(() => window.__uiPage.ctx.data.previewRequests[0]);
+ assert.equal(request.providerId, 'xd');
+ assert.equal(request.modelId, ui.data.modelId);
+ assert.equal(request.voice, choice.id);
+ assert.equal(await page.evaluate(() => window.__uiPage.ctx.data.savedVoice), voices[0].id);
+ await page.keyboard.press('Escape');
+ await menu.waitFor({ state: 'hidden' });
+ assert.equal(await trigger.evaluate((el) => el === document.activeElement), true);
+ await page
+ .getByRole('button', { name: await ui.t('bots.voiceMode.refreshVoices'), exact: true })
+ .click();
+ assert.equal(await page.evaluate(() => window.__uiPage.ctx.data.previewRequests.length), 1);
+ assert.equal(await page.evaluate(() => window.__uiPage.ctx.data.savedVoice), voices[0].id);
+ await trigger.click();
+ return;
+ }
if (ui.data.systemCatalog) {
const label = await ui.t('bots.voiceMode.voice');
const trigger = page.getByRole('button', { name: label, exact: true });
diff --git a/apps/desktop/scripts/fixtures/voice-settings/voice-settings-fixture.tsx b/apps/desktop/scripts/fixtures/voice-settings/voice-settings-fixture.tsx
index 54a9540dc5..30dc2d98b7 100644
--- a/apps/desktop/scripts/fixtures/voice-settings/voice-settings-fixture.tsx
+++ b/apps/desktop/scripts/fixtures/voice-settings/voice-settings-fixture.tsx
@@ -1,6 +1,7 @@
import { mountPage, forbid } from '../../ui-page/harness';
import { CompanionVoiceSettings } from '../../../src/renderer/features/bots/voice/CompanionVoiceSettings';
import { alibabaSystemVoices } from '../../../src/shared/alibabaSpeechVoices';
+import { gatewayReferenceSpeechVoices } from '../../../src/shared/speechVoices';
import type {
SpeechProtocol,
VoiceConversationPreference,
@@ -18,12 +19,19 @@ mountPage({
host: (ctx) => {
const protocol = (ctx.data.protocol ?? 'elevenlabs') as SpeechProtocol;
const modelId = String(ctx.data.modelId ?? 'eleven_flash_v2_5');
- const referenceVoice = String(ctx.data.voiceId ?? 'river');
+ const gatewayVoices = ctx.data.gatewayReference ? gatewayReferenceSpeechVoices(modelId) : [];
+ const providerId = ctx.data.gatewayReference ? 'xd' : 'fixture';
+ const agent = ctx.data.gatewayReference ? undefined : ('codex' as const);
+ const referenceVoice = String(ctx.data.voiceId ?? gatewayVoices[0]?.id ?? 'river');
const initialVoice = ctx.data.manual ? 'custom-voice' : referenceVoice;
const systemVoices = alibabaSystemVoices(modelId, protocol);
- ctx.data.voiceLabel = ctx.data.systemCatalog
- ? systemVoices.find((voice) => voice.id === referenceVoice)?.name
- : undefined;
+ ctx.data.gatewayVoices = gatewayVoices;
+ ctx.data.voiceId = ctx.data.voiceId ?? (ctx.data.gatewayReference ? referenceVoice : undefined);
+ ctx.data.voiceLabel = ctx.data.gatewayReference
+ ? gatewayVoices.find((voice) => voice.id === referenceVoice)?.name
+ : ctx.data.systemCatalog
+ ? systemVoices.find((voice) => voice.id === referenceVoice)?.name
+ : undefined;
const pending = new Map<string, () => void>();
const previews: Array<{ voice: string; speed?: number; previewId: string }> = [];
const stops: string[] = [];
@@ -32,8 +40,8 @@ mountPage({
ctx.data.savedVoice = initialVoice;
let preference: VoiceConversationPreference = {
selection: {
- providerId: 'fixture',
- agent: 'codex',
+ providerId,
+ agent,
modelId,
voice: initialVoice,
...(ctx.data.custom ? { protocol } : {}),
@@ -54,55 +62,58 @@ mountPage({
{
id: modelId,
name: modelId,
- providerId: 'fixture',
- providerName:
- protocol === 'elevenlabs'
+ providerId,
+ providerName: ctx.data.gatewayReference
+ ? 'Cindy AI'
+ : protocol === 'elevenlabs'
? 'ElevenLabs'
: protocol === 'minimax'
? 'MiniMax'
: protocol === 'qwen-tts' || protocol === 'dashscope-tts'
? 'Alibaba Cloud'
: 'OpenAI',
- agent: 'codex',
+ agent,
protocol: ctx.data.custom ? undefined : protocol,
protocolLocked: !ctx.data.custom,
defaultVoice: referenceVoice,
},
],
voices: async () =>
- ctx.data.systemCatalog
- ? {
- source: ctx.data.customCatalog ? 'mixed' : 'reference',
- ...(ctx.data.customCatalogFailure ? { customVoicesUnavailable: true } : {}),
- voices: [
- ...systemVoices,
- ...(ctx.data.customCatalog
- ? [{ id: 'account-clone', name: 'My Custom Voice' }]
- : []),
- ],
- }
- : {
- source: ctx.data.voiceId ? 'reference' : 'provider',
- voices: [
- {
- id: referenceVoice,
- name: ctx.data.voiceId
- ? referenceVoice
- : 'River — Relaxed, Neutral, Informative',
- },
- ...(ctx.data.menu
- ? [
- { id: 'bella', name: 'Bella — Professional, Bright, Warm' },
- { id: 'sarah', name: 'Sarah — Mature, Reassuring, Confident' },
- { id: 'roger', name: 'Roger — Laid-Back, Casual, Resonant' },
- { id: 'laura', name: 'Laura — Enthusiast, Quirky Attitude' },
- { id: 'charlie', name: 'Charlie — Deep, Confident, Energetic' },
- { id: 'george', name: 'George — Warm, Captivating Storyteller' },
- { id: 'callum', name: 'Callum — Husky, Trickster' },
- ]
- : []),
- ],
- },
+ ctx.data.gatewayReference
+ ? { source: 'reference', voices: gatewayVoices.map((voice) => ({ ...voice })) }
+ : ctx.data.systemCatalog
+ ? {
+ source: ctx.data.customCatalog ? 'mixed' : 'reference',
+ ...(ctx.data.customCatalogFailure ? { customVoicesUnavailable: true } : {}),
+ voices: [
+ ...systemVoices,
+ ...(ctx.data.customCatalog
+ ? [{ id: 'account-clone', name: 'My Custom Voice' }]
+ : []),
+ ],
+ }
+ : {
+ source: ctx.data.voiceId ? 'reference' : 'provider',
+ voices: [
+ {
+ id: referenceVoice,
+ name: ctx.data.voiceId
+ ? referenceVoice
+ : 'River — Relaxed, Neutral, Informative',
+ },
+ ...(ctx.data.menu
+ ? [
+ { id: 'bella', name: 'Bella — Professional, Bright, Warm' },
+ { id: 'sarah', name: 'Sarah — Mature, Reassuring, Confident' },
+ { id: 'roger', name: 'Roger — Laid-Back, Casual, Resonant' },
+ { id: 'laura', name: 'Laura — Enthusiast, Quirky Attitude' },
+ { id: 'charlie', name: 'Charlie — Deep, Confident, Energetic' },
+ { id: 'george', name: 'George — Warm, Captivating Storyteller' },
+ { id: 'callum', name: 'Callum — Husky, Trickster' },
+ ]
+ : []),
+ ],
+ },
preference: async () => preference,
setPreference: async (
_botId: string,
diff --git a/apps/desktop/src/main/voice-conversation/__tests__/models.test.ts b/apps/desktop/src/main/voice-conversation/__tests__/models.test.ts
index a470fd99cd..79be6fc2c5 100644
--- a/apps/desktop/src/main/voice-conversation/__tests__/models.test.ts
+++ b/apps/desktop/src/main/voice-conversation/__tests__/models.test.ts
@@ -8,6 +8,7 @@ import {
} from '@cindy/model-providers';
import { resolveSpeechConnection, speechModels, type SpeechCatalogDeps } from '../models.js';
import { speechRequest } from '../speechProtocols.js';
+import { loadSpeechVoices } from '../voices.js';
import { normalizeVoiceInputSettings } from '../../../shared/voiceInputData.js';
import { voiceModelKey } from '../../../shared/voiceConversation.js';
@@ -88,6 +89,28 @@ it('keeps Gateway entitlement and supported-protocol gates', () => {
expect(speechModels({ ...d, gatewayAllowed: false })).toEqual([]);
});
+// Unit: a new Gateway selection needs a usable reference default, while a saved
+// manual ID remains the request value. Existing OpenAI-only fixtures missed this.
+it.each(['elevenlabs/eleven_multilingual_v2', 'minimax/speech-2.8-hd'])(
+ 'uses the reference default without restricting manual voices for %s',
+ async (modelId) => {
+ const d = deps([{ id: 'xd', audioModels: [model(modelId)] }] as Catalog['providers']);
+ const selected = speechModels(d)[0];
+ expect(selected.defaultVoice).not.toBe('');
+ const choice = { providerId: 'xd', modelId, voice: 'saved-manual-voice' };
+ const connection = resolveSpeechConnection(d, choice);
+ const fetcher = vi.fn();
+ const catalog = await loadSpeechVoices(connection, modelId, fetcher, () => {}, 'xd');
+ expect(catalog.voices[0]?.id).toBe(selected.defaultVoice);
+ expect(JSON.parse(speechRequest(connection, { ...choice, text: 'hello' }).body)).toMatchObject({
+ model: modelId,
+ voice: choice.voice,
+ response_format: 'pcm',
+ });
+ expect(fetcher).not.toHaveBeenCalled();
+ },
+);
+
// Unit regression: resolveSpeechConnection -> speechRequest must send Gateway TTS
// to /v1/audio/speech. Live root endpoints returned 404; previous fixtures already
// included /v1. Cover the root, existing API base and deployment prefix without I/O.
diff --git a/apps/desktop/src/main/voice-conversation/__tests__/service.test.ts b/apps/desktop/src/main/voice-conversation/__tests__/service.test.ts
index 5091aa51e6..072b5b9b28 100644
--- a/apps/desktop/src/main/voice-conversation/__tests__/service.test.ts
+++ b/apps/desktop/src/main/voice-conversation/__tests__/service.test.ts
@@ -19,6 +19,27 @@ const previewSelection = {
voice: 'alloy',
text: 'voice sample',
};
+// Unit regression: Gateway catalogs were empty for these authorized speech models.
+// Exercise the service entrance so same-ID BYOK connections cannot inherit Gateway
+// references; catalog reads must not trigger a paid preview or allocate ASR.
+it.each(['elevenlabs/eleven_multilingual_v2', 'elevenlabs/eleven_v3', 'minimax/speech-2.8-turbo'])(
+ 'offers named references only on the Gateway route for %s',
+ async (modelId) => {
+ const { service, deps } = fixture();
+ const catalog = await service.voices({ modelId });
+ expect(catalog.source).toBe('reference');
+ expect(catalog.voices).toHaveLength(4);
+ expect(catalog.voices.every(({ id, name }) => id && name && id !== name)).toBe(true);
+ expect(await service.voices({ providerId: 'xd', modelId })).toEqual(catalog);
+ expect(await service.voices({ providerId: 'custom', agent: 'codex', modelId })).toEqual({
+ source: 'manual',
+ voices: [],
+ });
+ expect(deps.fetch).not.toHaveBeenCalled();
+ expect(deps.createProvider).not.toHaveBeenCalled();
+ },
+);
+
describe('voice preview ownership', () => {
it('synthesizes the exact selection without allocating ASR, and excludes concurrent calls', async () => {
const { service, deps } = fixture();
diff --git a/apps/desktop/src/main/voice-conversation/__tests__/voices.test.ts b/apps/desktop/src/main/voice-conversation/__tests__/voices.test.ts
index de0532f371..14ffd8b046 100644
--- a/apps/desktop/src/main/voice-conversation/__tests__/voices.test.ts
+++ b/apps/desktop/src/main/voice-conversation/__tests__/voices.test.ts
@@ -48,6 +48,12 @@ describe('provider voice catalogs', () => {
source: 'manual',
voices: [],
});
+ // A known vendor prefix alone must not invent compatibility for new versions.
+ for (const modelId of ['elevenlabs/eleven_v4', 'minimax/speech-3.0-hd', 'speech-2.8-hd']) {
+ expect(
+ await loadSpeechVoices(connection('openai'), modelId, fetcher, () => {}, 'xd'),
+ ).toEqual({ source: 'manual', voices: [] });
+ }
expect(fetcher).not.toHaveBeenCalled();
});
diff --git a/apps/desktop/src/main/voice-conversation/models.ts b/apps/desktop/src/main/voice-conversation/models.ts
index f304952257..41d5d212f5 100644
--- a/apps/desktop/src/main/voice-conversation/models.ts
+++ b/apps/desktop/src/main/voice-conversation/models.ts
@@ -19,7 +19,7 @@ import {
type SpeechModelSelection,
type VoiceConversationSelection,
} from '../../shared/voiceConversation.js';
-import { referenceSpeechVoices } from '../../shared/speechVoices.js';
+import { gatewayReferenceSpeechVoices, referenceSpeechVoices } from '../../shared/speechVoices.js';
import type { SpeechConnection } from './speech.js';
export type SpeechCatalogDeps = {
@@ -134,7 +134,10 @@ function bindings(deps: SpeechCatalogDeps, selection?: SpeechModelSelection): Bi
providerId: 'xd',
providerName: provider.name,
protocol: 'openai',
- defaultVoice: referenceSpeechVoices(media.id, 'openai')[0] ?? '',
+ defaultVoice:
+ gatewayReferenceSpeechVoices(media.id)[0]?.id ??
+ referenceSpeechVoices(media.id, 'openai')[0] ??
+ '',
},
connection: {
baseUrl: base.toString().replace(/\/+$/, ''),
diff --git a/apps/desktop/src/main/voice-conversation/service.ts b/apps/desktop/src/main/voice-conversation/service.ts
index 5c2145c827..bb3861ee9d 100644
--- a/apps/desktop/src/main/voice-conversation/service.ts
+++ b/apps/desktop/src/main/voice-conversation/service.ts
@@ -80,13 +80,19 @@ export class VoiceConversationService {
const owner = this.deps.owner();
const connection = this.deps.connection(selection);
const identity = JSON.stringify(connection);
- return loadSpeechVoices(connection, selection.modelId, this.deps.fetch, () => {
- if (
- this.deps.owner() !== owner ||
- JSON.stringify(this.deps.connection(selection)) !== identity
- )
- throw new Error('connection_changed');
- });
+ return loadSpeechVoices(
+ connection,
+ selection.modelId,
+ this.deps.fetch,
+ () => {
+ if (
+ this.deps.owner() !== owner ||
+ JSON.stringify(this.deps.connection(selection)) !== identity
+ )
+ throw new Error('connection_changed');
+ },
+ selection.providerId ?? 'xd',
+ );
}
/** Preview uses the exact synthesis adapter without starting ASR or submitting a task. */
diff --git a/apps/desktop/src/main/voice-conversation/voices.ts b/apps/desktop/src/main/voice-conversation/voices.ts
index 407f8c18f4..d017dc1292 100644
--- a/apps/desktop/src/main/voice-conversation/voices.ts
+++ b/apps/desktop/src/main/voice-conversation/voices.ts
@@ -3,7 +3,7 @@ import {
type SpeechVoiceCatalog,
type SpeechVoice,
} from '../../shared/voiceConversation.js';
-import { referenceSpeechVoices } from '../../shared/speechVoices.js';
+import { gatewayReferenceSpeechVoices, referenceSpeechVoices } from '../../shared/speechVoices.js';
import { alibabaSystemVoices } from '../../shared/alibabaSpeechVoices.js';
import { loadDashscopeVoices } from './dashscopeVoices.js';
import type { SpeechConnection } from './speech.js';
@@ -51,8 +51,14 @@ export async function loadSpeechVoices(
modelId: string,
fetcher: typeof fetch,
assertCurrent: () => void,
+ providerId?: string,
): Promise<SpeechVoiceCatalog> {
assertCurrent();
+ if (providerId === 'xd' && connection.protocol === 'openai') {
+ const voices = gatewayReferenceSpeechVoices(modelId);
+ if (voices.length)
+ return { source: 'reference', voices: voices.map((voice) => ({ ...voice })) };
+ }
if (connection.protocol === 'openai' || connection.protocol === 'qwen-tts') {
const voices =
connection.protocol === 'qwen-tts'
diff --git a/apps/desktop/src/shared/speechVoices.ts b/apps/desktop/src/shared/speechVoices.ts
index da136d8ebd..b12afcf6e8 100644
--- a/apps/desktop/src/shared/speechVoices.ts
+++ b/apps/desktop/src/shared/speechVoices.ts
@@ -1,5 +1,35 @@
import { alibabaSystemVoices } from './alibabaSpeechVoices.js';
-import type { SpeechProtocol } from './voiceConversation.js';
+import type { SpeechProtocol, SpeechVoice } from './voiceConversation.js';
+
+// Public reference data only. Caller must already have resolved the Cindy AI
+// Gateway route; these IDs do not declare model access or an execution protocol.
+// Official replacements for Default voices retiring on 2026-12-31:
+// https://elevenlabs.io/docs/help-center/product/voices/my-voices/what-are-default-voices
+// IDs/names verified with /v1/shared-voices on 2026-10-22. Do not include private clones.
+const GATEWAY_ELEVENLABS: readonly SpeechVoice[] = [
+ { id: 'OZ0L6eISlOejga3XjDFt', name: 'Talia - Warm Soft Guide' },
+ { id: 'gOupLcAkjEnguROwi4oS', name: 'Darian - Warm Grounded Storyteller' },
+ { id: '6WwXjDDEMyNmFG95zycZ', name: 'Eldrin - Crisp British Baritone' },
+ { id: 'dvbL7qkNGZY1IqPGZAjM', name: 'Elowen - Upbeat Modern Narrator' },
+];
+
+// Candidates from the official system list, not Gateway-verified voices:
+// https://platform.minimax.io/docs/faq/system-voice-id
+const GATEWAY_MINIMAX: readonly SpeechVoice[] = [
+ { id: 'Chinese (Mandarin)_Warm_HeartedGirl', name: 'Warm-hearted Girl' },
+ { id: 'Chinese (Mandarin)_Reliable_Executive', name: 'Reliable Executive' },
+ { id: 'English_CalmWoman', name: 'Calm Woman' },
+ { id: 'English_Trustworth_Man', name: 'Trustworthy Man' },
+];
+
+export function gatewayReferenceSpeechVoices(modelId: string): readonly SpeechVoice[] {
+ if (['elevenlabs/eleven_multilingual_v2', 'elevenlabs/eleven_v3'].includes(modelId))
+ return GATEWAY_ELEVENLABS;
+ // Exact documented versions, including their Gateway namespace. Unknown/new
+ // models stay manual until their voice contract has been checked.
+ if (/^minimax\/speech-(?:2\.[68]|0[12])-(?:hd|turbo)$/.test(modelId)) return GATEWAY_MINIMAX;
+ return [];
+}
// Model-specific reference lists, not a provider capability declaration. Compatible
// endpoints may expose a different set; manual IDs and a real preview remain available.
diff --git a/docs/product-rules/companion-voice-mode.md b/docs/product-rules/companion-voice-mode.md
index 28b53c2ad6..8fe54a576f 100644
--- a/docs/product-rules/companion-voice-mode.md
+++ b/docs/product-rules/companion-voice-mode.md
@@ -94,8 +94,9 @@
- 参数依据:[OpenAI Speech](https://developers.openai.com/api/reference/resources/audio/subresources/speech/methods/create)、[ElevenLabs speed](https://elevenlabs.io/docs/eleven-creative/playground/text-to-speech#speed)、[MiniMax HTTP TTS](https://platform.minimax.io/docs/api-reference/speech-t2a-http)。
- **OpenAI 兼容**:仅对已知精确型号及已知格式的日期版本提供代码内的官方参考列表;`gpt-4o-mini-tts` 与 `tts-1` / `tts-1-hd` 的集合分开。未知型号不强行填 `alloy`,也不探测不存在的通用 `/voices`。兼容服务可能只实现部分音色,列表明确标注为参考,是否可用仍需试听。[资料来源](https://developers.openai.com/api/docs/guides/text-to-speech#voice-options)。
-- **ElevenLabs**:从对应连接的 `/v2/voices` 分页查询账号音色;由既有 `/v1` base 替换末段,保留代理 origin 和路径前缀。无版本后缀的自定义代理尝试其 `<base>/voices` 旧接口。`high_quality_base_model_ids` 不作为模型可用性的硬过滤条件。失败时允许重试或手动输入。[资料来源](https://elevenlabs.io/docs/api-reference/voices/search)。
-- **MiniMax**:调用 `<base>/get_voice`,`voice_type: all`,合并 `system_voice`、`voice_cloning`、`voice_generation`;名称与 ID 分开,缺名称时显示 ID。音色 ID 接受真实型号所需的空格、括号等字符,保留长度、控制字符和路径分隔符校验。[资料来源](https://platform.minimax.io/docs/api-reference/voice-management-get)。
+- **Cindy AI Gateway**:在服务端尚未提供音色目录接口时,仅为明确匹配的 `elevenlabs/eleven_multilingual_v2`、`elevenlabs/eleven_v3` 和 `minimax/speech-{2.8,2.6,02,01}-{hd,turbo}` 提供各 4 个公共参考音色,维护在 `shared/speechVoices.ts`。ElevenLabs 采用官方旧默认音色的替代项 Talia、Darian、Eldrin、Elowen;MiniMax 采用官方系统音色候选,不宣称已通过 Gateway 验证。进入页面和刷新均读取本地参考表,不探测 `/voices`,不增加可用模型或授权。仅新选择使用参考默认值,已有音色 ID 和手动输入继续保留,试听仍使用当前 Gateway 的真实合成接口。未来接入 Gateway 音色目录时,应以该连接的成功响应为准(包括空列表),不能用参考列表掩盖服务端结果。[ElevenLabs 替代说明](https://elevenlabs.io/docs/help-center/product/voices/my-voices/what-are-default-voices)、[MiniMax 系统音色](https://platform.minimax.io/docs/faq/system-voice-id)。
+- **BYOK ElevenLabs**:从对应连接的 `/v2/voices` 分页查询账号音色;由既有 `/v1` base 替换末段,保留代理 origin 和路径前缀。无版本后缀的自定义代理尝试其 `<base>/voices` 旧接口。`high_quality_base_model_ids` 不作为模型可用性的硬过滤条件。失败时允许重试或手动输入。[资料来源](https://elevenlabs.io/docs/api-reference/voices/search)。
+- **BYOK MiniMax**:调用 `<base>/get_voice`,`voice_type: all`,合并 `system_voice`、`voice_cloning`、`voice_generation`;名称与 ID 分开,缺名称时显示 ID。音色 ID 接受真实型号所需的空格、括号等字符,保留长度、控制字符和路径分隔符校验。[资料来源](https://platform.minimax.io/docs/api-reference/voice-management-get)。
- 音色选项与当前选中项默认只显示名称及供应商提供的风格说明;同名音色附加短 ID 尾缀,尾缀冲突时延长至可区分,缺名称时回退为完整 ID。不提供已选音色的 ID 展示栏或复制入口;手动输入仅作为目录外音色的兜底。显示缩写不改变选择值、伙伴偏好或合成请求中的完整 ID,也不触发已有偏好重写。
- 进入页面先读取该伙伴已保存的选择,并显示所选音色上次成功获取的名称,再后台刷新目录;名称变化只更新显示,不改选音色、不重写伙伴偏好。没有名称缓存时,在原选择框内显示加载状态,不提前判定已选音色缺失或展开手动输入框。同一路由刷新保留现有名称和列表,刷新失败保留已知名称并提供重试提示;没有已知名称且获取失败、返回空列表或成功获取后已选 ID 未收录时才进入手动输入兜底,用户也可主动选择手动输入。切换伙伴、连接、runtime、型号或接口后立即隔离旧列表,迟到结果不能覆盖当前页面。加载状态使用既有控件和 Spinner,不通过新增、移除一整块表单表达加载。
- 目录请求只在 Main 使用当前连接的凭证,拒绝重定向,限制 15 秒、每页 2MB 和最多 1000 个音色 / 10 页;超过显示范围时提示手动输入兜底。账号、密钥或路由在请求期间变化则丢弃结果。账号专属完整音色列表只留在面板内存,不写入公共 Registry 或新的配置文件;已有伙伴偏好仅保存所选 ID,不自动迁移或重写。所选音色的显示名称单独缓存在现有 Renderer localStorage,按账号、伙伴、完整模型路由及音色 ID 匹配,每个账号最多 64 条,不含凭证或执行权限;重开、Renderer 重载后可复用,缓存损坏或不可用不影响真实配置。账号切换前发起的迟到请求不得写入缓存。