ai-text-to-speech
Skill210 starsChanged 2 days agoMITView on GitHub
Zero-shot text-to-speech with voice cloning via IndexTTS2 (index-tts). Synthesizes speech from text using a user-provided reference audio for timbre. Use when the user wants TTS, text-to-speech, voice cloning, voice clone, IndexTTS, IndexTTS2, or generating narration/voice lines from a reference WAV.
1 other project uses a version of this.
Adopted by
Most recently taken up by
- godot-fun/gaiword for word, first seen Nov 15, 2026
Other versions1 project uses a version of this.
Word for word · 1
- godot-fun/gai★ 210100% same
Edited · 0
None found.
Wrote their own version · 0
None found.
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository40 other files it gives its agents.
- AGENTS.mdAGENTS.md
- .agents/skills/AGENTS.mdAGENTS.md
- audio-denoiseSkill
- audio-fadeSkill
- audio-loudness-normalizationSkill
- audio-sample-rate-standardizeSkill
- audio-splitSkill
- audio-to-oggSkill
- audio-to-textSkill
- audio-to-wavSkill
- audio-trimSkill
- audio-volume-adjustSkill
- file-naming-normalizationSkill
- git-commit-messageSkill
- image-inpaint-regionSkill
- image-region-remove-key-color-appSkill
- image-remove-backgroundSkill
- image-remove-white-backgroundSkill
- image-resizeSkill
- image-sprite-sheet-splitSkill
- image-to-pngSkill
- image-to-textSkill
- image-trimSkill
- storyboard-av-mixSkill
- storyboard-shot-to-htmlSkill
- storyboardSkill
- storyboard-ttsSkill
- video-4k-normalizationSkill
- video-bgmSkill
- video-compress-to-sizeSkill
- video-cutSkill
- video-merge-gpuSkill
- video-mergeSkill
- video-publishSkill
- video-remove-audioSkill
- video-to-4kSkill
- video-to-60fpsSkill
- video-to-mp4Skill
- video-to-ogvSkill
- video-to-wavSkill
The file
We split this skill into the rules it gives an agent
8 rules. About 0 are common, 0 are distinctive, and 8 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈0
Distinctive · estimate
This author's own choices. Worth a look.
8
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 16
When this skill applies, read and follow dependency-manager — run scripts as documented, install missing tools into .dependency/.
- Very specific: line 18
Run tts.py at .ai/ai-text-to-speech/tts.py through the index-tts manifest entry (.dependency/index-tts/.venv/).
- Very specific: line 19
Do not hand-write IndexTTS Python snippets or uv run webui.py for synthesis — use the bundled script.
- Very specific: line 30
Ensure python-3.11 and uv are populated under .dependency/ (see dependency-manager).
- Very specific: line 43
Use python / uv (no .exe) on Unix.
- Very specific: line 85
If HuggingFace is slow: HF_ENDPOINT=https://hf-mirror.com (Unix) / $env:HF_ENDPOINT="https://hf-mirror.com" (PowerShell).
- Very specific: line 96
Use .dependency/index-tts/.venv/bin/python on Unix.
- Very specific: line 170
Do not combine --emotion-audio, --emotion-vector, and --emotion-text / --emotion-from-text in conflicting ways — pick one emotion source.
≈ “Common” is an estimate: at least 1 in 5 of the 372,429 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
AI Text-to-Speech (IndexTTS2)
Clone a speaker from a reference audio, then synthesize speech from text with IndexTTS2.
Rules
When this skill applies, read and follow dependency-manager — run scripts as documented, install missing tools into .dependency/.
- Run
tts.pyat.ai/ai-text-to-speech/tts.pythrough theindex-ttsmanifest entry (.dependency/index-tts/.venv/). Never use hostpython,py,python3, or any interpreter outside.dependency/. - Do not hand-write IndexTTS Python snippets or
uv run webui.pyfor synthesis — use the bundled script. - IndexTTS requires
uvfor install (pip/condaare unsupported upstream). Python must be>=3.10,<3.12(usepython-3.11). populated: falseforindex-tts(or missing models) is not a reason to skip. Install / download first, setpopulated: true, retry the same command.- Never overwrite sources. Pass the user's real voice path and text; write only to
-o/--output.
Setup (first run)
From project root.
1. Python 3.11 + uv
Ensure python-3.11 and uv are populated under .dependency/ (see dependency-manager). Register:
"python-3.11": {
"populated": true,
"bin": ".dependency/python-3.11/python.exe"
},
"uv": {
"populated": true,
"bin": ".dependency/uv/uv.exe"
}Use python / uv (no .exe) on Unix.
2. Clone IndexTTS
git clone https://github.com/index-tts/index-tts.git .dependency/index-tts
cd .dependency/index-tts
git lfs install
git lfs pull3. Install deps with uv (required)
# from .dependency/index-tts
# Windows: skip deepspeed extras if install fails
.dependency/uv/uv.exe sync --extra webuiSlow PyPI (China mirrors):
.dependency/uv/uv.exe sync --extra webui --default-index "https://mirrors.aliyun.com/pypi/simple"CUDA Toolkit 12.8+ is needed for GPU. CPU works but is slow.
4. Download IndexTTS-2 checkpoints
cd .dependency/index-tts
.dependency/uv/uv.exe tool install "huggingface-hub[cli,hf_xet]"
hf download IndexTeam/IndexTTS-2 --local-dir=checkpointsOr ModelScope:
.dependency/uv/uv.exe tool install "modelscope"
modelscope download --model IndexTeam/IndexTTS-2 --local_dir checkpointsIf HuggingFace is slow: HF_ENDPOINT=https://hf-mirror.com (Unix) / $env:HF_ENDPOINT="https://hf-mirror.com" (PowerShell).
5. Register manifest
"index-tts": {
"populated": true,
"bin": ".dependency/index-tts/.venv/Scripts/python.exe"
}Use .dependency/index-tts/.venv/bin/python on Unix. Confirm checkpoints/config.yaml exists before synthesizing.
Quick Start
Voice reference + text → WAV (default output: <voice-dir>/ai-text-to-speech/<voice-stem>.wav):
.dependency/index-tts/.venv/Scripts/python.exe .ai/ai-text-to-speech/tts.py \
--voice audio/voice/ref.wav \
--text "Hello, welcome to this world."
# → audio/voice/ai-text-to-speech/ref.wavExplicit output path:
.dependency/index-tts/.venv/Scripts/python.exe .ai/ai-text-to-speech/tts.py \
--voice audio/voice/ref.wav \
--text "Hello, this is a test." \
--output audio/voice/ai-text-to-speech/hello.wavDirectory (writes <voice-stem>.wav inside, e.g. audio/voice/ai-text-to-speech/ref.wav):
.dependency/index-tts/.venv/Scripts/python.exe .ai/ai-text-to-speech/tts.py --voice audio/voice/ref.wav --text "Hello, this is a test." --output audio/voice/ai-text-to-speechLong script from a UTF-8 text file:
.dependency/index-tts/.venv/Scripts/python.exe .ai/ai-text-to-speech/tts.py \
--voice audio/voice/ref.wav \
--text-file script/lines/intro.txt \
--output audio/voice/ai-text-to-speech/intro.wavFP16 (faster, less VRAM):
.dependency/index-tts/.venv/Scripts/python.exe .ai/ai-text-to-speech/tts.py \
--voice audio/voice/ref.wav \
--text "Testing half-precision inference." \
--fp16Emotion control (optional)
| Mode | Flags | Notes |
| Emotion reference audio | --emotion-audio path.wav | Separate clip for emotion; timbre still from --voice |
| Emotion weight | --emotion-weight 0.6 | Maps to emo_alpha (0.0–1.0, default 1.0) |
| Emotion from text | --emotion-from-text | Infer emotion from synthesis text; prefer --emotion-weight ≈ 0.6 |
| Emotion description | --emotion-text "..." | Natural-language emotion; implies text emotion mode |
| Emotion vector | --emotion-vector 0,0,0.8,0,0,0,0,0 | 8 floats: happy, angry, sad, afraid, disgusted, melancholic, surprised, calm |
# Emotion reference audio
.dependency/index-tts/.venv/Scripts/python.exe .ai/ai-text-to-speech/tts.py \
--voice audio/voice/ref.wav \
--emotion-audio audio/voice/emo_sad.wav \
--emotion-weight 0.9 \
--text "The inn has gone rotten and started auctioning off rooms." \
--output audio/voice/ai-text-to-speech/sad_line.wav
# Emotion description text
.dependency/index-tts/.venv/Scripts/python.exe .ai/ai-text-to-speech/tts.py \
--voice audio/voice/ref.wav \
--emotion-text "afraid, tense" \
--emotion-weight 0.6 \
--text "Hide quickly! He is coming!" \
--output audio/voice/ai-text-to-speech/afraid_line.wavDo not combine --emotion-audio, --emotion-vector, and --emotion-text / --emotion-from-text in conflicting ways — pick one emotion source.
Defaults
| Option | Default | Notes |
| Output | <voice-dir>/ai-text-to-speech/<voice-stem>.wav | --output file uses that name; --output directory uses the voice file's stem |
| Model | .dependency/index-tts/checkpoints | IndexTTS-2 |
--fp16 | off | Enable on GPU when VRAM is tight |
--emotion-weight | 1.0 | Lower (~0.6) for text emotion modes |
| Overwrite | off | Pass --force to replace an existing output |
Agent workflow
- Confirm inputs — need a clear reference voice WAV/MP3 and the text (or
--text-file). Ask if either is missing. - Use the user's real paths — do not copy voice files into the repo unless asked.
- Trial first — synthesize one short line, play/inspect before long scripts.
- Reference audio tips — clean, single-speaker, little noise; a few seconds of clear speech works best.
- Missing install — follow Setup; register
index-ttsinmanifest.json; retry the same command. - GPU — prefer CUDA +
--fp16for speed; CPU is acceptable for short tests only. - Revert — delete files under
ai-text-to-speech/; sources are never modified.
Troubleshooting
| Issue | Fix |
index-tts not populated | Clone + uv sync + download checkpoints; update manifest |
checkpoints/config.yaml missing | Re-run hf download IndexTeam/IndexTTS-2 --local-dir=checkpoints |
| CUDA / torch errors | Install CUDA 12.8+; or run on CPU (slow) |
| OOM / VRAM | Pass --fp16; shorten text; close other GPU apps |
| Slow HuggingFace | Set HF_ENDPOINT=https://hf-mirror.com; or use ModelScope |
uv sync / DeepSpeed fail on Windows | Use uv sync --extra webui without deepspeed |
| Unnatural emotion | Lower --emotion-weight to ~0.6; try a clearer --emotion-audio |
CLI
Copy-paste commands: cli/ai-text-to-speech.md
Related
- Upstream: https://github.com/index-tts/index-tts
- Models: IndexTTS-2 (HuggingFace)
- Post-process loudness / format: audio-loudness-normalization, audio-to-ogg, audio-to-wav
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

