BoldActionMan commited on
Commit
a7b4496
1 Parent(s): a340b19

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -184,7 +184,7 @@ def process_video(video_file, language_choice):
184
  for i in range(0, len(translation_segments), batch_size):
185
  batch = translation_segments[i:i + batch_size]
186
  with ThreadPoolExecutor(max_workers=5) as executor:
187
- batch_segment_files = list(executor.map(generate_segment_audio_batch, batch, speaker_id))
188
  batch_segment_files = [item for sublist in batch_segment_files for item in sublist] # Flatten the list
189
 
190
  for segment_file, start, end, translated_text in batch_segment_files:
 
184
  for i in range(0, len(translation_segments), batch_size):
185
  batch = translation_segments[i:i + batch_size]
186
  with ThreadPoolExecutor(max_workers=5) as executor:
187
+ batch_segment_files = list(executor.map(generate_segment_audio_batch, [batch] * len(speaker_ids), speaker_id))
188
  batch_segment_files = [item for sublist in batch_segment_files for item in sublist] # Flatten the list
189
 
190
  for segment_file, start, end, translated_text in batch_segment_files: