reab5555 commited on
Commit
892ea6a
·
verified ·
1 Parent(s): 99614c2

Update video_processing.py

Browse files
Files changed (1) hide show
  1. video_processing.py +2 -2
video_processing.py CHANGED
@@ -156,8 +156,8 @@ def process_video(video_path, anomaly_threshold, desired_fps, progress=None):
156
  progress(0.8, "Extracting audio and performing voice analysis")
157
 
158
  audio_path = extract_audio_from_video(video_path)
159
- diarization = diarize_speakers(audio_path)
160
- voice_embeddings, audio_duration = get_speaker_embeddings(audio_path, diarization, "pyannote/embedding")
161
 
162
  aligned_voice_embeddings = align_voice_embeddings(voice_embeddings, frame_count, original_fps, audio_duration)
163
 
 
156
  progress(0.8, "Extracting audio and performing voice analysis")
157
 
158
  audio_path = extract_audio_from_video(video_path)
159
+ diarization, most_frequent_speaker = diarize_speakers(audio_path)
160
+ voice_embeddings, audio_duration = get_speaker_embeddings(audio_path, diarization, most_frequent_speaker)
161
 
162
  aligned_voice_embeddings = align_voice_embeddings(voice_embeddings, frame_count, original_fps, audio_duration)
163