Johnny Arcitec cdcc62ae22
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

48 lines
3.5 KiB
JSON
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

{
"本软件以Apache-2.0协议开源, 作者不对软件具备任何控制力, 使用软件者、传播软件导出的声音者自负全责.": "This software is open-sourced under the Apache-2.0 License. The author has no control over the software, and users of the software, as well as those who distribute the audio generated by the software, assume full responsibility.",
"如不认可该条款, 则不能使用或引用软件包内任何代码和文件. 详见根目录LICENSE.": "If you do not agree to these terms, you are not permitted to use or reference any code or files within the software package. For further details, please refer to the LICENSE files in the root directory.",
"时长必须为正数": "Duration must be a positive number",
"请输入有效的浮点数": "Please enter a valid floating-point number",
"使用情感参考音频": "Use emotion reference audio",
"使用情感向量控制": "Use emotion vectors",
"使用情感描述文本控制": "Use text description to control emotion",
"上传情感参考音频": "Upload emotion reference audio",
"情感权重": "Emotion control weight",
"喜": "Happy",
"怒": "Angry",
"哀": "Sad",
"惧": "Afraid",
"厌恶": "Disgusted",
"低落": "Melancholic",
"惊喜": "Surprised",
"平静": "Calm",
"情感描述文本": "Emotion description",
"请输入情绪描述(或留空以自动使用目标文本作为情绪描述)": "Please input an emotion description (or leave blank to automatically use the main text prompt)",
"高级生成参数设置": "Advanced generation parameter settings",
"情感向量之和不能超过1.5,请调整后重试。": "The sum of the emotion vectors cannot exceed 1.5. Please adjust and try again.",
"音色参考音频": "Voice Reference",
"音频生成": "Speech Synthesis",
"文本": "Text",
"生成语音": "Synthesize",
"生成结果": "Synthesis Result",
"功能设置": "Settings",
"分句设置": "Text segmentation settings",
"参数会影响音频质量和生成速度": "These parameters affect the audio quality and generation speed.",
"分句最大Token数": "Max tokens per generation segment",
"建议80~200之间值越大分句越长值越小分句越碎过小过大都可能导致音频质量不高": "Recommended range: 80 - 200. Larger values require more VRAM but improves the flow of the speech, while lower values require less VRAM but means more fragmented sentences. Values that are too small or too large may lead to less coherent speech.",
"预览分句结果": "Preview of the audio generation segments",
"序号": "Index",
"分句内容": "Content",
"Token数": "Token Count",
"情感控制方式": "Emotion control method",
"GPT2 采样设置": "GPT-2 Sampling Configuration",
"参数会影响音频多样性和生成速度详见": "Influences both the diversity of the generated audio and the generation speed. For further details, refer to",
"是否进行采样": "Enable GPT-2 sampling",
"生成Token最大数量过小导致音频被截断": "Maximum number of tokens to generate. If text exceeds this, the audio will be cut off.",
"请上传情感参考音频": "Please upload the emotion reference audio",
"当前模型版本": "Current model version: ",
"请输入目标文本": "Please input the text to synthesize",
"例如:高兴,愤怒,悲伤等": "e.g., happy, angry, sad, etc.",
"与音色参考音频相同": "Same as the voice reference",
"情感随机采样": "Randomize emotion sampling"
}