Update xtts.py
Browse files
xtts.py
CHANGED
@@ -39,6 +39,12 @@ except:
|
|
39 |
|
40 |
tts=None
|
41 |
model=None
|
|
|
|
|
|
|
|
|
|
|
|
|
42 |
@app.route("/convert")
|
43 |
def predict():
|
44 |
global tts
|
|
|
39 |
|
40 |
tts=None
|
41 |
model=None
|
42 |
+
|
43 |
+
TTS=import_module("TTS.api").TTS
|
44 |
+
model_name="tts_models/multilingual/multi-dataset/xtts_v2"
|
45 |
+
tts = TTS(model_name=model_name)
|
46 |
+
model=tts.synthesizer.tts_model
|
47 |
+
|
48 |
@app.route("/convert")
|
49 |
def predict():
|
50 |
global tts
|