Spaces:
Build error
Build error
Aseem Gupta
commited on
Commit
·
97fb01c
1
Parent(s):
d8fe51c
test6
Browse files
app.py
CHANGED
|
@@ -4,11 +4,11 @@ import os
|
|
| 4 |
|
| 5 |
os.environ["COQUI_TOS_AGREED"] = "1"
|
| 6 |
|
| 7 |
-
# Load the
|
| 8 |
-
tts = TTS(model_name="tts_models/multilingual/multi-dataset/xtts_v2"
|
| 9 |
tts.to("cpu")
|
| 10 |
|
| 11 |
-
# Function to
|
| 12 |
def generate_voice(text, speaker_audio):
|
| 13 |
output_path = "output.wav"
|
| 14 |
tts.tts_to_file(
|
|
|
|
| 4 |
|
| 5 |
os.environ["COQUI_TOS_AGREED"] = "1"
|
| 6 |
|
| 7 |
+
# Load the model using from_pretrained()
|
| 8 |
+
tts = TTS.from_pretrained(model_name="tts_models/multilingual/multi-dataset/xtts_v2")
|
| 9 |
tts.to("cpu")
|
| 10 |
|
| 11 |
+
# Function to generate voice
|
| 12 |
def generate_voice(text, speaker_audio):
|
| 13 |
output_path = "output.wav"
|
| 14 |
tts.tts_to_file(
|