// The reason codes, shared by the review page and the decoder. Kept in ONE file // because a mismatch would silently relabel verdicts: code 3 meaning "plosive" // on the page and something else in the decoder is not an error anyone would see. // // Codes are 1-based and APPEND-ONLY -- reasons.json stores the number, so // renumbering would rewrite history. export const REASONS = { bad: [ "other speaker, not Jer", // 1 "a real word, not a filler", // 2 "noise / music / sound effect", // 3 "too short or cut off", // 4 "bad audio (echo, distortion, quiet)", // 5 ], dirty: [ "next word bleeds in at the end", // 1 defect "previous word bleeds in at the start", // 2 defect "pop / plosive / lip smack", // 3 "background noise or music under it", // 4 "pitch wobbles, not a steady note", // 5 "clipped too tight, sound is missing", // 6 // Not defects. A clip that is genuinely "and um" or "the um" is USEFUL at the // start of a run of notes, and "um and" at the end -- the stray word reads as // emphasis rather than contamination when it sits against a rest. "KEEP: leading word, \"and um\" (for phrase starts)", // 7 "KEEP: trailing word, \"um and\" (for phrase ends)", // 8 "minor noise at an edge, not a word but audible", // 9 ], }; // Free text, for anything the fixed list does not cover. Kept OUT of the arrays // so the numbered codes stay stable; the text rides along in the export. export const OTHER_CODE = 99; // Which side the stray word sits on, for the arranger's placement rule. export const HEAD_CODES = new Set([2, 7]); // word at the START of the clip export const TAIL_CODES = new Set([1, 8]); // word at the END of the clip // Tagged as wanted rather than tolerated: worth STEERING to a boundary, not just // permitting there. export const DELIBERATE_CODES = new Set([7, 8]); // The dedicated KEEP pass: a clip kept for its stray word needs to say WHICH // side the word is on, because that decides where it can be placed. The review // pass conflated the two (everything got tagged "leading"), so the side is // re-decided here rather than inferred from the reason code. export const KEEP_SIDES = { drop: 0, head: 1, tail: 2, both: 3 };