Commit Graph
300 Commits
Author SHA1 Message Date
Arcitec 01d7c64523 fix(cli): More robust device priority checks 2025-09-11 04:16:27 +02:00
Arcitec 3ef463098a docs: Add usage note regarding random sampling 2025-09-11 04:15:58 +02:00
Arcitec cb86034582 docs: Add Alibaba's high-bandwidth PyPI mirror for China 2025-09-11 04:15:58 +02:00
Arcitec 384f953a70 chore: Move docs to new directory 2025-09-11 04:15:58 +02:00
Arcitec 69fb0e3889 feat(webui)!: Easier DeepSpeed launch argument 2025-09-11 04:15:58 +02:00
nanaoto e821a54be8 Merge pull request #327 from index-tts/doc_zh
中文文档
2025-09-11 00:36:33 +08:00
nanaoto 170884c59d fix: 中文readme标题显示问题 2025-09-11 00:32:42 +08:00
nanaoto df71625892 doc: +中文readme 2025-09-11 00:29:33 +08:00
DDXDB 70c275a316 feat(cli): Support XPU (#322)
* Support XPU

* Support XPU
2025-09-10 22:35:06 +08:00
nanaoto 51cf7a576d Merge pull request #324 from Arcitec/indextts2-arc
docs: Remove redundant "python" command instruction
2025-09-10 22:32:46 +08:00
Arcitec 92fbb016e8 docs: Remove redundant "python" command instruction 2025-09-10 16:28:21 +02:00
nanaoto 8d1e182c55 Merge pull request #323 from Arcitec/indextts2-arc
IndexTTS2 Documentation Update
2025-09-10 22:22:04 +08:00
Arcitec f99b5b1d0a docs: Add quick uv installation technique
- Makes the "uv" installation page link larger.

- Adds the quickest and easiest installation technique for convenience.
2025-09-10 16:19:51 +02:00
nanaoto 06d25851fa Merge pull request #311 from Arcitec/indextts2-arc
IndexTTS2 Maintenance Patches
2025-09-10 14:57:24 +08:00
Arcitec f8fa454338 docs: Add a stronger warning about unsupported installation methods
- Several users have unfortunately disregarded the `uv` instructions and ended up with broken `conda` / `pip` installations. We require `uv` for a reason: It's the *only* way to guarantee an exact, well-tested installation environment.

- The warning is now clearly highlighted, with a deeper explanation about why `uv` is required, so that everyone can enjoy IndexTTS without hassle!
2025-09-10 06:04:00 +02:00
Arcitec 9781a0e778 feat: DeepSpeed is now an optional dependency which can be disabled
- Windows users sometimes have trouble installing DeepSpeed. Therefore, this feature has been converted into an optional installation flag, which can be skipped if it's causing issues on your system.

- Improved documentation to mention how to enable/disable DeepSpeed and all the other speed-related features (such as compiled CUDA kernels).
2025-09-10 02:28:28 +02:00
Arcitec 926999b84f fix: Don't load DeepSpeed if use_deepspeed is False
- A recent change made DeepSpeed optional (off by default), but the code was still trying to load DeepSpeed even when `use_deepspeed = False`. This means users would still have a big startup slowdown and a lot of error messages if their DeepSpeed module isn't working (usually because it's not able to compile itself on their machines).

- We now only load DeepSpeed if the user requested it.

- Translated the DeepSpeed error message to English, since all other errors in the same function were already English.
2025-09-09 18:20:28 +02:00
Arcitec 6444cdc64d refactor: Simplify use_cuda_kernel check 2025-09-09 18:11:12 +02:00
Arcitec 50ae8f2774 chore: Tag custom license identifier in pyproject.toml 2025-09-09 18:11:12 +02:00
nanaoto a000136a3d add deepspeed cmd option (#307) 2025-09-09 20:35:54 +08:00
仙舟龙脉研究所 e2ed1ba462 Add support for Intel GPUs (#298) 2025-09-09 20:31:50 +08:00
十字鱼 5f6486cf1a Add startup parameters for cuda_kernel (#302)
* Update webui.py

* Update infer_v2.py
2025-09-09 20:31:05 +08:00
index-tts 42962a849b Merge pull request #303 from index-tts/tts2dev
Add a HuggingFace experience entry
2025-09-09 19:36:39 +08:00
shujingchen 31f089f484 update link 2025-09-09 19:34:56 +08:00
shujingchen 9894d4716a IndexTTS-2-Demo page link 2025-09-09 19:31:49 +08:00
nanaotoandwangyining02 bae1f21d8f Update License (#300)
* (WIP) test license for IndexTTS-2

* remove old license for v1.5 & rename latest license

* Update license descriptions in code

---------

Co-authored-by: wangyining02 <wangyining02@bilibili.com>
2025-09-09 16:34:34 +08:00
wangyining02 4e4177253c Update license for IndexTTS-2 2025-09-09 15:59:23 +08:00
Johnny Arcitec 41577b8e99 IndexTTS2 Release Preparation, Part 2 (#291)
* fix: Configure "uv" build system to use CUDA on supported platforms

- Linux builds of PyTorch always have CUDA acceleration built-in, but Windows only has it if we request a CUDA build.

- The built-in CUDA on Linux uses old libraries and can be slow.

- We now request PyTorch built for the most modern CUDA Toolkit on Linux + Windows, to solve both problems.

- Mac uses PyTorch without CUDA support, since it doesn't exist on that platform.

- Other dependencies have received new releases and are included in this fix too:

* click was downgraded because the author revoked 8.2.2 due to a bug.

* wetext received a new release now.

* fix: Use PyPI as the hashing reference in "uv" lockfile

- PyPI is the most trustworthy source for package hashes. We need to remove the custom mirror from the config, otherwise that mirror always becomes the default lockfile/package source, which leads to user trust issues and package impersonation risks.

- Regional mirrors should be added by users during installation instead, via the `uv sync --default-index` flag. Documented with example for Chinese mirror.

- When users add `--default-index`, "uv" will try to discover the exact same packages via the mirror to improve download speeds, but automatically uses PyPI if the mirror didn't have the files or if the mirror's file hashes were incorrect. Thus ensuring that users always have the correct package files.

* docs: Improve README for IndexTTS2 release!

- "Abstract" separated into paragraphs for easier readability.

- Clearer document structure and many grammatical improvements.

- More emojis, to make it easier to find sections when scrolling through the page!

- Added missing instructions:

* Needing `git-lfs` to clone the code.
* Needing CUDA Toolkit to install the dependencies.
* How to install the `hf` or `modelscope` CLI tools to download the models.

- Made our web demo the first section within "quickstart", to give users a quick, fun demo to start experimenting with.

- Fixed a bug in the "PYTHONPATH" recommendation. It must be enclosed in quotes `""`, otherwise the new path would break on systems that had spaces in their original path.

- Improved all Python code-example descriptions to make them much easier to understand.

- Clearly marked the IndexTTS1 legacy section as "legacy" to avoid confusion.

- Removed outdated Windows "conda/pip" instruction which is no longer relevant since we use "uv" now.

* refactor(webui): Remove unused imports

The old IndexTTS1 module and ModelScope were being loaded even though we don't need them. They also have a lot of dependencies, which slowed down loading and could even cause some conflicts.

* feat!: Remove obsolete build system (setup.py)

BREAKING CHANGE: The `setup.py` file has been removed.

Users should now use the new `pyproject.toml` based "uv" build system for installing and developing the project.

* feat: Add support for installing IndexTTS as a CLI tool

- We now support installing as a CLI tool via "uv".

- Uses the modern "hatchling" as the package / CLI build system.

- The `cli.py` code is currently outdated (doesn't support IndexTTS2). Marking as a TODO.

* chore: Add authors and classifiers metadata to pyproject.toml

* feat: Faster installs by making WebUI dependencies optional

* refactor!: Rename "sentences" to "segments" for clarity

- When we are splitting text into generation chunks, we are *not* creating "sentences". We are creating "segments". Because a *sentence* must always end with punctuation (".!?" etc). A *segment* can be a small fragment of a sentence, without any punctuation, so it's not accurate (and was very misleading) to use the word "sentences".

- All variables, function calls and strings have been carefully analyzed and renamed.

- This change will be part of user-facing code via a new feature, which is why the change was applied to the entire codebase.

- This change also helps future code contributors understand the code.

- All affected features are fully tested and work correctly after this refactoring.

- The `is_fp16` parameter has also been renamed to `use_fp16` since the previous name could confuse people ("is" implies an automatic check, "use" implies a user decision to enable/disable FP16).

- `cli.py`'s "--fp16" default value has been set to False, exactly like the web UI.

- `webui.py`'s "--is_fp16" flag has been changed to "--fp16" for easier usage and consistency with the CLI program, and the help-description has been improved.

* feat(webui): Set "max tokens per generation segment" via CLI flag

- The "Max tokens per generation segment" is a critical setting, as it directly impacts VRAM usage. Since the optimal value varies significantly based on a user's GPU, it is a frequent point of adjustment to prevent out-of-memory issues.

- This change allows the default value to be set via a CLI flag. Users can now conveniently start the web UI with the correct setting for their system, eliminating the need to manually reconfigure the value on every restart.

- The `webui.py -h` help text has also been enhanced to automatically display the default values for all CLI settings.

* refactor(i18n): Improve clarity of all web UI translation strings

* feat(webui): Use main text as emotion guidance when description is empty

If the user selects "text-to-emotion" control, but leaves the emotion description empty, we now automatically use the main text prompt instead.

This ensures that web users can enjoy every feature of IndexTTS2, including the ability to automatically guess the emotion from the main text prompt.

* feat: Add PyTorch GPU acceleration diagnostic tool

* chore: Use NVIDIA CUDA Toolkit v12.8

Downgrade from CUDA 12.9 to 12.8 to simplify user installation, since version 12.8 is very popular.

* docs: Simplify "uv run" command examples

The "uv run" command can take a `.py` file as direct argument and automatically understands that it should run via python.
2025-09-09 12:51:45 +08:00
nanaoto 0e49ee0e89 Update README.md 2025-09-09 00:02:00 +08:00
wangyining02 e58f291de1 Merge branch 'Arcitec-indextts2-arc' 2025-09-08 23:27:55 +08:00
Arcitec cfd8aad543 chore: Add metadata to pyproject.toml 2025-09-08 17:23:23 +02:00
Arcitec 64557d230a fix: Use WeTextProcessing on Linux, and wetext on other platforms 2025-09-08 17:04:19 +02:00
Arcitec a768bff9cf refactor: Change build system to "uv" to ensure robust installation
- Remove legacy "requirements.txt" support, since "pip" is too basic and very often leads to broken installations.

- Require "uv" installation method to ensure user success.
2025-09-08 16:56:44 +02:00
Arcitec b0f4f0fb53 refactor: Remove code duplication in DeepSpeed dependency check 2025-09-08 16:17:17 +02:00
Arcitec d9aacafb2e fix: Add support for melancholic emotion in text-to-emotion vectors
- The "低落" (melancholic) emotion will always be mapped to "悲伤" (sad) by QwenEmotion's text analysis. It doesn't know the difference between those emotions even if the user writes the exact words.

- Since the words and their meanings are so similar, it might not be possible to train QwenEmotion to learn the difference.

- As a workaround, we perform input text analysis and look for words that mean "melancholic", and swap the "sad" detection result, to make the melancholic/low-energy speech emotion work correctly for users via text-to-emotion.
2025-09-08 16:14:38 +02:00
Arcitec 735bae11ef fix: Fast and robust text-to-emotion algorithm
- The new algorithm is now very fast and uses less memory, since it doesn't chain multiple `.replace()` calls or create a bunch of temporary strings and temporary dictionaries and lists anymore.

- Parses the JSON output from the QwenEmotion model directly instead of trying to manually parse it. If JSON parsing fails, it falls back to a fast and highly-accurate RegEx search which finds all key-value pairs.

- The desired emotion vector order is now stored as a static class attribute instead of being created from scratch on every call.

- The emotion dictionary creation has been completely rewritten to use a clear algorithm which takes the QwenEmotion answers, builds a new dictionary using `self.desired_vector_order`, maps each key's name to their English translations, fetches the values from QwenEmotion's answers or 0.0 if no value was given by QE, and clamps the values to the min/max ranges.

- The `backup_dict` is now removed, since it was error-prone and fragile. It could grow out of sync with the code if not carefully maintained to keep the correct order and labels.

- To handle the "fallback" dictionary creation, we now automatically scan the final emotion vectors, and if none of them are above 0.0 (meaning we didn't detect any emotions in the input text), we give the final vectors a "calm: 1.0" value. This means that we never have to worry about the fallback dictionary's correctness.

- The previous algorithm had multiple bugs. This rewrite fixes a serious vector order bug: The old algorithm built the dictionary via the found keys, and only checked if there's 8 keys in QwenEmotion's response, but it didn't check that the keys were valid. When building the final emotion dict, it skipped any values if they were not found in QE's response. Meaning that if the QE response only contained 4 of the 8 expected emotion vector labels, those would all be added at the start of the new dictionary as the "first 4 dict slots". After that, it looped through the "backup_dict" and appended any missing values at the end. This resulted in a final emotion dictionary with the wrong order for the emotion vectors. The new code always produces the correct emotion vector order.

- Discovered another bug in the text-to-emotion handling for the "melancholic" emotion, which has never worked for Chinese or English at all. It will be fixed in an upcoming patch.
2025-09-08 16:14:38 +02:00
Arcitec be39fcf95b fix: Fix internal text-to-emotion vector labels
- The order of the `convert_dict` now matches the desired order of the emotion vectors, for clarity.

- Internal text labels now match the updated English translations.

- This (and the previous commit) also fixes a bug: The previous, inaccurate Emotion translations meant that QwenEmotion could not understand words such as "low" at all (no emotion mapping), and it always mapped "hate" to "angry". With the fixed translations, QwenEmotion now correctly maps text-to-emotions from English inputs when users input the words that they've been taught by the user interface.
2025-09-08 16:14:38 +02:00
Arcitec 316f241354 refactor(i18n): More accurate emotion translations to improve clarity
- Matches training data better.

- Easier to understand the purpose of the sliders.

- Consistent use of adjectives so that the user interface looks nicer.

- Reasoning:

* Hate -> Disgusted: The original Chinese word expresses disgust, not hatred. Hatred is an angry emotion and was confusing since there's already an Angry slider.

* Low -> Melancholic: The original Chinese word talks about feeling melancholic / down low, a state of slow speech and subdued emotions, which is not the same as sadness or depression. The word "Low" is very confusing for this emotion. The most accurate word for the emotion is "melancholic".

* Neutral -> Calm: The original Chinese word describes a state of being at peace and tranquility. It's not a neutral, non-emotional state. It's a state of being calm and relaxed.
2025-09-08 16:14:38 +02:00
Arcitec 31d129e527 refactor(i18n): Improve description of generation segmentation 2025-09-08 16:14:38 +02:00
Arcitec eb3f1cd7e5 feat(i18n): Add missing UI translation strings 2025-09-08 16:14:38 +02:00
Arcitec 508bd5174e fix: Fix character encoding in examples 2025-09-08 16:14:38 +02:00
Arcitec 4e731948b7 fix: Suppress pandas PyArrow future dependency warning
Moving the import of pandas *after* we've suppressed FutureWarning, to hide a big and useless warning saying that "Pandas 3.x will require PyArrow".
2025-09-08 16:14:38 +02:00
Arcitec 6b8f2aeaf5 fix: Update pandas to fix Gradio errors
Gradio requires Pandas >= 2.2.0, otherwise it will throw errors in some situations (such as when GPU is Out of Memory).
2025-09-08 16:14:38 +02:00
Arcitec 0e6925891a fix: Improve .gitignore and re-add config file
- Improves organization and removes extra junk files.

- Unignores *.yaml files such as config.yaml from the /checkpoints/ directory since we need that file.
2025-09-08 16:14:38 +02:00
kemuriririnandwangyining02 9e415dbb73 Dev kemurin (#287)
* update deps for windows

* update reqs & README

* update README.md

* update README.md

* use wetext to replace WeTextProcessing on windows

---------

Co-authored-by: wangyining02 <wangyining02@bilibili.com>
2025-09-08 22:14:34 +08:00
十字鱼 3dfc2a00e6 Use without deepspeed (#280)
Use without deepspeed
2025-09-08 22:09:26 +08:00
kemuriririnandwangyining02 ac637b7a3e Dev kemurin (#284)
* update deps for windows

* update reqs & README

* update README.md

* update README.md

---------

Co-authored-by: wangyining02 <wangyining02@bilibili.com>
2025-09-08 21:53:27 +08:00
kemuriririnandwangyining02 2abd89e338 update deps for windows (#282)
Co-authored-by: wangyining02 <wangyining02@bilibili.com>
2025-09-08 20:59:31 +08:00
kemuriririnandwangyining02 773cdef2bf Indextts2 (#278)
* indextts2

* update lfs for audio files

* fix pypi source & add python version

---------

Co-authored-by: wangyining02 <wangyining02@bilibili.com>
2025-09-08 18:42:02 +08:00
index-tts 52adc70efe Merge pull request #277 from index-tts/tts2dev
Tts2dev fix video
2025-09-08 17:55:53 +08:00