aichina commited on
Commit
700e0be
1 Parent(s): 9921105
Files changed (1) hide show
  1. app.py +6 -6
app.py CHANGED
@@ -93,12 +93,12 @@ def convert(res,openai_key):
93
 
94
  def get_audio(url):
95
 
96
- # yt = YouTube(url)
97
- # audio_file = f'{random.randint(10000,100000)}.mp4'
98
- # print(f'{url} {audio_file} start get audio ...')
99
- # yt.streams.filter(only_audio=True)[0].download(filename=audio_file)
100
- # print('aodio over ..')
101
- audio_file = get_video(url)
102
  return audio_file
103
 
104
  def get_transcript(url,openai_key):
 
93
 
94
  def get_audio(url):
95
 
96
+ yt = YouTube(url)
97
+ audio_file = f'{random.randint(10000,100000)}.mp4'
98
+ print(f'{url} {audio_file} start get audio ...')
99
+ yt.streams.filter(only_audio=True)[0].download(filename=audio_file)
100
+ print('aodio over ..')
101
+ # audio_file = get_video(url)
102
  return audio_file
103
 
104
  def get_transcript(url,openai_key):