Added passing of video filename to detect-language for whisper provider

This commit is contained in:
McCloudS 2025-03-07 20:21:53 -07:00 committed by GitHub
parent fdc80ed63e
commit 6c65267382
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -272,9 +272,10 @@ class WhisperAIProvider(Provider):
if out == None:
logger.info(f"Whisper cannot detect language of {path} because of missing/bad audio track")
return None
video_name = path if self.pass_video_name else None
r = self.session.post(f"{self.endpoint}/detect-language",
params={'encode': 'false'},
params={'encode': 'false', 'video_file': {video_name}},
files={'audio_file': out},
timeout=(self.response, self.timeout))