Fix Japanese TDT model download filename mismatch (#522)

Fixes the infinite re-download loop for Japanese TDT models reported in
#521.

## Problem
The `download()` function was using hardcoded `Names.decoderFile` and
`Names.jointFile` for all model versions. For `.tdtJa`, this downloaded:
- `Decoder.mlmodelc` 
- `JointDecision.mlmodelc`

But `modelsExist()` checks for version-specific filenames:
- `Decoderv2.mlmodelc`
- `Jointerv2.mlmodelc`

This mismatch caused the existence check to fail, triggering cache purge
and re-download in an infinite loop.

## Solution
Use `getModelFileNames(version)` in the download function to get the
correct filenames for each version, matching what `modelsExist()`
expects.

## Testing
- [x] Build passes
- [x] Filenames now match between download and existence check
<!-- devin-review-badge-begin -->

---

<a href="https://app.devin.ai/review/fluidinference/fluidaudio/pull/522"
target="_blank">
  <picture>
<source media="(prefers-color-scheme: dark)"
srcset="https://static.devin.ai/assets/gh-open-in-devin-review-dark.svg?v=1">
<img
src="https://static.devin.ai/assets/gh-open-in-devin-review-light.svg?v=1"
alt="Open with Devin">
  </picture>
</a>
<!-- devin-review-badge-end -->

---------
This commit is contained in:
Alex
2026-04-20 17:56:10 -04:00
committed by GitHub
parent 2b57692a6c
commit b789a56609
5 changed files with 64 additions and 42 deletions
+1 -1
View File
@@ -392,7 +392,7 @@ BASELINE_TDT_CTC_WER="3.6"
BASELINE_EARNINGS_WER="16.54"
BASELINE_EOU_WER="7.11"
BASELINE_NEMOTRON_WER="1.99"
BASELINE_JA_CER="6.11"
BASELINE_JA_CER="7.77"
BASELINE_ZH_CER="8.37"
extract_wer() {