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
|
256 |
-
no_speech_segments.append((segment.
|
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
|