Get ready to add diarization to openvino backend.
This commit is contained in:
@@ -11,6 +11,7 @@ jiwer
|
|||||||
evaluate
|
evaluate
|
||||||
numpy>=1.26.4,<2.5
|
numpy>=1.26.4,<2.5
|
||||||
openai-whisper==20250625
|
openai-whisper==20250625
|
||||||
|
pyannote.audio
|
||||||
tokenizers==0.20.3
|
tokenizers==0.20.3
|
||||||
transformers[torch]
|
transformers[torch]
|
||||||
sentencepiece
|
sentencepiece
|
||||||
|
|||||||
@@ -28,6 +28,7 @@ class ServeClientOpenVINO(ServeClientBase):
|
|||||||
no_speech_thresh=0.45,
|
no_speech_thresh=0.45,
|
||||||
clip_audio=False,
|
clip_audio=False,
|
||||||
same_output_threshold=10,
|
same_output_threshold=10,
|
||||||
|
diarization=None,
|
||||||
):
|
):
|
||||||
"""
|
"""
|
||||||
Initialize a ServeClient instance.
|
Initialize a ServeClient instance.
|
||||||
@@ -56,6 +57,8 @@ class ServeClientOpenVINO(ServeClientBase):
|
|||||||
no_speech_thresh,
|
no_speech_thresh,
|
||||||
clip_audio,
|
clip_audio,
|
||||||
same_output_threshold,
|
same_output_threshold,
|
||||||
|
None, # translation_queue — OpenVINO backend does not support translation
|
||||||
|
diarization, # speaker diarization — passed through to base class
|
||||||
)
|
)
|
||||||
self.language = "en" if language is None else language
|
self.language = "en" if language is None else language
|
||||||
if not self.language.startswith("<|"):
|
if not self.language.startswith("<|"):
|
||||||
|
|||||||
@@ -258,6 +258,7 @@ class TranscriptionServer:
|
|||||||
no_speech_thresh=options.get("no_speech_thresh", 0.45),
|
no_speech_thresh=options.get("no_speech_thresh", 0.45),
|
||||||
clip_audio=options.get("clip_audio", False),
|
clip_audio=options.get("clip_audio", False),
|
||||||
same_output_threshold=options.get("same_output_threshold", 10),
|
same_output_threshold=options.get("same_output_threshold", 10),
|
||||||
|
diarization=self._create_diarizer(options),
|
||||||
)
|
)
|
||||||
logging.info("Running OpenVINO backend.")
|
logging.info("Running OpenVINO backend.")
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
|
|||||||
Reference in New Issue
Block a user