Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -25,7 +25,9 @@ def translate(audio):
|
|
25 |
|
26 |
def synthesise(text):
|
27 |
inputs = processor(text=text, return_tensors="pt")
|
28 |
-
|
|
|
|
|
29 |
return speech.cpu()
|
30 |
|
31 |
def speech_to_speech_translation(audio):
|
|
|
25 |
|
26 |
def synthesise(text):
|
27 |
inputs = processor(text=text, return_tensors="pt")
|
28 |
+
input_ids = inputs["input_ids"]
|
29 |
+
input_ids = input_ids[0:1, :200]
|
30 |
+
speech = model.generate_speech(input_ids.to(device), speaker_embeddings.to(device), vocoder=vocoder)
|
31 |
return speech.cpu()
|
32 |
|
33 |
def speech_to_speech_translation(audio):
|