Spaces:
Runtime error
Runtime error
Delete download.py
Browse files- download.py +0 -17
download.py
DELETED
@@ -1,17 +0,0 @@
|
|
1 |
-
import TTS.api
|
2 |
-
import TTS.utils.manage as manage
|
3 |
-
import config
|
4 |
-
|
5 |
-
# 定义一个函数来自动接受许可条款
|
6 |
-
def ask_tos_patch(self, output_path):
|
7 |
-
print("Automatically accepting the terms of service.")
|
8 |
-
return True
|
9 |
-
|
10 |
-
# 使用我们定义的函数替换原有的 ask_tos 方法
|
11 |
-
manage.ModelManager.ask_tos = ask_tos_patch
|
12 |
-
|
13 |
-
# 初始化 TTS 实例并下载模型
|
14 |
-
tts = TTS.api.TTS()
|
15 |
-
|
16 |
-
for id, model in config.models.items():
|
17 |
-
tts.download_model_by_name(model)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|