tts-xtts2-multi / download.py
TaiYouWeb's picture
Upload 5 files
5ca847f verified
raw
history blame
468 Bytes
import TTS.api
import TTS.utils.manage as manage
import config
# 定义一个函数来自动接受许可条款
def ask_tos_patch(self, output_path):
print("Automatically accepting the terms of service.")
return True
# 使用我们定义的函数替换原有的 ask_tos 方法
manage.ModelManager.ask_tos = ask_tos_patch
# 初始化 TTS 实例并下载模型
tts = TTS.api.TTS()
for id, model in config.models.items():
tts.download_model_by_name(model)