Spaces:
Runtime error
Runtime error
Commit
·
2ced026
1
Parent(s):
f3212bd
Update transforming/whispertransform.py
Browse files
transforming/whispertransform.py
CHANGED
@@ -59,7 +59,11 @@ class WhisperTransform(Transform):
|
|
59 |
|
60 |
def _get_audio_from_video(self, yt: Any) -> Path:
|
61 |
# TODO: Add credits
|
62 |
-
|
|
|
|
|
|
|
|
|
63 |
out_file = video.download(output_path=".")
|
64 |
base, _ = os.path.splitext(out_file)
|
65 |
new_file = base + ".mp3"
|
|
|
59 |
|
60 |
def _get_audio_from_video(self, yt: Any) -> Path:
|
61 |
# TODO: Add credits
|
62 |
+
try:
|
63 |
+
video = yt.streams.filter(only_audio=True).first()
|
64 |
+
except Exception as e:
|
65 |
+
print(f"StreamingData exception print: {e}")
|
66 |
+
pass
|
67 |
out_file = video.download(output_path=".")
|
68 |
base, _ = os.path.splitext(out_file)
|
69 |
new_file = base + ".mp3"
|