Parakeet v Whisper h2h #26

Merged
iamdoubz merged 21 commits from test_parakeet into main 2026-07-16 10:23:17 -05:00
2 changed files with 48 additions and 1 deletions
Showing only changes of commit 96072a2f75 - Show all commits

No files matched your search

+4 -1
View File
@@ -46,4 +46,7 @@ packaging/npu-runtime/*.zip
# --features vulkan build (bundled into the installer); a redistributable blob,
# not committed.
src-tauri/vulkan-1.dll
MEMORY.md
MEMORY.md
# ASR bench corpus (test_parakeet branch): LibriSpeech-derived WAVs + refs,
# staged by scripts/bench/fetch-corpus.ps1 — audio never enters the repo.
bench-corpus/
+44
View File
@@ -0,0 +1,44 @@
# Stages the WER corpus for asr_bench: the first N LibriSpeech test-clean
# utterances as 16 kHz mono WAV + one reference .txt each, under bench-corpus\
# at the repo root (git-ignored — audio never enters the repo).
param([int]$Utterances = 30)
$ErrorActionPreference = "Stop"
if (-not (Get-Command ffmpeg -ErrorAction SilentlyContinue)) {
throw "ffmpeg is required on PATH (same requirement as the app's Import feature)"
}
$repo = Split-Path -Parent (Split-Path -Parent $PSScriptRoot)
$corpus = Join-Path $repo "bench-corpus"
$cache = "$env:LOCALAPPDATA\WhispAssist\models\bench-cache"
New-Item -ItemType Directory -Force $corpus, $cache | Out-Null
$tarball = Join-Path $cache "test-clean.tar.gz"
if (-not (Test-Path $tarball)) {
Write-Output "downloading LibriSpeech test-clean (~346 MB)"
curl.exe -sL -o "$tarball.part" "https://www.openslr.org/resources/12/test-clean.tar.gz"
if ($LASTEXITCODE -ne 0) { throw "download failed ($LASTEXITCODE)" }
Move-Item -Force "$tarball.part" $tarball
}
$extracted = Join-Path $cache "LibriSpeech\test-clean"
if (-not (Test-Path $extracted)) {
Write-Output "extracting"
tar -xzf $tarball -C $cache
if ($LASTEXITCODE -ne 0) { throw "extract failed ($LASTEXITCODE)" }
}
$flacs = Get-ChildItem -Recurse -Filter *.flac $extracted | Sort-Object FullName |
Select-Object -First $Utterances
foreach ($f in $flacs) {
$name = $f.BaseName
$wav = Join-Path $corpus "$name.wav"
if (-not (Test-Path $wav)) {
ffmpeg -v error -y -i $f.FullName -ar 16000 -ac 1 $wav
if ($LASTEXITCODE -ne 0) { throw "ffmpeg failed on $name" }
}
$trans = Get-ChildItem -Path $f.DirectoryName -Filter *.trans.txt | Select-Object -First 1
$line = Get-Content $trans.FullName | Where-Object { $_.StartsWith("$name ") } | Select-Object -First 1
if (-not $line) { throw "no reference line for $name" }
Set-Content -Encoding utf8 -NoNewline (Join-Path $corpus "$name.txt") $line.Substring($name.Length + 1)
}
Write-Output "staged $($flacs.Count) utterances in $corpus"