Small fixes to whisper_enricher.py.

pull/189/head
erinhmclark 2025-02-07 12:35:40 +00:00
rodzic e9ad1e1b85
commit 2920cf685f
2 zmienionych plików z 5 dodań i 3 usunięć

Wyświetl plik

@ -6,8 +6,10 @@
"python": ["s3_storage", "loguru", "requests"],
},
"configs": {
"api_endpoint": {"default": None, "help": "WhisperApi api endpoint, eg: https://whisperbox-api.com/api/v1, a deployment of https://github.com/bellingcat/whisperbox-transcribe."},
"api_key": {"default": None, "help": "WhisperApi api key for authentication"},
"api_endpoint": {"required": True,
"help": "WhisperApi api endpoint, eg: https://whisperbox-api.com/api/v1, a deployment of https://github.com/bellingcat/whisperbox-transcribe."},
"api_key": {"required": True,
"help": "WhisperApi api key for authentication"},
"include_srt": {"default": False, "help": "Whether to include a subtitle SRT (SubRip Subtitle file) for the video (can be used in video players)."},
"timeout": {"default": 90, "help": "How many seconds to wait at most for a successful job completion."},
"action": {"default": "translate", "help": "which Whisper operation to execute", "choices": ["transcribe", "translate", "language_detection"]},

Wyświetl plik

@ -110,7 +110,7 @@ class WhisperEnricher(Enricher):
def _get_s3_storage(self) -> S3Storage:
try:
return next(s for s in self.storages if s.__class__ == S3Storage)
return next(s for s in self.config['steps']['storages'] if s == 's3_storage')
except:
logger.warning("No S3Storage instance found in storages")
return