sohaibchachar commited on
Commit
9c171fd
·
1 Parent(s): f255ea5

Rename app (2).py to app.py

Browse files
Files changed (1) hide show
  1. app (2).py → app.py +2 -2
app (2).py → app.py RENAMED
@@ -109,13 +109,13 @@ def process_video(url):
109
  video_clip = VideoFileClip(video_path)
110
  audio_path = os.path.join(audio_folder, yt_title_cleaned + ".mp3")
111
  video_clip.audio.write_audiofile(audio_path)
112
-
113
  result = whisper_model.transcribe(audio_path)
114
  segments = []
115
  for segment in result["segments"]:
116
  start_time, end_time, text = segment["start"], segment["end"], segment["text"]
117
  segments.append((start_time, end_time, text))
118
-
119
  translated_segments = []
120
  tts_clips = []
121
  for start, end, text in segments:
 
109
  video_clip = VideoFileClip(video_path)
110
  audio_path = os.path.join(audio_folder, yt_title_cleaned + ".mp3")
111
  video_clip.audio.write_audiofile(audio_path)
112
+ print("Converting Audio to Text.")
113
  result = whisper_model.transcribe(audio_path)
114
  segments = []
115
  for segment in result["segments"]:
116
  start_time, end_time, text = segment["start"], segment["end"], segment["text"]
117
  segments.append((start_time, end_time, text))
118
+ Print("Translating text into segments and making an Audio file for each segment.")
119
  translated_segments = []
120
  tts_clips = []
121
  for start, end, text in segments: