[Bugfix] Update Ultravox compatibility (#29588)

Signed-off-by: DarkLight1337 <tlleungac@connect.ust.hk>
This commit is contained in:
Cyrus Leung 2025-11-27 17:36:18 +08:00 committed by GitHub
parent da3222f371
commit 00d3310d2d
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -116,7 +116,12 @@ class UltravoxProcessingInfo(BaseProcessingInfo):
def get_feature_extractor(self, **kwargs: object) -> WhisperFeatureExtractor:
hf_processor = self.get_hf_processor(**kwargs)
# Changed in https://huggingface.co/fixie-ai/ultravox-v0_5-llama-3_2-1b/commit/9a3c571b8fdaf1e66dd3ea61bbcb6db5c70a438e
audio_processor = hf_processor.audio_processor # type: ignore
if isinstance(audio_processor, WhisperFeatureExtractor):
return audio_processor
feature_extractor = audio_processor.feature_extractor # type: ignore
assert isinstance(feature_extractor, WhisperFeatureExtractor)
return feature_extractor