Spaces:
Build error
Build error
Aseem Gupta
commited on
Commit
·
4a20039
1
Parent(s):
a416ccf
test3
Browse files- app.py +3 -2
- config.json +5 -0
app.py
CHANGED
@@ -1,8 +1,9 @@
|
|
1 |
import gradio as gr
|
2 |
from TTS.api import TTS
|
3 |
|
4 |
-
# Load the XTTS-v2 model
|
5 |
-
tts = TTS(model_name="tts_models/multilingual/multi-dataset/xtts_v2"
|
|
|
6 |
|
7 |
# Define the function for voice cloning
|
8 |
def generate_voice(text, speaker_audio):
|
|
|
1 |
import gradio as gr
|
2 |
from TTS.api import TTS
|
3 |
|
4 |
+
# Load the XTTS-v2 model and set it to use CPU
|
5 |
+
tts = TTS(model_name="tts_models/multilingual/multi-dataset/xtts_v2")
|
6 |
+
tts.to("cpu") # Set the model to run on CPU
|
7 |
|
8 |
# Define the function for voice cloning
|
9 |
def generate_voice(text, speaker_audio):
|
config.json
ADDED
@@ -0,0 +1,5 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"tts_models/multilingual/multi-dataset/xtts_v2": {
|
3 |
+
"tos_accepted": true
|
4 |
+
}
|
5 |
+
}
|