SubtitleEdit/subtitleedit · error · IOException
F5-TTS (CrispASR) model {fileName} failed integrity check (e
Error message
F5-TTS (CrispASR) model {fileName} failed integrity check (expected SHA-256 {expected}, got {actual}). What it means
Thrown by the F5-TTS CrispASR integrity check after download: the SHA-256 of the file at filePath does not case-insensitively equal the expected hash registered for that fileName. Same pattern as the other CrispASR services — IOException so the pipeline can treat it as a (potentially retryable) I/O fault. A mismatch means the file is corrupt, truncated, tampered, or the expected hash is stale.
Source
Thrown at src/ui/Logic/Download/F5TtsCrispAsrDownloadService.cs:110
{
return;
}
var expected = DownloadHashManager.GetLatestKnownHash(key);
if (string.IsNullOrEmpty(expected))
{
return;
}
string actual;
await using (var stream = File.OpenRead(filePath))
{
actual = await Sha256Util.ComputeSha256Async(stream, cancellationToken);
}
if (!string.Equals(expected, actual, StringComparison.OrdinalIgnoreCase))
{
throw new IOException(
$"F5-TTS (CrispASR) model {fileName} failed integrity check (expected SHA-256 {expected}, got {actual}).");
}
}
private static string GetUrl(string fileName)
{
if (!ModelUrls.TryGetValue(fileName, out var url))
{
throw new ArgumentException($"Unknown F5-TTS (CrispASR) model: {fileName}", nameof(fileName));
}
return url;
}
private static void TryDelete(string path)
{
try { File.Delete(path); } catch { /* best-effort cleanup */ }
}
View on GitHub (pinned to 17a9f07487)
Solutions
- Delete the file at filePath and let the service re-download.
- If it still fails, confirm the expected hash matches the upstream artifact for the current model version and update the registry if a new release shipped.
- Download from a different mirror / clean network to rule out in-transit corruption.
- Make sure no other process (AV, cloud sync) touches the file during hashing.
Example fix
// before await f5Service.DownloadAsync(fileName, path, progress, ct); // after: purge corrupt cache before retry if (File.Exists(path)) File.Delete(path); await f5Service.DownloadAsync(fileName, path, progress, ct);
Defensive patterns
Strategy: try-catch
Validate before calling
// Pre-check existence; full hash IS the check, so prefer try/catch
if (!File.Exists(filePath)) { /* allow download */ } Try / catch
try { await f5Service.VerifyAsync(fileName, filePath, expected, ct); }
catch (IOException ex) when (ex.Message.Contains("failed integrity check"))
{ File.Delete(filePath); await f5Service.DownloadAsync(fileName, filePath, progress, ct); } Prevention
- Delete cached files when bumping the model version.
- Log the actual vs expected hash to diagnose registry drift.
- Update expected hash and URL together to keep them consistent.
When it happens
Trigger: Downloaded bytes for fileName hash to a value other than expected; cached partial/corrupt file at filePath; mirror served a different artifact; expected-hash registry was updated for a new model release but old bytes remain on disk; concurrent modification while hashing.
Common situations: Stale local cache from a prior version after an app update bumped the model; CDN edge cache poisoning; AV quarantine of part of the file; user copied a similarly-named but different model over the path.
Related errors
- CosyVoice3 (CrispASR) model {fileName} failed integrity chec
- IndexTTS (CrispASR) model {fileName} failed integrity check
- Kokoro TTS {label} download failed integrity check (expected
- llama.cpp {label} download failed integrity check (expected
- Qwen3 TTS (CrispASR) model {fileName} failed integrity check
AI-assisted analysis of SubtitleEdit/subtitleedit@17a9f07487 (2026-08-13).
Data as JSON: /api/errors/497083a801cfc283.
Report an issue: GitHub.