BoldActionMan commited on
Commit
5d7c257
·
verified ·
1 Parent(s): 0ff6181

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -159,8 +159,8 @@ def process_video(video_file, language_choice):
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, int(start), int(end)) # This is the voice you want to clone
163
- audio_clip.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
166
  encode_message = "@MyShell"
 
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, 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
166
  encode_message = "@MyShell"