/** Shared classifier types, free of any numbl import. */ /** The internal rate classification runs at; the take and the training * snippets are both reduced to this, matching the audio-spike-sorting * benchmark, so algorithms transfer between the two apps unchanged. */ export const CLF_FS = 16000; /** Snippet window around each training onset at CLF_FS (20 ms / 180 ms). */ export const CLF_PRE = Math.round(0.02 * CLF_FS); export const CLF_POST = Math.round(0.18 * CLF_FS); export interface Detection { /** Event time in seconds. */ t: number; /** 0-based index into the trained-voice list. */ typeIndex: number; } export interface TrainingArrays { names: string[]; pre: number; /** Per voice: column-major [snipLen x count] snippet matrix. */ snips: { data: Float32Array; snipLen: number; count: number }[]; }