Spaces:
Running
on
Zero
Running
on
Zero
minor changes
Browse files
app.py
CHANGED
@@ -5,13 +5,13 @@ os.system('python -m unidic download')
|
|
5 |
# print("Make sure you've downloaded unidic (python -m unidic download) for this WebUI to work.")
|
6 |
from melo.api import TTS
|
7 |
import tempfile
|
8 |
-
speaker_ids = model.hps.data.spk2id
|
9 |
|
10 |
@spaces.GPU
|
11 |
def synthesize(text, speed, progress=gr.Progress()):
|
12 |
speed = 1.0
|
13 |
device = 'cuda' if torch.cuda.is_available() else 'cpu'
|
14 |
model= TTS(language='EN', device=device),
|
|
|
15 |
speakers=['EN-US','EN-Default']
|
16 |
bio = io.BytesIO()
|
17 |
models[language].tts_to_file(text, model.hps.data.spk2id[speakers[0]], bio, speed=speed, pbar=progress.tqdm, format='wav')
|
|
|
5 |
# print("Make sure you've downloaded unidic (python -m unidic download) for this WebUI to work.")
|
6 |
from melo.api import TTS
|
7 |
import tempfile
|
|
|
8 |
|
9 |
@spaces.GPU
|
10 |
def synthesize(text, speed, progress=gr.Progress()):
|
11 |
speed = 1.0
|
12 |
device = 'cuda' if torch.cuda.is_available() else 'cpu'
|
13 |
model= TTS(language='EN', device=device),
|
14 |
+
speaker_ids = model.hps.data.spk2id
|
15 |
speakers=['EN-US','EN-Default']
|
16 |
bio = io.BytesIO()
|
17 |
models[language].tts_to_file(text, model.hps.data.spk2id[speakers[0]], bio, speed=speed, pbar=progress.tqdm, format='wav')
|