mirror of
https://github.com/QuentinFuxa/WhisperLiveKit.git
synced 2026-04-29 10:00:00 +00:00
O(n) to O(1) for simulstreaming timestamp determination
This commit is contained in:
@@ -429,7 +429,7 @@ class AudioProcessor:
|
||||
state = await self.get_current_state()
|
||||
|
||||
# Format output
|
||||
lines, undiarized_text, buffer_transcription, buffer_diarization = format_output(
|
||||
lines, undiarized_text, end_w_silence = format_output(
|
||||
state,
|
||||
self.silence,
|
||||
current_time = time() - self.beg_loop if self.beg_loop else None,
|
||||
@@ -437,6 +437,13 @@ class AudioProcessor:
|
||||
debug = self.debug,
|
||||
sep=self.sep
|
||||
)
|
||||
if end_w_silence:
|
||||
buffer_transcription = ''
|
||||
buffer_diarization = ''
|
||||
else:
|
||||
buffer_transcription = state.buffer_transcription
|
||||
buffer_diarization = state.buffer_diarization
|
||||
|
||||
# Handle undiarized text
|
||||
if undiarized_text:
|
||||
combined = self.sep.join(undiarized_text)
|
||||
|
||||
Reference in New Issue
Block a user