import { SONG_DATA } from "../song/paths.mjs"; import { songCapabilities } from "./fixtures/song-capabilities.mjs"; // WHAT THIS MACHINE'S SONG DATA OFFERS, so a spec can skip instead of going red. // // The rule lives in `fixtures/song-capabilities.mjs` and is shared with // `make-fixture.mjs` — see its header for why the spec side answers from the // SOURCE directories rather than from the fixture's written JSON (Playwright // collects spec modules to build its test list, and the fixture is built by a // `webServer` command, so on a fresh checkout the file is not there yet). // // Read synchronously at module scope on purpose: `test.skip(cond, reason)` at // the top level of a file skips the whole file, and that has to be decided // while the module is being collected. export type FixtureCapabilities = { songData: boolean; cand2: boolean; wav48: boolean; asr: boolean; media: boolean; song: boolean; songDir: string; }; export const caps = songCapabilities(SONG_DATA) as FixtureCapabilities; // The one sentence, so several files cannot word it several ways. Playwright // prints it beside the skip, and it names the variable to set — "skipped" with // no reason is a spec nobody ever runs again. export const NO_SONG_DATA = `needs the song project's bulk data (cand2/ + wav48/), which is not at ` + `${caps.songDir}. Set SONG_DIR to a copy to run these.`; // The face deck reads SOURCE VIDEOS (`media/`), which is a different half of // the same absent 39 GB — a machine could in principle have one and not the // other, so the specs that need frames say which they need rather than // borrowing `song`. export const NO_SOURCE_MEDIA = `needs the song project's source videos (media/), which are not at ` + `${caps.songDir}. Set SONG_DIR to a copy to run these.`; // The phrase console runs against the REAL ASR corpus (`asr/`) — synthesising // one would defeat the point, since what it exercises is chunk seams, // multi-word tokens and a real confidence spread. export const NO_ASR_CORPUS = `needs the song project's ASR corpus (asr/), which is not at ` + `${caps.songDir}. Set SONG_DIR to a copy to run these.`;