nx_pitch_gate.nx
buildroot/runtime/nx_pitch_gate.nx
about
nx_pitch_gate.nx -- REFEREE for VOICE-CLONE-001 rung 0 (sovereign F0).
POSITIVE (voiced, real-ish): nx_voiced_vowel.wav is a glottal pitch glide
120 -> 100 Hz @ 8 kHz. The detector MUST (a) report ~120 Hz in an early
window and ~100 Hz in a late window, (b) TRACK the downward glide
(early_f0 > late_f0), and (c) flag both windows VOICED.
NEG-CONTROL #1 (synthetic): a deterministic white-noise buffer MUST read
UNVOICED. If noise reads voiced the detector is worthless -> RED.
NEG-CONTROL #2 (real data): nx_speech_mixed.wav is voiced->unvoiced->voiced.
The middle (unvoiced) third MUST read UNVOICED while the outer thirds
read VOICED -- a discrimination the synthetic noise control can't give.
Every measured value is PRINTED (no fabricated greens). Evidence ->
stdout + knowledge/status/pitch_gate.log. Exit 0 GREEN / 1 RED.
Sovereign: nx_syscalls + nx_pitch only.
license_tier: ORIGINAL
dependencies 2 imports · 0 importers
imports: nx_syscalls.nxnx_pitch.nx
imported by: nobody (leaf or entry point)
call flow from main pre-order; caps 40 nodes / depth 6 declared; ↻ = already shown
structs
| none |
consts
| 20 | const FS: i64 = 8000 |
| 21 | const MINLAG: i64 = 25 // fs / 320 Hz |
| 22 | const MAXLAG: i64 = 114 // fs / 70 Hz |
| 23 | const WIN: i64 = 480 |
| 24 | const HDR: i64 = 44 // canonical RIFF/WAVE header bytes |
functions
| 27 | func gp(logfd: i64, s: *u8) -> i64 |
| 35 | func gn(logfd: i64, v: i64) -> i64 |
| 52 | func analyze(logfd: i64, label: *u8, pcm: *u8, start: i64, vflag: *i64) -> i64 |
| 69 | func gen_noise(buf: *u8, nsamp: i64) -> i64 called by 1: main |
| 84 | func main() -> i64 |