mirari commited on
Commit
8033e07
·
verified ·
1 Parent(s): 0b52a8e

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -4
app.py CHANGED
@@ -9,10 +9,10 @@ current_size = 'medium'
9
  def inference(link):
10
  #yt = YouTube(link)
11
  yt = YouTube(link, on_progress_callback=on_progress)
12
- #global audio_stream
13
- #audio_stream = yt.streams.filter(only_audio=True, file_extension='mp4').first()
14
- #path = audio_stream.download()
15
- path = yt.streams.get_audio_only().download(mp3=True)
16
  options = whisper.DecodingOptions(language= 'Spanish', without_timestamps=True)
17
  results = loaded_model.transcribe(path)
18
  return results['text']
 
9
  def inference(link):
10
  #yt = YouTube(link)
11
  yt = YouTube(link, on_progress_callback=on_progress)
12
+ global audio_stream
13
+ audio_stream = yt.streams.filter(only_audio=True, file_extension='mp4').first()
14
+ path = audio_stream.download()
15
+ #path = yt.streams.get_audio_only().download(mp3=True)
16
  options = whisper.DecodingOptions(language= 'Spanish', without_timestamps=True)
17
  results = loaded_model.transcribe(path)
18
  return results['text']