Update TTS.py: +configs["version"] = self.version #2442
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
项目中 TTS_Config 的 init 逻辑是,查看 tts_infer.yaml 的 version 项:
但是保存时,这一项却没有保存下来, 这就删除了用户对 version 的配置。
导致下一次加载时,会使用 默认的v2:
更新后为
另外,tts_infer.yaml 中默认本身是没有给出 version 项的,要用户手动写一行(不是 custom, v1, v2, v3, v4 中的 version, 而是 配置文件中顶级的 version),
以目前的代码,如果默认 tts_infer.yaml 没有 version 这一项,用户又没看代码逻辑的话,就算改了
custom 中的 version 为 v4, 实际version 还是会被代码认成v2!
因此建议 merge 本 fork 之后,改动 tts_infer.yaml ,加上 version 这一行。即如下。