/** The shipped classifier source and the starting point for a custom one. */ import silenceGapKnnSrc from './silence_gap_knn.m?raw'; export const DEFAULT_CLASSIFIER_NAME = 'silence_gap_knn'; export const DEFAULT_CLASSIFIER_SOURCE = silenceGapKnnSrc; export const CUSTOM_CLASSIFIER_TEMPLATE = `function [times, labels] = my_classifier(x, fs, training) % x the take, column vector at fs Hz (16 kHz) % training struct: snips {1 x nVoices} cell of [snipLen x nSnips] % matrices (columns are training snippets), names {1 x nVoices}, % pre (samples before the hit onset within each snippet) % Return column vectors: hit times in seconds and 1-based voice indices. % The same interface as the audio-spike-sorting benchmark, so an % algorithm developed there drops in here unchanged. times = zeros(0, 1); labels = zeros(0, 1); end `;