update to support faster whisper 1.2.0

This commit is contained in:
Alex Stansfield
2025-10-07 14:20:20 +00:00
parent 3b17bda5f9
commit c43eb1dd5a
3 changed files with 3 additions and 5 deletions
+1 -1
View File
@@ -1,4 +1,4 @@
faster-whisper==1.1.0
faster-whisper==1.2.0
websockets
onnxruntime==1.17.0
numba
@@ -76,7 +76,7 @@ class ServeClientFasterWhisper(ServeClientBase):
self.language = "en" if self.model_size_or_path.endswith("en") else language
self.task = task
self.initial_prompt = initial_prompt
self.vad_parameters = vad_parameters or {"onset": 0.5}
self.vad_parameters = vad_parameters or {"threshold": 0.5}
device = "cuda" if torch.cuda.is_available() else "cpu"
if device == "cuda":
@@ -27,7 +27,6 @@ from faster_whisper.vad import (
VadOptions,
collect_chunks,
get_speech_timestamps,
merge_segments,
)
@@ -407,8 +406,7 @@ class BatchedInferencePipeline:
**vad_parameters, max_speech_duration_s=chunk_length
)
active_segments = get_speech_timestamps(audio, vad_parameters)
clip_timestamps = merge_segments(active_segments, vad_parameters)
clip_timestamps = get_speech_timestamps(audio, vad_parameters)
# run the audio if it is less than 30 sec even without clip_timestamps
elif duration < chunk_length:
clip_timestamps = [{"start": 0, "end": audio.shape[0]}]