BoldActionMan commited on
Commit
70e2264
1 Parent(s): 4862f72

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -158,8 +158,8 @@ def process_video(video_file, language_choice):
158
  start, end, translated_text = segment
159
  segment_path = os.path.join(output_dir, f'segment_{start}_{end}.wav')
160
  model.tts_to_file(translated_text, speaker_id, segment_path, speed=speed)
161
- print(f"This is the {start} and {end}")
162
- reference_speaker = AudioFileClip.subclip(audio_clip, 5, 10) # This is the voice you want to clone
163
  reference_speaker.write_audiofile("reference_speaker.wav")
164
  target_se, audio_name = se_extractor.get_se("reference_speaker.wav", tone_color_converter, vad=False)
165
  # Run the tone color converter
 
158
  start, end, translated_text = segment
159
  segment_path = os.path.join(output_dir, f'segment_{start}_{end}.wav')
160
  model.tts_to_file(translated_text, speaker_id, segment_path, speed=speed)
161
+
162
+ reference_speaker = AudioFileClip.subclip(audio_clip, start, end) # This is the voice you want to clone
163
  reference_speaker.write_audiofile("reference_speaker.wav")
164
  target_se, audio_name = se_extractor.get_se("reference_speaker.wav", tone_color_converter, vad=False)
165
  # Run the tone color converter