Skip to content

Back to the catalog

Show HN: OnKey – I'm a bad singer, so I built an app to show where I'm off-key
github.comrepo

Show HN: OnKey – I'm a bad singer, so I built an app to show where I'm off-key

OnKey is a free, MIT-licensed singing trainer for Apple Silicon Macs. After a song ends in Spotify, Apple Music or browser YouTube, it separates the lead vocal with UVR's MDX-Net Karaoke 2, tracks pitch with CREPE and turns it into syllable-level notes with the GAME model. On later plays it scrolls the notes, draws the user's live pitch and scores each line. Analysis runs on-device, and the repo explains the build steps and network requests.

TL;DR Runs on-device vocal separation, pitch tracking and note transcription on a Mac to score how well you sing along to songs.
Document

What it claims

OnKey is an MIT-licensed singing trainer by Daniel Murrell. It needs an Apple Silicon Mac (M1 or later) running macOS 14.2 or later. It learns a song's melody from one full play in the user's own music app, and does not provide, stream or download music. Besides the three models the summary names, the credits also list wav2vec 2.0. Scoring accepts singing an octave down and does not penalise slightly late entries.

How it works

Setup asks for two permissions: the microphone, to hear the user, and system audio recording, to hear the music app. It also asks whether OnKey may follow Spotify and Apple Music. "Listen only" refuses that and tracks songs by their sound alone. On later plays, OnKey finds its place in the song from the music itself, not from player state.

Audio is analysed in memory and the music is never saved. Takes and learned songs stay on the Mac, though a take sung over speakers can contain some of the music. There is no account, no analytics and no crash reporting. These requests do leave the machine:

  • Shazam (Apple): a short signature of the music app's audio, never the mic. It is used only when the player does not report the track.
  • LRCLIB: artist, title, album and length, to fetch lyrics.
  • iTunes Search/Lookup: artist and title or a Shazam ID, for cover art and song length.
  • GitHub: an update check a minute after launch and daily after that.

Shazam, lyrics and the update check each have a switch in Settings. scripts/release-hosts.txt lists every web address in a release.

flowchart TD
  A[Song playing] --> B{Player reports track?}
  B -->|Spotify / Apple Music| D[Lyrics via LRCLIB]
  B -->|YouTube / Listen only| C[Shazam signature]
  C -->|needs official signed build| D

How to use it

Download OnKey.dmg from the latest release and drag it to Applications. Official builds are signed with the author's Apple Developer ID and notarised. spctl -a -vv /Applications/OnKey.app shows the signer. To build from source, the Xcode command line tools, Rust, Node and Python 3 are needed:

git clone https://github.com/dsmurrell/onkey && cd onkey
npm install && npm --prefix ui install
python3 -m venv .venv && .venv/bin/pip install -r scripts/requirements-models.txt
PYTHON=.venv/bin/python scripts/fetch-models.sh   # downloads the models and checks them by SHA-256
npx tauri build

The app is built with Tauri. CONTRIBUTING.md covers tests and release checksum checks. "Report a problem" saves a local zip of numbers and logs with no audio, which can be attached to an issue.

Limits

Self-built copies cannot ask Shazam to name new songs, because that needs the author's Apple signature. This only affects YouTube and Listen only mode.

The MIT licence carries a name restriction: modified versions cannot be called OnKey or use its icon. The author also asks for these uses:

  • Keep melody transcriptions private.
  • Do not post screen recordings with music.
  • Do not modify OnKey to save audio.
  • Use a licensed karaoke service for bars or events. Lyrics come from a free community database.

The built-in Share feature exports voice and pitch line only, with no music. Rights holders are directed to LEGAL.md and hello@singonkey.app.

Organisations named here

  • Apple
  • Spotify
  • UVR
  • GitHub
  • Instagram
  • LRCLIB
  • YouTube
  • Apple Music
  • Daniel Murrell

Technologies named here

  • OnKey
  • CREPE
  • GAME
  • Tauri
  • wav2vec 2.0
  • Shazam
  • LRCLIB
  • MDX-Net Karaoke 2
  • iTunes Search and Lookup
  • Rust
  • Node.js
  • macOS
  • Python

Techniques named here

  • Local song learning pipeline
  • Live alignment and pitch tracking