mirror of
https://github.com/QuentinFuxa/WhisperLiveKit.git
synced 2026-03-07 14:23:18 +00:00
fixes #251
This commit is contained in:
@@ -335,10 +335,10 @@ class AudioProcessor:
|
||||
|
||||
# Process diarization
|
||||
await diarization_obj.diarize(pcm_array)
|
||||
segments = diarization_obj.get_segments()
|
||||
if self.diarization_before_transcription:
|
||||
segments = diarization_obj.get_segments()
|
||||
self.cumulative_pcm.append(pcm_array)
|
||||
if self.segments:
|
||||
if segments:
|
||||
last_segment = segments[-1]
|
||||
if last_segment.speaker != self.current_speaker:
|
||||
cut_sec = last_segment.start - self.last_end
|
||||
|
||||
Reference in New Issue
Block a user