mirror of
https://github.com/index-tts/index-tts.git
synced 2025-11-28 18:30:25 +08:00
- We can't use the original "Show experimental features" checkbox implementation, because it *deeply* breaks Gradio.
- Gradio's `gr.Examples()` API binds itself to the original state of the user interface. Gradio crashes and causes various bugs if we try to change the available UI controls later.
- Instead, we must use `gr.Dataset()` which acts like a custom input/output control and doesn't directly bind itself to the target control. We must also provide a secret, hidden "all mode choices" component so that it knows the names of all "control modes" that are possible in examples.
- We now also have a very visible warning label in the user interface, to clearly mark the experimental features.
- Bugs fixed:
* The code was unable to toggle the visibility of Experimental demos in the Examples list. It was not possible with Examples (since it's a wrapper around Dataset, but Examples contains its own internal state/copy of all data). Instead, we use a Dataset and manipulate its list directly.
* Gradio crashes with a `gradio.exceptions.Error` exception if you try to load an example that tries to use an experimental feature if we have removed its UI element. This is because Examples binds to the original user interface and *remembers* the list of choices, and it *cannot* dynamically select something that did not exist when the `gr.Examples()` was initially created. This problem is fixed by switching to `gr.Dataset()`.
* Furthermore, Gradio's `gr.Examples()` handler actually remembers and caches the list of UI options. So every time we load an example, it rewrites the "Emotion Control Mode" selection menu to only show the options that were available when the Examples table was created. This means that even if we keep the "Show experimental features" checkbox, Gradio itself will erase the experimental mode from the Control Mode selection menu every time the user loads an example. There are no callbacks or "update" functions to allow us to override this automatic Gradio behavior. But by switching to `gr.Dataset()`, we completely avoid this deep binding.
* The "Show experimental features" checkbox is no longer tied to a column in the examples-table, to avoid fighting between Gradio's example table trying to set the mode, and the experimental checkbox being toggled and also trying to set the mode.
* Lastly, the "Show experimental features" checkbox now remembers and restores the user's current mode selection when toggling the checkbox, instead of constantly resetting to the default mode ("same as voice reference"), to make the UI more convenient for users.
47 lines
No EOL
2.9 KiB
JSON
47 lines
No EOL
2.9 KiB
JSON
{
|
||
"本软件以自拟协议开源, 作者不对软件具备任何控制力, 使用软件者、传播软件导出的声音者自负全责.": "本软件以自拟协议开源, 作者不对软件具备任何控制力, 使用软件者、传播软件导出的声音者自负全责.",
|
||
"如不认可该条款, 则不能使用或引用软件包内任何代码和文件. 详见根目录LICENSE.": "如不认可该条款, 则不能使用或引用软件包内任何代码和文件. 详见根目录LICENSE.",
|
||
"时长必须为正数": "时长必须为正数",
|
||
"请输入有效的浮点数": "请输入有效的浮点数",
|
||
"使用情感参考音频": "使用情感参考音频",
|
||
"使用情感向量控制": "使用情感向量控制",
|
||
"使用情感描述文本控制": "使用情感描述文本控制",
|
||
"上传情感参考音频": "上传情感参考音频",
|
||
"情感权重": "情感权重",
|
||
"喜": "喜",
|
||
"怒": "怒",
|
||
"哀": "哀",
|
||
"惧": "惧",
|
||
"厌恶": "厌恶",
|
||
"低落": "低落",
|
||
"惊喜": "惊喜",
|
||
"平静": "平静",
|
||
"情感描述文本": "情感描述文本",
|
||
"请输入情绪描述(或留空以自动使用目标文本作为情绪描述)": "请输入情绪描述(或留空以自动使用目标文本作为情绪描述)",
|
||
"高级生成参数设置": "高级生成参数设置",
|
||
"情感向量之和不能超过1.5,请调整后重试。": "情感向量之和不能超过1.5,请调整后重试。",
|
||
"音色参考音频": "音色参考音频",
|
||
"音频生成": "音频生成",
|
||
"文本": "文本",
|
||
"生成语音": "生成语音",
|
||
"生成结果": "生成结果",
|
||
"功能设置": "功能设置",
|
||
"分句设置": "分句设置",
|
||
"参数会影响音频质量和生成速度": "参数会影响音频质量和生成速度",
|
||
"分句最大Token数": "分句最大Token数",
|
||
"建议80~200之间,值越大,分句越长;值越小,分句越碎;过小过大都可能导致音频质量不高": "建议80~200之间,值越大,分句越长;值越小,分句越碎;过小过大都可能导致音频质量不高",
|
||
"预览分句结果": "预览分句结果",
|
||
"序号": "序号",
|
||
"分句内容": "分句内容",
|
||
"Token数": "Token数",
|
||
"情感控制方式": "情感控制方式",
|
||
"GPT2 采样设置": "GPT2 采样设置",
|
||
"参数会影响音频多样性和生成速度详见": "参数会影响音频多样性和生成速度详见",
|
||
"是否进行采样": "是否进行采样",
|
||
"生成Token最大数量,过小导致音频被截断": "生成Token最大数量,过小导致音频被截断",
|
||
"例如:委屈巴巴、危险在悄悄逼近": "例如:委屈巴巴、危险在悄悄逼近",
|
||
"与音色参考音频相同": "与音色参考音频相同",
|
||
"情感随机采样": "情感随机采样",
|
||
"显示实验功能": "显示实验功能",
|
||
"提示:此功能为实验版,结果尚不稳定,我们正在持续优化中。": "提示:此功能为实验版,结果尚不稳定,我们正在持续优化中。"
|
||
} |