Update app.py
Browse files
app.py
CHANGED
|
@@ -142,12 +142,7 @@ def normalize_text(text):
|
|
| 142 |
|
| 143 |
return text
|
| 144 |
|
| 145 |
-
|
| 146 |
-
text = normalize_text(text)
|
| 147 |
-
inputs = processor(text=text, return_tensors="pt").to(device)
|
| 148 |
-
with torch.no_grad():
|
| 149 |
-
speech = model.generate_speech(inputs["input_ids"], speaker_embedding.unsqueeze(0), vocoder=vocoder)
|
| 150 |
-
return (16000, speech.cpu().numpy())
|
| 151 |
|
| 152 |
iface = gr.Interface(
|
| 153 |
fn=text_to_speech,
|
|
|
|
| 142 |
|
| 143 |
return text
|
| 144 |
|
| 145 |
+
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 146 |
|
| 147 |
iface = gr.Interface(
|
| 148 |
fn=text_to_speech,
|