huckiyang commited on
Commit
afe4a7c
·
1 Parent(s): 1dad4ac

[test] st_en

Browse files
Files changed (1) hide show
  1. app.py +1 -5
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 = "<st_eng>"
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: