Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -40,12 +40,11 @@ def translate(audio):
|
|
40 |
return outputs["text"]
|
41 |
|
42 |
|
43 |
-
|
44 |
def synthesise(text):
|
45 |
text = cleanup_text(text)
|
46 |
inputs = processor(text=text, return_tensors="pt")
|
47 |
speech = model.generate_speech(inputs["input_ids"].to(device), speaker_embeddings.to(device), vocoder=vocoder)
|
48 |
-
return
|
49 |
|
50 |
def speech_to_speech_translation(audio):
|
51 |
translated_text = translate(audio)
|
|
|
40 |
return outputs["text"]
|
41 |
|
42 |
|
|
|
43 |
def synthesise(text):
|
44 |
text = cleanup_text(text)
|
45 |
inputs = processor(text=text, return_tensors="pt")
|
46 |
speech = model.generate_speech(inputs["input_ids"].to(device), speaker_embeddings.to(device), vocoder=vocoder)
|
47 |
+
return speech.cpu()
|
48 |
|
49 |
def speech_to_speech_translation(audio):
|
50 |
translated_text = translate(audio)
|