dsh-audiogen 0.4.20 → 0.4.22

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -20,8 +20,9 @@
20
20
  - **Prompt enhancement**: rewrite a rough idea into a ready-to-generate description with an LLM (pick any model from *Settings → Models*; falls back to the agent default model)
21
21
  - **History with one-click restore**: prompt, config, model set *and the original audio* come back into the panel — no regeneration, no extra cost
22
22
  - **Resource library**: auto-save generated audio (or opt in per run), organized by type — voices / music / SFX / TTS — with search, tags, rename, category moves, and full provenance (channel, model, voice id, prompt, params snapshot). Reuse a voice or music bed instead of regenerating
23
- - **Agent tools**: `generate_audio` and `search_audio_library`, `manage_audio_voices` (vendor voice browsing/deletion), plus bundled session skills — the Agent can generate and find audio on demand
24
- - **Panel voice management**: a «音色» tab in the AI 音频 panelbrowse/filter vendor voices (language/keyword/source + official ElevenLabs shared-voice filters), preview, delete account-owned voices (confirmed) and backfill the chosen `voice_id` into the TTS form
23
+ - **Agent tools**: `generate_audio` and `search_audio_library`, `manage_audio_voices` (vendor voice browsing/deletion + prompt-based voice recommendation + **role voice casting**), plus bundled session skills — the Agent can generate and find audio on demand
24
+ - **Role voice casting**: assign a primary voice (+ backups) to each character of a novel/game `manage_audio_voices` `action=cast` takes character profiles (JSON array/object or a text description structured first) and applies deterministic hard filters (gender/age/use_case strict; accent is a preference relaxed only when the strict pool is empty) per character; the Agent picks voices globally (no primary reuse across lead/major roles) and `action=save_cast` validates membership, auto-fills backups, flags reuse and persists the plan to `~/.dsh/dsh-audiogen/cast-selections.json`; then TTS with the chosen `voice_id` (or design a custom voice first via `generate_audio(mode=voice_design)`)
25
+ - **Panel voice management**: a «音色» entry in the studio's left mode row (next to TTS/music/SFX/voice-design) — browse/filter vendor voices (language/keyword/source + official ElevenLabs shared-voice filters), ask the agent default model to recommend voices for a natural-language requirement (e.g. «清亮甜美的少女音»), preview, delete account-owned voices (confirmed) and backfill the chosen `voice_id` into the TTS form; **every AI recommendation is recorded automatically** (last 50, shared by panel and Agent) so you can revisit requirements/channels/reasons and reuse a voice later
25
26
  - **Keys stay local**: API keys live in the local DSH settings document and generation is proxied by the local host; the browser and the Agent never touch plaintext credentials
26
27
 
27
28
  ## 📸 Screenshots
@@ -79,7 +80,7 @@ Restart `dsh web` after install — the sidebar will show the **AI Audio** entry
79
80
  | Tool | Purpose |
80
81
  | --- | --- |
81
82
  | `generate_audio` | Submit a TTS / music / SFX / voice-design task; waits for completion and returns same-origin audio URLs. Optional `enhance_prompt`, `save_to_library`, per-vendor params. |
82
- | `manage_audio_voices` | Browse/filter the vendor voice libraries (MiniMax, ElevenLabs) with language/keyword/source filters, and delete account-owned voices (official/shared/system voices are read-only and refused). Then use the returned `voice_id` with `generate_audio` (mode=tts). |
83
+ | `manage_audio_voices` | Browse/filter the vendor voice libraries (MiniMax, ElevenLabs) with language/keyword/source filters; recommend top-k voices for a natural-language requirement (`action=recommend`, uses the agent default model, ids validated against the pool); **role casting** (`action=cast` prepares per-character filtered candidate pools from character profiles; `action=save_cast` validates + persists the plan); delete account-owned voices (official/shared/system voices are read-only and refused). Then use the returned `voice_id` with `generate_audio` (mode=tts). |
83
84
  | `search_audio_library` | Search the local resource library (type / category / keyword) and reuse an existing voice, music bed or effect. |
84
85
 
85
86
  Typical session commands (skills bundled with the plugin):
package/README.zh-CN.md CHANGED
@@ -20,8 +20,9 @@
20
20
  - **✨ 提示词增强**:把一句粗略想法扩写成适合生成模型的完整描述,LLM 模型可在「设置 → 模型」中任选(缺省跟随 Agent 默认模型,无需额外 API Key)
21
21
  - **历史记录一键恢复**:prompt、配置、模型组合**以及当时的音频**全部回到面板——可直接试听/下载,无需重新生成、不额外消耗
22
22
  - **资源库**:生成后可一键入库(或设置自动保存),按类型分目录——音色 voice / 音乐 music / 音效 sfx / TTS——支持搜索、标签、重命名、移动分类,并保留完整溯源(渠道、模型、voiceId、提示词、参数快照)。同款音色/配乐/音效直接复用,不必重复生成
23
- - **Agent 工具**:`generate_audio`、`search_audio_library` 与 `manage_audio_voices`(厂商音色浏览/删除),并随包分发 TTS/音乐/音效/音色设计会话技能
24
- - **面板音色管理**:AI 音频面板新增「音色」页 浏览/筛选厂商音色(语言/关键词/来源 + ElevenLabs 官方共享库筛选)、试听、删除账户自建音色(需确认)、一键把选定 `voice_id` 回填到 TTS 表单
23
+ - **Agent 工具**:`generate_audio`、`search_audio_library` 与 `manage_audio_voices`(厂商音色浏览/删除 + 按需求描述推荐音色 + **角色音色选角 cast**),并随包分发 TTS/音乐/音效/音色设计/选角会话技能
24
+ - **角色音色选角(casting)**:为小说/游戏配音逐角色分配主音色 + 备用音色——`manage_audio_voices` `action=cast` 接收角色画像(JSON 数组/对象或文本整理后的 JSON),按性别/年龄/用途做确定性硬过滤(accent 为偏好、候选为空才放松)返回每角色候选池;Agent 在上下文中全局选角(lead/major 主音色不复用)后 `action=save_cast` 校验 voice_id 属于候选池、自动补齐备份、标记复用警告并持久化到 `~/.dsh/dsh-audiogen/cast-selections.json`,随后按选定 `voice_id` 生成 TTS(也可先用 `generate_audio(mode=voice_design)` 为角色创作专属音色)
25
+ - **面板音色管理**:生成页左侧模式栏新增「音色」入口(与 TTS/音乐/音效/音色设计并列)— 浏览/筛选厂商音色(语言/关键词/来源 + ElevenLabs 官方共享库筛选)、按需求描述让 Agent 默认模型推荐音色(如「清亮甜美的少女音」)、试听、删除账户自建音色(需确认)、一键把选定 `voice_id` 回填到 TTS 表单;**每次 AI 推荐自动记录**(最近 50 条,面板与 Agent 共用),可随时回看需求/渠道/推荐理由并直接复用
25
26
  - **密钥留在本机**:API 密钥存于本地 DSH 设置文档,生成请求由本地宿主代理转发,浏览器与 Agent 全程不接触明文密钥
26
27
 
27
28
  ## 📸 截图
@@ -79,7 +80,7 @@ dsh plugin --profile web add /path/to/dsh-audiogen
79
80
  | 工具 | 用途 |
80
81
  | --- | --- |
81
82
  | `generate_audio` | 提交 TTS / 音乐 / 音效 / 音色设计任务,等待完成后返回同源音频 URL;支持 `enhance_prompt`、`save_to_library` 与各厂商参数。 |
82
- | `manage_audio_voices` | 浏览/筛选厂商音色库(MiniMax、ElevenLabs,支持语言/关键词/来源筛选),删除账户自有音色(官方/共享/系统音色只读并拒绝);随后把返回的 `voice_id` 交给 `generate_audio`(mode=tts)即可生成。 |
83
+ | `manage_audio_voices` | 浏览/筛选厂商音色库(MiniMax、ElevenLabs,支持语言/关键词/来源筛选);按需求描述推荐音色(`action=recommend`,复用 Agent 默认模型,返回音色 + 推荐理由,voice_id 校验为候选池真实成员);**角色选角**(`action=cast` 传角色画像 → 按性别/年龄/用途硬过滤出每角色候选池,`action=save_cast` 校验落盘);删除账户自有音色(官方/共享/系统音色只读并拒绝);随后把返回的 `voice_id` 交给 `generate_audio`(mode=tts)即可生成。 |
83
84
  | `search_audio_library` | 检索本地资源库(类型/分类/关键词),复用已有音色、配乐或音效。 |
84
85
 
85
86
  会话内常用指令(插件自带技能):