BoldActionMan commited on
Commit
4b9a0a5
1 Parent(s): 21977c9

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -160,8 +160,8 @@ def process_video(video_file, language_choice):
160
  model.tts_to_file(translated_text, speaker_id, segment_path, speed=speed)
161
  print(f"{start}, {end}")
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
166
  encode_message = "@MyShell"
167
  tone_color_converter.convert(
 
160
  model.tts_to_file(translated_text, speaker_id, segment_path, speed=speed)
161
  print(f"{start}, {end}")
162
  reference_speaker = AudioFileClip.subclip(audio_clip, start, end) # This is the voice you want to clone
163
+ reference_speaker.write_audiofile(f'reference_speaker_{start}_{end}.wav')
164
+ target_se, audio_name = se_extractor.get_se(f'reference_speaker_{start}_{end}.wav', tone_color_converter, vad=False)
165
  # Run the tone color converter
166
  encode_message = "@MyShell"
167
  tone_color_converter.convert(