Ngoufack commited on
Commit
34e6e4e
·
1 Parent(s): 0f1f343
Files changed (1) hide show
  1. app.py +2 -3
app.py CHANGED
@@ -24,8 +24,8 @@ COMPUTE_TYPE = "float32"
24
  YT_LENGTH_LIMIT_S = 3600 # limit to 1 hour YouTube files
25
 
26
  num_speakers = 2
27
- language = 'French'
28
- model_size = 'small'
29
  model_name = model_size
30
 
31
  def getpreferredencoding(do_setlocale = True):
@@ -112,7 +112,6 @@ def yt_transcribe(yt_url, task):
112
  filepath = os.path.join(tmpdirname, "audio.wav")
113
  download_yt_audio(yt_url, filepath)
114
 
115
- audio = whisperx.load_audio(filepath)
116
  result = model.transcribe(audio, batch_size=BATCH_SIZE)
117
 
118
  return html_embed_str, result["text"]
 
24
  YT_LENGTH_LIMIT_S = 3600 # limit to 1 hour YouTube files
25
 
26
  num_speakers = 2
27
+ language = None
28
+ model_size = 'tiny'
29
  model_name = model_size
30
 
31
  def getpreferredencoding(do_setlocale = True):
 
112
  filepath = os.path.join(tmpdirname, "audio.wav")
113
  download_yt_audio(yt_url, filepath)
114
 
 
115
  result = model.transcribe(audio, batch_size=BATCH_SIZE)
116
 
117
  return html_embed_str, result["text"]