Spaces:
Runtime error
Runtime error
Commit
·
e6d7d64
1
Parent(s):
56589e1
Update app.py
Browse files
app.py
CHANGED
@@ -38,7 +38,7 @@ def validate_youtube(url):
|
|
38 |
return True
|
39 |
#This will return the length of the video in sec as an int
|
40 |
video_length = yt.length
|
41 |
-
if video_length >
|
42 |
print("Your video is larger than 10 minutes")
|
43 |
return True
|
44 |
else:
|
@@ -251,7 +251,7 @@ def video_to_translate(url,Idioma_de_Origen,Idioma_de_Destino):
|
|
251 |
print("Recognize from ",lang_in)
|
252 |
#There is a limit of 10 MB on all single requests sent to the API using local file
|
253 |
size_wav=getSize("audio.wav")
|
254 |
-
if size_wav >
|
255 |
print("The wav is too large")
|
256 |
audio_chunks=split_audio_wav("audio.wav")
|
257 |
text=""
|
|
|
38 |
return True
|
39 |
#This will return the length of the video in sec as an int
|
40 |
video_length = yt.length
|
41 |
+
if video_length > 600:
|
42 |
print("Your video is larger than 10 minutes")
|
43 |
return True
|
44 |
else:
|
|
|
251 |
print("Recognize from ",lang_in)
|
252 |
#There is a limit of 10 MB on all single requests sent to the API using local file
|
253 |
size_wav=getSize("audio.wav")
|
254 |
+
if size_wav > 50000000:
|
255 |
print("The wav is too large")
|
256 |
audio_chunks=split_audio_wav("audio.wav")
|
257 |
text=""
|