diff --git a/whisperlivekit/whisper_streaming_custom/backends.py b/whisperlivekit/whisper_streaming_custom/backends.py index 71890d5..ae4f418 100644 --- a/whisperlivekit/whisper_streaming_custom/backends.py +++ b/whisperlivekit/whisper_streaming_custom/backends.py @@ -252,8 +252,8 @@ class OpenaiApiASR(ASRBase): no_speech_segments = [] if self.use_vad_opt: for segment in segments.segments: - if segment["no_speech_prob"] > 0.8: - no_speech_segments.append((segment.get("start"), segment.get("end"))) + if segment.no_speech_prob > 0.8: + no_speech_segments.append((segment.start, segment.end)) tokens = [] for word in segments.words: start = word.start