Fix parakeetJa repo to download both CTC and TDT models

The parakeet-ctc-0.6b-ja-coreml repo contains both CTC and TDT models,
but getRequiredModelNames() was only returning CTCJa models.

This caused TdtJaModels downloads to fail because it wouldn't download
the TDT-specific files (Decoderv2.mlmodelc, Jointerv2.mlmodelc).

Fix: Return union of CTCJa and TDTJa requiredModels for .parakeetJa

Now downloads:
- Preprocessor.mlmodelc (shared)
- Encoder.mlmodelc (shared)
- CtcDecoder.mlmodelc (CTC)
- Decoderv2.mlmodelc (TDT)
- Jointerv2.mlmodelc (TDT)

Fixes #517
This commit is contained in:
Alex-Wengg
2026-04-12 01:13:27 -04:00
parent 79a18eddd3
commit a23ff098b5
+2 -1
View File
@@ -673,7 +673,8 @@ public enum ModelNames {
case .parakeetCtcZhCn:
return ModelNames.CTCZhCn.requiredModels
case .parakeetJa:
return ModelNames.CTCJa.requiredModels
// Repo contains BOTH CTC and TDT models - return union of both sets
return ModelNames.CTCJa.requiredModels.union(ModelNames.TDTJa.requiredModels)
case .parakeetEou160, .parakeetEou320, .parakeetEou1280:
return ModelNames.ParakeetEOU.requiredModels
case .nemotronStreaming1120, .nemotronStreaming560, .nemotronStreaming160, .nemotronStreaming80: