Spaces:
Running
Running
Devin Xie commited on
Commit ·
33bea70
1
Parent(s): 8dd8551
added os to accept coqui TOS
Browse files
app.py
CHANGED
|
@@ -1,12 +1,15 @@
|
|
| 1 |
import torch
|
| 2 |
-
import
|
| 3 |
import streamlit as st
|
| 4 |
from TTS.api import TTS
|
| 5 |
|
|
|
|
|
|
|
|
|
|
| 6 |
# Initialize model
|
| 7 |
model = "tts_models/multilingual/multi-dataset/xtts_v2"
|
| 8 |
-
|
| 9 |
-
tts = TTS(model
|
| 10 |
|
| 11 |
# Title
|
| 12 |
st.title('Voice Cloning')
|
|
|
|
| 1 |
import torch
|
| 2 |
+
import os
|
| 3 |
import streamlit as st
|
| 4 |
from TTS.api import TTS
|
| 5 |
|
| 6 |
+
# By using XTTS you agree to CPML license https://coqui.ai/cpml
|
| 7 |
+
os.environ["COQUI_TOS_AGREED"] = "1"
|
| 8 |
+
|
| 9 |
# Initialize model
|
| 10 |
model = "tts_models/multilingual/multi-dataset/xtts_v2"
|
| 11 |
+
device = 'cuda' if torch.cuda.is_available() else 'cpu'
|
| 12 |
+
tts = TTS(model).to(device)
|
| 13 |
|
| 14 |
# Title
|
| 15 |
st.title('Voice Cloning')
|