Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -50,7 +50,7 @@ def speech_to_text(audio_data, tgt_lang):
|
|
50 |
def speech_to_speech_translation(audio_data, tgt_lang):
|
51 |
file_path = save_audio(audio_data)
|
52 |
audio_input, _ = torchaudio.load(file_path)
|
53 |
-
s2st_model = torch.jit.load("
|
54 |
with torch.no_grad():
|
55 |
text, units, waveform = s2st_model(audio_input, tgt_lang=languages[tgt_lang])
|
56 |
output_file = "/tmp/result.wav"
|
|
|
50 |
def speech_to_speech_translation(audio_data, tgt_lang):
|
51 |
file_path = save_audio(audio_data)
|
52 |
audio_input, _ = torchaudio.load(file_path)
|
53 |
+
s2st_model = torch.jit.load("unity_on_device_s2t.ptl")
|
54 |
with torch.no_grad():
|
55 |
text, units, waveform = s2st_model(audio_input, tgt_lang=languages[tgt_lang])
|
56 |
output_file = "/tmp/result.wav"
|