index-tts2-skills

通过调用本地运行的 IndexTTS2 WebUI 后端 /gen_single 接口(使用 gradio_client)本地生成语音音频,复用已加载的 TTS 模型以避免二次加载和双重显存占用。用于在本机合成语音、克隆已保存的预设人声或自动化 IndexTTS2 TTS 工作流。

安装方式

先用 Prompt 核对来源与依赖。也可下载安装包。

用 AI 助手安装

复制提示词,让助手先核对固定版本和依赖。

查看 Prompt收起 Prompt
先检查当前 Agent 是否已安装 SkillPI Skill Finder。如果尚未安装,请按官方仓库的说明安装并启用:https://github.com/Findskills/skillpi。然后使用 Skill Finder 打开此 SkillPI 详情页并定位 "index-tts2-skills":https://skillpi.com/zh/skills/deepskill-bfca5d1e11779b51cea6e2a5f9e6aafd155878c812eb6a8c66750d25f0f98d58。安装前核对上游来源和版本:https://skillhub.cn/skills/user_d0c0b7f4/index-tts2-skills。来源不一致时停止并说明差异。核对通过后,用 Skill Finder 安装目标 Skill,并报告安装路径和来源版本。

来源与配置

skillhub.cn

配置方式待核实

请查看原始来源中的适用工具、依赖和权限要求。

安装实测待补充

通过调用本地运行的 IndexTTS2 WebUI 后端 /gen_single 接口(使用 gradio_client)本地生成语音音频,复用已加载的 TTS 模型以避免二次加载和双重显存占用。用于在本机合成语音、克隆已保存的预设人声或自动化 IndexTTS2 TTS 工作流。

0 下载

介绍来源: third_party · user_d0c0b7f4 · 1.0.1 参考来源

SkillPi 解读

能完成的任务
Generate speech audio locally through a running IndexTTS2 WebUI by calling its backend /gen_single endpoint with gradio_client, reusing the already-loaded TTS model (no second model load, no double VRAM). Use when the user wants to synthesize speech / 口播 narration locally, clone a saved preset voice (e.g. "Hai"), or automate IndexTTS2 TTS on this machine.
适合谁
The user asks to generate 口播 / narration / voiceover audio on this machine. The user mentions IndexTTS2, its WebUI, or the `Hai` voice preset. The user wants to automate TTS generation instead of clicking through the WebUI.
软件、账号及付费要求
翻译待完成,请参阅来源文档。
实测状态
未测试

文件浏览

在原站浏览文件 ↗

原始 SKILL.md

打开原文 ↗
Frontmatter
name: index-tts2-skills
slug: index-tts2-skills
displayName: "IndexTTS2 本地语音合成"
version: "1.0.1"
description: 'Generate speech audio locally through a running IndexTTS2 WebUI by calling its backend /gen_single endpoint with gradio_client, reusing the already-loaded TTS model (no second model load, no double VRAM). Use when the user wants to synthesize speech / 口播 narration locally, clone a saved preset voice (e.g. "Hai"), or automate IndexTTS2 TTS on this machine.'
agent_created: true

IndexTTS2 Local TTS

Overview

Drive a locally installed IndexTTS2 instance to turn text into speech, using the same inference path as the WebUI's "生成语音" button but invoked programmatically. The approach calls the already-running webui.py process through gradio_client, so the model is never loaded twice and VRAM is not doubled. The default voice is the user's Hai preset.

When to use

  • The user asks to generate 口播 / narration / voiceover audio on this machine.
  • The user mentions IndexTTS2, its WebUI, or the Hai voice preset.
  • The user wants to automate TTS generation instead of clicking through the WebUI.

Prerequisites

  • IndexTTS2 installed locally with a working uv environment (default project dir ~/Documents/index-tts-main).
  • A voice preset under outputs/presets/{name}/ (default Hai).
  • gradio_client available in that project's uv environment (it ships with the WebUI deps). Run the helper script with uv run python so the import resolves.

Workflow

  1. Ensure the WebUI is up. Check 127.0.0.1:7860. If not listening and the task allows it, start it in the background with nohup uv run webui.py > /tmp/indextts_webui.log 2>&1 & (run from the project dir). First load takes 1–2 minutes. The bundled script also auto-starts it.
  2. Pick the preset + write the copy. Load outputs/presets/{name}/prompt.wav as the voice reference. For a target duration, aim for ~4.5 Chinese characters per second (e.g. ~90 chars for a 20s clip).
  3. Generate via the script. Call scripts/generate_tts.py (see below). It reads the live /gen_single signature, fills defaults, overrides only the driven fields, and returns the wav path (OUTPUT:{path}).
  4. Deliver the file. If --output is given, the script copies the wav there; otherwise report the path under outputs/spk_{timestamp}.wav.

✅ 完成判据:脚本打印 OUTPUT:{绝对路径} 且目标 wav 文件存在 = 生成成功;缺 OUTPUT: 行或文件不存在 = 失败,需看 [index-tts2] 进度行与报错(常见:WebUI 未起、preset 名错、emo 参数非法)。

Using the bundled script

Run from the IndexTTS2 project directory so uv resolves dependencies:

cd ~/Documents/index-tts-main
uv run python ~/.workbuddy/skills/index-tts2-skills/scripts/generate_tts.py \
    --text "大家好,今天想跟大伙儿分享一个小习惯……" \
    --preset Hai \
    --output "./hai_tts_demo.wav"

Common flags:

  • --text — the narration copy (required).
  • --preset — preset name under outputs/presets/ (default Hai).
  • --project — IndexTTS2 root (default ~/Documents/index-tts-main).
  • --host/--port — WebUI address (default 127.0.0.1:7860).
  • --output — destination wav; if omitted, only the source path is printed.
  • --emo-weight — emotion strength 0–1.5 (default 1.0).
  • --emo-mode — override emo_control_method option text (default choices[0]).
  • --target-seconds N — print a suggested character count, does not truncate copy.
  • --no-auto-start — fail instead of auto-launching the WebUI when it is down.

The script prints progress lines prefixed with [index-tts2] and a final OUTPUT:{absolute-path} line for easy parsing.

Reference

For the full /gen_single parameter table, the file-data wrapping format, and the pitfalls encountered while wiring this up, read references/api_reference.md. Key points to remember:

  • emo_control_method must be passed as an option text, not a numeric index.
  • The voice-reference audio must be wrapped as a Gradio FileData dict, not a bare path.
  • gen_single returns a gr.update(...) dict; the real wav lands in outputs/spk_{timestamp}.wav.

Notes

  • The WebUI process may be left running between calls; the script reuses it. Tell the user it is still up, or kill it, as they prefer.
  • Apple MPS inference is slower than CUDA; budget extra time on Apple Silicon.

当前收录版本

1.0.1

核对来源版本 ↗

安全与评测信息

质量评测

满分100 · 来自 SkillPi LAB 实验室的评测报告。

场景价值85/100

亮点

  • 提供本地语音合成能力,解决用户口播/旁白生成需求
  • 支持预设语音克隆和自动化 TTS,具有明确实用价值
触发精准88/100

亮点

  • 触发词覆盖合理,明确描述 IndexTTS2、Hai 预设等使用场景
  • 边界清晰,不易与其他 Skill 重叠
结构规范92/100

亮点

  • 文档结构清晰完整,包含完整的工作流程和示例
  • frontmatter 完整,有明确的完成判据和参考文档
执行可靠88/100

亮点

  • 工具来源明确,参数说明详细,覆盖主要异常场景
  • 提供自动启动机制和清晰的完成判据
证据可验 (前四项均值)88/100

取前四项原始分值的算术平均,四舍五入取整。可通过收录报告核对各项评分与说明,运行记录需单独查证。

正文静态检测

100 / 100 · skillpi-20261123-no-r3-v1

正文未命中当前规则。

分数仅反映正文中的规则命中,供使用前参考。附件与运行行为不在此评分范围内。

权限与使用前检查

根据当前主文档自动整理,命中内容可能是示例或防护说明;不是实际权限声明,也未覆盖附件、外部依赖或运行行为。

未从主文档识别到上述常见操作,不能据此判断无需权限或没有风险。

本站展示提示不会授予权限。涉及文件改动、密钥、外部发送或费用时,仍由你使用的工具按需确认。

安全评级与访问范围

safe · 静态证据核验,不代表运行安全保证。

翻译待完成,请参阅来源文档。

使用前请由宿主核对并授权实际文件读写、外部服务和联网目的地;本站的核验不会授予任何运行权限。