juancopi81 commited on
Commit
b56303a
1 Parent(s): d357f9b

Update transforming/whispertransform.py

Browse files
Files changed (1) hide show
  1. transforming/whispertransform.py +2 -3
transforming/whispertransform.py CHANGED
@@ -35,17 +35,16 @@ class WhisperTransform(Transform):
35
  except Exception as e:
36
  print ("Video not available \n")
37
  print(f"Exception: {e}")
38
- pass
39
 
40
  print(f"Video title and url: {video.title} {video.url}")
41
- audio_file = self._get_audio_from_video(yt)
42
 
43
  try:
 
44
  result = self.model.transcribe(audio_file,
45
  without_timestamps=self.without_timestamps)
46
  except Exception as e:
47
  print(f"Audio exception print: {e}")
48
- pass
49
  else:
50
  transcription = result["text"]
51
 
 
35
  except Exception as e:
36
  print ("Video not available \n")
37
  print(f"Exception: {e}")
 
38
 
39
  print(f"Video title and url: {video.title} {video.url}")
 
40
 
41
  try:
42
+ audio_file = self._get_audio_from_video(yt)
43
  result = self.model.transcribe(audio_file,
44
  without_timestamps=self.without_timestamps)
45
  except Exception as e:
46
  print(f"Audio exception print: {e}")
47
+
48
  else:
49
  transcription = result["text"]
50