Spaces:
Sleeping
Sleeping
等待
Browse files
app.py
CHANGED
@@ -93,12 +93,12 @@ def convert(res,openai_key):
|
|
93 |
|
94 |
def get_audio(url):
|
95 |
|
96 |
-
|
97 |
-
|
98 |
-
|
99 |
-
|
100 |
-
|
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):
|