Spaces:
Runtime error
Runtime error
jaymanvirk
commited on
Commit
•
ddedf71
1
Parent(s):
517bcc3
replaced waveform with .audio[0]
Browse files
app.py
CHANGED
@@ -27,9 +27,9 @@ def translate(audio):
|
|
27 |
def synthesise(text):
|
28 |
inputs = tokenizer(text, return_tensors="pt")
|
29 |
with torch.no_grad():
|
30 |
-
|
31 |
-
|
32 |
-
return speech.
|
33 |
|
34 |
|
35 |
def speech_to_speech_translation(audio):
|
|
|
27 |
def synthesise(text):
|
28 |
inputs = tokenizer(text, return_tensors="pt")
|
29 |
with torch.no_grad():
|
30 |
+
output = model(inputs["input_ids"].to(device))
|
31 |
+
speech = output.audio[0]
|
32 |
+
return speech.cpu()
|
33 |
|
34 |
|
35 |
def speech_to_speech_translation(audio):
|