Update functions.py
Browse files- functions.py +7 -1
functions.py
CHANGED
@@ -220,7 +220,13 @@ def inference(link, upload, _asr_model):
|
|
220 |
|
221 |
yt = YouTube(link)
|
222 |
title = yt.title
|
223 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
224 |
results = _asr_model.transcribe(path, task='transcribe', language='en')
|
225 |
|
226 |
return results['text'], yt.title
|
|
|
220 |
|
221 |
yt = YouTube(link)
|
222 |
title = yt.title
|
223 |
+
audio_file = yt.streams.filter(only_audio=True)[0].download(filename="audio.mp4")
|
224 |
+
|
225 |
+
file_size = os.path.getsize(path)
|
226 |
+
|
227 |
+
if file_size > 25:
|
228 |
+
nnn
|
229 |
+
|
230 |
results = _asr_model.transcribe(path, task='transcribe', language='en')
|
231 |
|
232 |
return results['text'], yt.title
|