mirror of
https://github.com/morpheus65535/bazarr.git
synced 2025-04-24 14:47:16 -04:00
Added passing of video filename to detect-language for whisper provider
This commit is contained in:
parent
fdc80ed63e
commit
6c65267382
1 changed files with 2 additions and 1 deletions
|
@ -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))
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue