Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -32,7 +32,11 @@ def translate(audio):
|
|
32 |
def synthesise(text):
|
33 |
inputs = tokenizer(text, return_tensors="pt")
|
34 |
# inputs = processor(text=text, return_tensors="pt")
|
35 |
-
|
|
|
|
|
|
|
|
|
36 |
return speech.cpu()
|
37 |
|
38 |
|
|
|
32 |
def synthesise(text):
|
33 |
inputs = tokenizer(text, return_tensors="pt")
|
34 |
# inputs = processor(text=text, return_tensors="pt")
|
35 |
+
with torch.no_grad():
|
36 |
+
outputs = model(inputs["input_ids"])
|
37 |
+
|
38 |
+
speech = outputs.audio[0]
|
39 |
+
# speech = model.generate_speech(inputs["input_ids"].to(device), speaker_embeddings.to(device), vocoder=vocoder)
|
40 |
return speech.cpu()
|
41 |
|
42 |
|