Downloads · 30 days
0
mnaoizyyy/fnaught
fnaught is a audio classification model from mnaoizyyy. Use it for the audio classification task on the model card, and read the license before you ship it in a product. It is set up for onnx. The card lists the license as mit.
fnaught (“f-naught”, as f₀ is read aloud) is a 106k-parameter CNN for monophonic fundamental-frequency (f0) estimation, distributed as a single 428 KB ONNX file. It is designed for realtime use on CPU and in the brows…
Downloads · 30 days
0
Access
Public
Updated Jun 12, 2026
Repo size
428 KB
Likes
0
Public
Click a slice to open those files.
.onnx428 KB · 99%
From the Hugging Face model README
fnaught (“f-naught”, as f₀ is read aloud) is a 106k-parameter CNN for monophonic fundamental-frequency (f0)
estimation, distributed as a single 428 KB ONNX file. It is designed for
realtime use on CPU and in the browser, with particular attention to accuracy
on low-pitched voices (below ~110 Hz), where fixed-resolution STFT frontends
lose precision.
npm install fnaught
import { PitchDetector } from "fnaught";
const detector = await PitchDetector.create();
const { pitchHz, confidence } = await detector.detect(audio, { sampleRate: 44100 });
The npm package implements the exact DSP frontend this model was trained with (verified numerically against the PyTorch implementation) and runs the model through onnxruntime-web in Node or the browser.
The graph expects precomputed frontend features of shape [1, 2, 184, T]
(features) and returns logits [1, T, 200]. See the npm package source
(src/dsp.ts) or the project repository for the frontend definition.
Trained on public pitch datasets — MIR-1K, MDB-stem-synth, PTDB-TUG, and synthetic speech generated with a phoneme-level TTS model — with background noise (CHiME-Home + Gaussian, SNR 10–30 dB), gain, and ±2-semitone pitch-shift augmentation. Voiced frames only; joint cross-entropy + log-frequency L1 objective.
Harmonic-mean score (RPA, cents accuracy, voicing precision/recall, octave accuracy, gross-error accuracy) on three held-out datasets under additive noise (SNR 10–30 dB), mean ± sd over 5 training seeds:
| Dataset | Score |
|---|---|
| Bach10-mf0-synth | 98.27 ± 0.14 |
| SpeechSynth | 91.06 ± 0.10 |
| Vocadito | 94.95 ± 0.04 |
Low-pitch behaviour (held-out synthetic speech, ground-truth-voiced frames): raw pitch accuracy at 80–110 Hz roughly doubles relative to a 1024-point single-window STFT baseline of the same size, and octave-error rates drop by an order of magnitude.
Evaluation used the open-source pitch benchmark suite at https://github.com/lars76/pitch-benchmark (datasets, metrics, and noise protocol as defined there).
MIT. Trained on publicly available research datasets; see dataset attributions: MIR-1K, MDB-stem-synth, PTDB-TUG, CHiME-Home.