This commit is contained in:
源文雨
2023-09-03 17:04:42 +08:00
parent 3ac496e20e
commit bce9eb0251

View File

@@ -1,3 +1,8 @@
import sys, os
if sys.platform == "darwin":
os.environ["PYTORCH_ENABLE_MPS_FALLBACK"] = "1"
import torch
import argparse
import commons
@@ -8,10 +13,7 @@ from text import cleaned_text_to_sequence, get_bert
from text.cleaner import clean_text
import gradio as gr
import webbrowser
import sys, os
if sys.platform == "darwin":
os.environ["PYTORCH_ENABLE_MPS_FALLBACK"] = "1"
def get_text(text, language_str, hps):
norm_text, phone, tone, word2ph = clean_text(text, language_str)