qfuxa commited on
Commit
4ae7cba
·
1 Parent(s): df32d26

Corrects 'TranscriptionSegment' object is not subscriptable

Browse files
whisperlivekit/whisper_streaming_custom/backends.py CHANGED
@@ -252,8 +252,8 @@ class OpenaiApiASR(ASRBase):
252
  no_speech_segments = []
253
  if self.use_vad_opt:
254
  for segment in segments.segments:
255
- if segment["no_speech_prob"] > 0.8:
256
- no_speech_segments.append((segment.get("start"), segment.get("end")))
257
  tokens = []
258
  for word in segments.words:
259
  start = word.start
 
252
  no_speech_segments = []
253
  if self.use_vad_opt:
254
  for segment in segments.segments:
255
+ if segment.no_speech_prob > 0.8:
256
+ no_speech_segments.append((segment.start, segment.end))
257
  tokens = []
258
  for word in segments.words:
259
  start = word.start