Spaces:
Runtime error
Runtime error
[test] st_en
Browse files
app.py
CHANGED
@@ -155,12 +155,8 @@ def translate_to_english(audio_file, source_language):
|
|
155 |
# Load and resample the audio file to 16kHz
|
156 |
speech, _ = librosa.load(audio_file, sr=16000)
|
157 |
|
158 |
-
# Reset beam search state
|
159 |
-
model.beam_search.hyps = None
|
160 |
-
model.beam_search.pre_beam_score_key = None
|
161 |
-
|
162 |
# Set task to speech translation to English
|
163 |
-
model.task_sym = "<
|
164 |
|
165 |
# Set source language
|
166 |
if source_language != None:
|
|
|
155 |
# Load and resample the audio file to 16kHz
|
156 |
speech, _ = librosa.load(audio_file, sr=16000)
|
157 |
|
|
|
|
|
|
|
|
|
158 |
# Set task to speech translation to English
|
159 |
+
model.task_sym = "<st_en>"
|
160 |
|
161 |
# Set source language
|
162 |
if source_language != None:
|