parent
b9e72d2b9a
commit
7735478286
1 changed files with 7 additions and 7 deletions
|
|
@ -202,14 +202,14 @@ class DiartDiarization:
|
||||||
def insert_silence(self, silence_duration):
|
def insert_silence(self, silence_duration):
|
||||||
self.observer.global_time_offset += silence_duration
|
self.observer.global_time_offset += silence_duration
|
||||||
|
|
||||||
async def diarize(self, pcm_array: np.ndarray):
|
def insert_audio_chunk(self, pcm_array: np.ndarray):
|
||||||
"""
|
"""Buffer audio for the next diarization step."""
|
||||||
Process audio data for diarization.
|
|
||||||
Only used when working with WebSocketAudioSource.
|
|
||||||
"""
|
|
||||||
if self.custom_source:
|
if self.custom_source:
|
||||||
self.custom_source.push_audio(pcm_array)
|
self.custom_source.push_audio(pcm_array)
|
||||||
# self.observer.clear_old_segments()
|
|
||||||
|
async def diarize(self):
|
||||||
|
"""Return the current speaker segments from the diarization pipeline."""
|
||||||
|
return self.observer.get_segments()
|
||||||
|
|
||||||
def close(self):
|
def close(self):
|
||||||
"""Close the audio source."""
|
"""Close the audio source."""
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue