fix model_cache_dir + direct_english_translation task in simulstreaming

pass actual cache dir instead of None, and use proper task string
instead of boolean for AlignAttConfig

fixes #310
This commit is contained in:
Quentin Fuxa
2026-02-11 22:10:00 +01:00
parent 3b535e857a
commit aded1649ae

View File

@@ -217,7 +217,7 @@ class SimulStreamingASR:
cif_ckpt_path=self.cif_ckpt_path,
decoder_type="beam",
beam_size=self.beams,
task=self.direct_english_translation,
task="translate" if self.direct_english_translation else "transcribe",
never_fire=self.never_fire,
init_prompt=self.init_prompt,
max_context_tokens=self.max_context_tokens,
@@ -330,7 +330,7 @@ class SimulStreamingASR:
lora_path = getattr(self, 'lora_path', None)
whisper_model = load_model(
name=model_ref,
download_root=None,
download_root=getattr(self, 'model_cache_dir', None),
decoder_only=self.fast_encoder,
custom_alignment_heads=self.custom_alignment_heads,
lora_path=lora_path,