Spaces:
Runtime error
Runtime error
Commit
·
7925a45
1
Parent(s):
f99fbab
Update app.py
Browse files
app.py
CHANGED
@@ -29,7 +29,7 @@ def translate(audio):
|
|
29 |
def synthesise(text):
|
30 |
inputs = processor(text=text, return_tensors="pt")
|
31 |
speech = model.generate_speech(inputs["input_ids"].to(device), speaker_embeddings.to(device), vocoder=vocoder)
|
32 |
-
return
|
33 |
|
34 |
|
35 |
def speech_to_speech_translation(audio):
|
@@ -60,7 +60,7 @@ file_translate = gr.Interface(
|
|
60 |
fn=speech_to_speech_translation,
|
61 |
inputs=gr.Audio(source="upload", type="filepath"),
|
62 |
outputs=gr.Audio(label="Generated Speech", type="numpy"),
|
63 |
-
|
64 |
title=title,
|
65 |
description=description,
|
66 |
)
|
|
|
29 |
def synthesise(text):
|
30 |
inputs = processor(text=text, return_tensors="pt")
|
31 |
speech = model.generate_speech(inputs["input_ids"].to(device), speaker_embeddings.to(device), vocoder=vocoder)
|
32 |
+
return speech.cpu()
|
33 |
|
34 |
|
35 |
def speech_to_speech_translation(audio):
|
|
|
60 |
fn=speech_to_speech_translation,
|
61 |
inputs=gr.Audio(source="upload", type="filepath"),
|
62 |
outputs=gr.Audio(label="Generated Speech", type="numpy"),
|
63 |
+
examples=[["./example.wav"]],
|
64 |
title=title,
|
65 |
description=description,
|
66 |
)
|