juancopi81 commited on
Commit
66e1942
·
1 Parent(s): 2ced026

Update transforming/whispertransform.py

Browse files
Files changed (1) hide show
  1. transforming/whispertransform.py +6 -5
transforming/whispertransform.py CHANGED
@@ -64,8 +64,9 @@ class WhisperTransform(Transform):
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"
70
- os.rename(out_file, new_file)
71
- return new_file
 
 
64
  except Exception as e:
65
  print(f"StreamingData exception print: {e}")
66
  pass
67
+ else:
68
+ out_file = video.download(output_path=".")
69
+ base, _ = os.path.splitext(out_file)
70
+ new_file = base + ".mp3"
71
+ os.rename(out_file, new_file)
72
+ return new_file