Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion docs/guides/user-guide.md
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,9 @@ For video generation, choose a mode supported by the model:

For audio generation, enter the text to be read aloud in the prompt. Supported vLLM-Omni speech models, MOSS Open Platform, and MiniMax Official Speech offer **Voice library** beside the model controls. The library opens above the composer with **All voices**, **My voices**, and **Favorites**. Click a compatible voice’s name to select it. When a preview is available, click the circular play button to listen. When a compatible voice has no preview, its icon and card background also select it. Metadata filters appear only when supplied by the service.

On MOSS Open Platform, select the stable `moss-tts-1.5-flash` or `moss-tts-1.0-pro` model, or choose its dated snapshot to pin a version. All four use the same voice library on a given account connection. The library shows up to 150 MOSS voices per page. Use **Next page** and **Previous page** to browse. Filters and the Favorites tab show matches on the current page.
On MOSS Open Platform, select the stable `moss-tts-1.5-flash` or `moss-tts-1.0-pro` model, or choose its dated snapshot to pin a version. All four use the same voice library on a given account connection. The library shows up to 150 MOSS voices per page. Use **Next page** and **Previous page** to browse. The **Favorites** tab shows saved voices from across the catalog. If an older favorite needs voice details, the library finds them in the background.

Use **Search voices** to match part of a voice name across pages in the active tab. Matches appear as pages load, and the library keeps looking for more until it reaches the last page. Switching tabs keeps your query and returns to the first results page. Use **Clear search** to stop searching and return to browsing in that tab.

For MiniMax, choose **Settings → Model connections → Audio → Add service → MiniMax Official Speech**, enter your mainland China API key, and save `speech-2.8-hd` or `speech-2.8-turbo`. The preset uses `https://api.minimax.cn/v1`. Unsupported model IDs are rejected when saving the service; choose a supported model from the preset. In an audio node, select that model, choose a system voice from **Voice library**, and enter up to 3,000 characters. MiniMax recommends streaming for longer text; this integration uses non-streaming synthesis. Reference assets, voice cloning, voice design, and deletion are not supported by this integration. The system voice API does not provide previews; selecting a voice does not start a paid synthesis request. Compatible MiniMax speech models on the same account connection retain the selection.

Expand Down
4 changes: 3 additions & 1 deletion docs/guides/user-guide.zh-CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,9 @@ GPT Image 模型可在“生成参数”中选择“质量”,取值为“自

音频生成时,在提示词中填写需要朗读的正文。受支持的 vLLM-Omni 语音模型、MOSS 开放平台和 MiniMax 官方语音会在模型控件旁显示**音色库**。点击后在创作区上方打开**全部音色 / 我的音色 / 收藏**。点击兼容音色的名称即可选用。有试听音频时,点击圆形播放按钮即可试听。兼容音色没有试听音频时,点击图标或卡片空白处也可以选用。筛选项仅根据服务实际提供的元数据显示。

在 MOSS 开放平台上,可选择稳定版 `moss-tts-1.5-flash` 或 `moss-tts-1.0-pro`,也可以选择带日期的快照来固定版本。同一账户连接下,这四个型号共用音色库。每页最多显示 150 个 MOSS 音色,点击**下一页**或**上一页**可以翻页。筛选和收藏标签显示当前页中符合条件的音色。
在 MOSS 开放平台上,可选择稳定版 `moss-tts-1.5-flash` 或 `moss-tts-1.0-pro`,也可以选择带日期的快照来固定版本。同一账户连接下,这四个型号共用音色库。每页最多显示 150 个 MOSS 音色,点击**下一页**或**上一页**可以翻页。**收藏**标签显示整个音色库中已收藏的音色。旧收藏缺少音色详情时,音色库会在后台查找。

在**搜索音色**中输入名称的一部分,可在当前标签内跨页匹配。已找到的音色会随分页加载显示,音色库继续查找直到最后一页。切换标签会保留关键词,并返回匹配结果的第一页。点击**清除搜索**可停止搜索并恢复当前标签的浏览。

使用 MiniMax 时,选择**设置 → 模型接入 → 音频 → 添加服务 → MiniMax 官方语音**,填写中国站 API Key,保存 `speech-2.8-hd` 或 `speech-2.8-turbo`。预设地址为 `https://api.minimax.cn/v1`。保存服务时会拒绝不支持的型号,请选择预设中的受支持型号。在音频节点中选择该模型,从**音色库**选择系统音色,再填写最多 3,000 个字符的朗读文本;MiniMax 建议更长的文本使用流式输出,当前接入仅支持非流式合成。本接入不支持参考素材、音色克隆、音色设计或删除。系统音色接口不提供试听文件;选择音色不会发起付费合成请求。同一账户连接下的兼容 MiniMax 语音模型可以保留选择。

Expand Down
12 changes: 11 additions & 1 deletion packages/core/src/opendirector/application/voice_library.py
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,17 @@ def _pages(self, config, capabilities, limit, after=None):
while True:
self._assert_current(config, capabilities)
if capabilities['provider'] == 'moss':
records, cursor = self._moss_page(config, capabilities, limit, after)
try:
records, cursor = self._moss_page(config, capabilities, limit, after)
except ProjectError as failure:
if limit <= 50 or failure.status != 502 or failure.code != 'voice_provider_error':
raise
# Some account pages fail at a larger limit. Retry the same
# cursor with less data and keep the smaller size thereafter.
if monotonic() >= deadline:
raise voice_error('voice_provider_timeout', 504) from None
limit = 100 if limit > 100 else 50
continue
elif capabilities['provider'] == 'minimax':
records, cursor = self._minimax_page(config, capabilities)
elif capabilities['provider'] == 'zhipu':
Expand Down
12 changes: 7 additions & 5 deletions src/backend/voices.ts
Original file line number Diff line number Diff line change
Expand Up @@ -67,16 +67,18 @@ export function voiceIssue(
return "voiceLibrary.transcriptRequired";
return null;
}
export const VOICE_PAGE_SIZE = 150;

export function listVoices(
modelConfigId: string,
signal?: AbortSignal,
page?: { connectionId: string; after?: string },
scope?: { connectionId: string; page?: { after?: string; size?: number } },
) {
const query = new URLSearchParams({ modelConfigId });
if (page) {
query.set("pageSize", "150");
query.set("connectionId", page.connectionId);
if (page.after) query.set("after", page.after);
if (scope) query.set("connectionId", scope.connectionId);
if (scope?.page) {
query.set("pageSize", String(scope.page.size ?? VOICE_PAGE_SIZE));
if (scope.page.after) query.set("after", scope.page.after);
}
return request<VoiceLibraryData>(`/voices?${query}`, { signal });
}
Expand Down
Loading
Loading