index-tts2-skills
Installation
Review the source and dependencies with a prompt. A package is available to download.
Install with an AI assistant
Copy the prompt so your assistant can review the pinned revision and dependencies first.
View promptHide prompt
Check whether SkillPI Skill Finder is installed for your current agent. If it is missing, install and enable it using the official instructions at https://github.com/Findskills/skillpi. Then use Skill Finder to locate and install "index-tts2-skills" from this exact SkillPI detail page: https://skillpi.com/skills/deepskill-bfca5d1e11779b51cea6e2a5f9e6aafd155878c812eb6a8c66750d25f0f98d58. Verify the upstream source and version against https://skillhub.cn/skills/user_d0c0b7f4/index-tts2-skills before installing. If they do not match, stop and report the mismatch. Report the installed path and source version.
Source and setup
skillhub.cn
Setup guidance pending
See the original source for supported tools, dependencies, and permissions.
Installation test pending
Generate speech audio locally by calling the /gen_single endpoint of a running IndexTTS2 WebUI backend (using gradio_client), reusing the already-loaded TTS model to avoid a second model load and double VRAM usage. Use for local speech synthesis, cloning a saved preset voice, or automating IndexTTS2 TTS on this machine.
Introduction source: third_party · user_d0c0b7f4 · 1.0.1 Reference
SkillPi interpretation
- Tasks
- Translation pending; see source documentation.
- Audience
- Translation pending; see source documentation.
- Software, accounts and paid services
- 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.
- Testing
- Not tested
Browse files
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: trueIndexTTS2 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
Haivoice preset. - The user wants to automate TTS generation instead of clicking through the WebUI.
Prerequisites
- IndexTTS2 installed locally with a working
uvenvironment (default project dir~/Documents/index-tts-main). - A voice preset under
outputs/presets/{name}/(defaultHai). gradio_clientavailable in that project'suvenvironment (it ships with the WebUI deps). Run the helper script withuv run pythonso the import resolves.
Workflow
- Ensure the WebUI is up. Check
127.0.0.1:7860. If not listening and the task allows it, start it in the background withnohup 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. - Pick the preset + write the copy. Load
outputs/presets/{name}/prompt.wavas the voice reference. For a target duration, aim for ~4.5 Chinese characters per second (e.g. ~90 chars for a 20s clip). - Generate via the script. Call
scripts/generate_tts.py(see below). It reads the live/gen_singlesignature, fills defaults, overrides only the driven fields, and returns the wav path (OUTPUT:{path}). - Deliver the file. If
--outputis given, the script copies the wav there; otherwise report the path underoutputs/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 underoutputs/presets/(defaultHai).--project— IndexTTS2 root (default~/Documents/index-tts-main).--host/--port— WebUI address (default127.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— overrideemo_control_methodoption text (defaultchoices[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_methodmust be passed as an option text, not a numeric index.- The voice-reference audio must be wrapped as a Gradio
FileDatadict, not a bare path. gen_singlereturns agr.update(...)dict; the real wav lands inoutputs/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.
Current listing version
1.0.1
Safety and assessment details
Quality assessment
Out of 100 · Assessment report from SkillPi LAB.
Highlights
- 提供本地语音合成能力,解决用户口播/旁白生成需求
- 支持预设语音克隆和自动化 TTS,具有明确实用价值
Highlights
- 触发词覆盖合理,明确描述 IndexTTS2、Hai 预设等使用场景
- 边界清晰,不易与其他 Skill 重叠
Highlights
- 文档结构清晰完整,包含完整的工作流程和示例
- frontmatter 完整,有明确的完成判据和参考文档
Highlights
- 工具来源明确,参数说明详细,覆盖主要异常场景
- 提供自动启动机制和清晰的完成判据
The arithmetic mean of the first four original scores, rounded to a whole number.
Static text checks
100 / 100 · skillpi-20261123-no-r3-v1
No current rules matched the text.
This score reflects rule matches in the text and is provided for reference before use. It excludes attachments and runtime behavior.
Permissions and checks before use
Automatically summarized from this main document. Matches may be examples or defensive advice; they are not actual permission declarations. Attachments, external dependencies and runtime behavior are not covered.
These common operations were not identified in the main document. This does not mean no permissions or risks exist.
Security rating and access scope
safe · Static evidence review; not a runtime safety guarantee.
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.
Before use, confirm and authorize actual file access, external services and network destinations in your host. This review grants no runtime permissions.
User discussion
No verified reviews yet.