nx_voice_eval.nx
buildroot/runtime/nx_voice_eval.nx
about
nx_voice_eval.nx -- THE RULER (voice-realism census V0): a sovereign OBJECTIVE audio-naturalness evaluator so
every future voice claim is a MEASURED NUMBER, not an adjective (operator 2026-07-04: "what you are saying vs
what is reality"). Reads a WAV and computes reference-free naturalness PROXIES via integer autocorrelation:
* F0 (pitch) per frame -> MEAN F0 + F0 STDDEV (Hz) [the monotone tell: robotic synth = ~0 Hz variation;
natural speech = ~20-60 Hz]
* PERIODICITY / harmonic strength (autocorr peak / energy) = a harmonic-to-noise PROXY
* % voiced frames
* a MONOTONE flag + a 0-100 naturalness PROXY (honest: NOT human MOS -- MOS needs a human panel; this is an
objective correlate that catches flat/robotic prosody, and it MEASURES the jump when neural TTS lands).
Integer/deterministic, no float, no ML. license_tier: ORIGINAL expect_exit: 0
dependencies 1 imports · 0 importers
imports: nx_syscalls.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
| 12 | const K_MAGIC_65536: i64 = 65536 |
| 13 | const K_MAGIC_16777216: i64 = 16777216 |
| 14 | const K_MAGIC_32768: i64 = 32768 |
| 15 | const K_MAGIC_4096: i64 = 4096 |
| 16 | const K_MAGIC_2000: i64 = 2000 |
| 17 | const K_MAGIC_100000: i64 = 100000 |
| 18 | const K_MAGIC_20000: i64 = 20000 |
| 19 | const K_MAGIC_3000: i64 = 3000 |
| 20 | const K_MAGIC_10000: i64 = 10000 |
| 21 | const K_MAGIC_32000: i64 = 32000 |
functions
| 23 | func vw(s: *u8) -> i64 { var n: i64=0; while s[n]!=(0 as u8){n=n+1} sys_write(1,s,n); return 0 } |
| 24 | func vn(v: i64) -> i64 { let bb: *u8=sys_mmap(28); var m: i64=v; if m<0{sys_write(1,"-" as *u8,1);m=0-m} let t: *u8=sys_mmap(28); var k: i64=0; if m==0{t[0]=48 as u8;k=1} while m>0{t[k]=(48+(m%10)) as u8;m=m/10;k=k+1} var i: i64=0; while i<k{bb[i]=t[k-1-i];i=i+1} sys_write(1,bb,k); return 0 } |
| 25 | func isqrt(v: i64) -> i64 { if v<=0 {return 0} var x: i64=v; var y: i64=(x+1)/2; while y<x { x=y; y=(x+v/x)/2 } return x } called by 1: main |
| 27 | func main() -> i64 |