[优化] 1Aa-文本获取 (#1102)

* Filter unsupported languages

* add feedback

* simplify modification

* fix detail
This commit is contained in:
蓝梦实
2024-05-19 16:54:10 +08:00
committed by GitHub
parent 82a5672361
commit 0357d0c7a4
2 changed files with 11 additions and 5 deletions

View File

@@ -117,9 +117,12 @@ if os.path.exists(txt_path) == False:
try:
wav_name, spk_name, language, text = line.split("|")
# todo.append([name,text,"zh"])
todo.append(
[wav_name, text, language_v1_to_language_v2.get(language, language)]
)
if language in language_v1_to_language_v2.keys():
todo.append(
[wav_name, text, language_v1_to_language_v2.get(language, language)]
)
else:
print(f"\033[33m[Waring] The {language = } of {wav_name} is not supported for training.\033[0m")
except:
print(line, traceback.format_exc())