Documentation
¶
Overview ¶
Command speech-testdata builds the data the integration tests read, under one directory (.cache by default), from nothing:
<dir>/lib/<platform>/ the pinned libspeech release, installed by download.Library
<dir>/models/ catalog models, fetched by download.Model
<dir>/audio/ four LibriSpeech clips as 16 kHz mono 16-bit WAVE files,
transcripts.txt, and three-utterances.wav
Everything is checked: the library archive against the release's SHA256SUMS, each model against the catalog's SHA-256, the LibriSpeech archive against the SHA-256 pinned below, each FLAC clip against its own MD5 signature, and each audio file written against its pinned SHA-256. What is already there and checks out is kept, so a second run downloads nothing.
From the module root (make testdata runs the first):
go run ./cmd/speech-testdata # host library, required models, audio go run ./cmd/speech-testdata -libs host,linux/amd64/cpu # also the Linux library, for make test-linux go run ./cmd/speech-testdata -optional all # also every optional model (about 6.3 GB) go run ./cmd/speech-testdata -optional qwen3-asr-0.6b:q4_k # one optional model go run ./cmd/speech-testdata -librispeech test-clean.tar.gz # a local copy of the archive
The audio is LibriSpeech (Vassil Panayotov, Guoguo Chen, Daniel Povey, Sanjeev Khudanpur, "LibriSpeech: an ASR corpus based on public domain audio books", ICASSP 2015, https://www.openslr.org/12/), licensed under CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/). The clips are utterances 1089-134686-0000 to -0003 of its test-clean set, decoded from FLAC without any other change; three-utterances.wav is clips 0000, 0001 and 0002, each followed by 2 s of digital silence. No smaller pinned source of those four utterances was found, so the whole test-clean archive (346 MB) is streamed once and only the five files used are kept.