SubtitleEdit/subtitleedit · error · IOException
Qwen3 TTS (CrispASR) model {fileName} failed integrity check
Error message
Qwen3 TTS (CrispASR) model {fileName} failed integrity check (expected SHA-256 {expected}, got {actual}). What it means
Integrity check for the Qwen3 TTS CrispASR model set. After download (or on cache validation) the file is opened read-only, hashed, and compared to the pinned expected value; mismatch throws IOException. An invalid file is also cleaned up via EnsureRemovedIfInvalid/IsValidLocalModelFile in the surrounding code.
Source
Thrown at src/ui/Logic/Download/Qwen3TtsCrispAsrDownloadService.cs:173
{
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(
$"Qwen3 TTS (CrispASR) model {fileName} failed integrity check (expected SHA-256 {expected}, got {actual}).");
}
}
private static void TryDelete(string path)
{
try { File.Delete(path); } catch { /* best-effort cleanup */ }
}
private static void EnsureRemovedIfInvalid(string path, string fileName)
{
if (!File.Exists(path) || Qwen3TtsCrispAsr.IsValidLocalModelFile(path, fileName))
{
return;
}
TryDelete(path);
}
}View on GitHub (pinned to 17a9f07487)
Solutions
- Let EnsureRemovedIfInvalid delete the bad file and re-download.
- Manually delete the cached model and retry.
- Verify the pinned expected hash matches the current origin artifact.
- Check network/disk for truncation.
Defensive patterns
Strategy: try-catch
Validate before calling
if (File.Exists(filePath) && !Qwen3TtsCrispAsr.IsValidLocalModelFile(filePath, fileName))
{
File.Delete(filePath); // proactively purge invalid cache
} Try / catch
try { await service.DownloadModelAsync(...); }
catch (IOException ex) when (ex.Message.Contains("failed integrity check"))
{
TryDelete(filePath);
await service.DownloadModelAsync(...);
} Prevention
- Call EnsureRemovedIfInvalid before offering a cached model as ready.
- Keep pinned hashes and origin artifacts in sync on republish.
- Use a bounded retry for transient download corruption.
When it happens
Trigger: Non-empty expected hash that differs from the computed SHA-256 of filePath. The surrounding code's TryDelete/EnsureRemovedIfInvalid helpers exist precisely because this mismatch can recur on bad downloads.
Common situations: Interrupted prior download left a partial file, CDN republished without hash bump, disk corruption, or a cache that survived a binary update that pinned a new hash.
Related errors
- Qwen3 TTS {label} download failed integrity check (expected
- VibeVoice (CrispASR) model {fileName} failed integrity check
- VoxCPM2 (CrispASR) model {fileName} failed integrity check (
- MOSS-TTS (CrispASR) model {fileName} failed integrity check
- OmniVoice (CrispASR) model {fileName} failed integrity check
AI-assisted analysis of SubtitleEdit/subtitleedit@17a9f07487 (2026-08-13).
Data as JSON: /api/errors/8275787fac32c599.
Report an issue: GitHub.