SubtitleEdit/subtitleedit · error · IOException
VibeVoice (CrispASR) model {fileName} failed integrity check
Error message
VibeVoice (CrispASR) model {fileName} failed integrity check (expected SHA-256 {expected}, got {actual}). What it means
Integrity check for the VibeVoice CrispASR model set. The downloaded file is opened read-only, hashed, and compared to the pinned expected hash; mismatch throws IOException. Surrounding GetUrl also throws ArgumentException for an unknown fileName.
Source
Thrown at src/ui/Logic/Download/VibeVoiceCrispAsrDownloadService.cs:126
{
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(
$"VibeVoice (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 VibeVoice (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 cached model file and re-download.
- Verify the pinned expected hash matches the current origin artifact.
- Check network/disk for truncation.
- If the model was intentionally republished, update the hash constant in VibeVoiceCrispAsrDownloadService.
Defensive patterns
Strategy: try-catch
Validate before calling
var cached = Path.Combine(modelFolder, fileName);
if (File.Exists(cached))
{
using var s = File.OpenRead(cached);
var h = await Sha256Util.ComputeSha256Async(s, ct);
if (!string.Equals(expected, h, StringComparison.OrdinalIgnoreCase)) File.Delete(cached);
} Try / catch
try { await service.DownloadModelAsync(...); }
catch (IOException ex) when (ex.Message.Contains("failed integrity check"))
{
if (File.Exists(filePath)) File.Delete(filePath);
await service.DownloadModelAsync(...);
} Prevention
- Purge the model cache after upgrading the download service binary.
- Keep the pinned hash and the origin artifact in sync on republish.
- Use a bounded retry for transient download corruption.
When it happens
Trigger: Non-empty expected hash that differs from the SHA-256 of filePath on disk. Empty expected skips the check and returns early.
Common situations: Partial/interrupted download, CDN republished the model without bumping the pinned hash, corrupt cache, or a cache that survived a binary update pinning a new hash.
Related errors
- Qwen3 TTS (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
- OmniVoice {label} download failed integrity check (expected
AI-assisted analysis of SubtitleEdit/subtitleedit@17a9f07487 (2026-08-13).
Data as JSON: /api/errors/7b9ee8896208949a.
Report an issue: GitHub.