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