code wiki / (root) / nx_voiceprint_gate.nx

nx_voiceprint_gate.nx

buildroot/runtime/nx_voiceprint_gate.nx

6611 B179 linesdepth 5pulls 7 transitivereach 0 importersview sourcekind gate/proof
docsdependenciesstructsconstsfunctions

about

nx_voiceprint_gate.nx -- REFEREE for VOICE-CLONE-001 rung 1 (voiceprint). Synthesizes three speakers with the SOURCE-FILTER model (glottal impulse train -> 3 cascaded 2-pole formant resonators, r=0.9, fs=8 kHz): A : vocal tract /a/-like, F0 120 Hz (period 67) A2 : SAME tract as A, F0 125 Hz (period 64) <- same speaker, different pitch B : vocal tract /i/-like, F0 182 Hz (period 44) <- different speaker PITCH-INVARIANCE + DISCRIMINATION (the identity floor under cloning): d_self = dist(A, A2) must be SMALL (same tract, different pitch) d_cross = dist(A, B) must be LARGE (different tract) assert d_cross > 4 * d_self -> the print captures WHO, not the momentary pitch. F0: A,A2 print ~120-130 Hz; B prints ~165-195 Hz (the source path works too). TAMPER (neg-control): a SCRAMBLED voiceprint (PARCOR order reversed) must be FAR from the original (> 4*d_self) -- a corrupted vocal tract is NOT the speaker, so the metric must reject it (no false "still you"). Every measured value PRINTED. Evidence -> stdout + knowledge/status/ voiceprint_gate.log. Exit 0 GREEN / 1 RED. Sovereign x86_64 throughout. license_tier: ORIGINAL

dependencies 2 imports · 0 importers

nx_syscalls_x86_64.nx nx_voiceprint.nx nx_voiceprint_gate.nx

imports: nx_syscalls_x86_64.nxnx_voiceprint.nx

imported by: nobody (leaf or entry point)

call flow from main pre-order; caps 40 nodes / depth 6 declared; ↻ = already shown

main sys_openat_append gp gn genvoice reson nx_voiceprint_extract nx_pitch_f0 _px_i16 nx_pitch_is_voiced nx_lpc_autocorr nx_lpc_levinson _q30_mul _vp_i64 print_vp gp ↻ gn ↻ nx_voiceprint_distance

structs

none

consts

24const NSAMP: i64 = 2048
25const A2Q: i64 = 0 - 26542 // -r^2 in Q15, r=0.9

functions

28func gp(logfd: i64, s: *u8) -> i64
called by 2: print_vpmain
35func gn(logfd: i64, v: i64) -> i64
called by 2: print_vpmain
52func reson(buf: *i64, n: i64, a1q: i64) -> i64
called by 1: genvoice
69func genvoice(out_pcm: *u8, nsamp: i64, period: i64,
called by 1: main calls 1: reson
99func print_vp(logfd: i64, label: *u8, vp: *i64) -> i64
called by 1: main calls 2: gpgn
109func main() -> i64