OnKey: Open-Source Mac Singing Trainer That Learns Any Song's Melody From One Play
What OnKey is and why the Show HN thread paid attention
OnKey is a free, open-source singing trainer for the Mac, created by Daniel Murrell, that learns the melody of whatever song you play and scores your live singing against it. It ships the pitch-feedback half of a karaoke scoring system without ever handling licensed music: your own music app plays the song, and OnKey listens.
The project lives at github.com/dsmurrell/onkey, with documentation and a demo with sound at singonkey.app. Its Show HN post reached 169 points and 72 comments. The README's tagline reads, "Saving shower singers from themselves since 2026."
The core claim that makes it different from a pitch trainer or a karaoke game: the song does not have to be charted or programmed in advance by a developer. OnKey derives the melody itself, on your Mac, from a single listen.
How OnKey learns a song: a four-model pipeline that runs locally
OnKey has no song database. When a song ends, it builds a note chart for that song on the user's Mac, then reuses it on every later play.
The pipeline has three stages per song, using models OnKey credits in its documentation:
- Vocal separation. A model separates the lead vocal from the backing music, using UVR's MDX-Net Karaoke 2 among the credited components.
- Pitch tracking. CREPE tracks the singer's pitch in the isolated vocal.
- Note transcription. The GAME note model turns that pitch track into notes, producing one bar per syllable.
OnKey also credits wav2vec 2.0 alongside CREPE, GAME, and UVR's MDX-Net Karaoke 2.
On the first play, you get lyrics only. The song is learned when it finishes. On later plays, note bars scroll toward a playhead and your live pitch is drawn over them, colored green where it lands on the note. OnKey finds its place in the song from the music itself rather than from a stored offset, and it tracks your voice live.
The scoring is deliberately forgiving on two points stated in the README: singing an octave down counts, and being slightly late is not punished.
Requirements and installation
OnKey requires an Apple Silicon Mac (M1 or later) running macOS 14.2 or later. There is no Intel Mac build and no Windows or Linux build.
Installation is: download OnKey.dmg from the latest GitHub release, open it, and drag OnKey to Applications.
Setup asks for two permissions and one preference:
- Microphone access, to hear the singer.
- System audio recording, to hear the music app.
- Whether OnKey may follow Spotify and Apple Music. Choosing Listen only makes it follow songs by their sound alone instead.
A getting-started guide and an FAQ are published under singonkey.app/docs.
Privacy: what stays on the Mac and exactly what leaves it
OnKey never saves the music it listens to. It analyses the sound in memory as it plays. Your recordings and the songs it has learned stay on your Mac. The README notes one caveat: a take sung over speakers can contain some of the music, whereas headphone takes do not. There is no account, no analytics, and no crash reporting.
Four categories of outbound request are documented:
- Shazam (Apple): a short signature of the music app's sound, not the audio and never the microphone, used to name a song OnKey has not learned when the music app does not report what is playing.
- LRCLIB: the song's artist, title, album, and length, to fetch lyrics.
- iTunes Search and Lookup (Apple): an artist and title, or the ID Shazam returned, for covers and the song's length. Cover images come from Spotify's, Apple's, or YouTube's image hosts.
- GitHub: a check for a new version a minute after launch and once a day, plus the update download.
Settings has a switch for Shazam, a switch for lyrics, and a switch for the update check. The repository file scripts/release-hosts.txt lists every web address a release contacts.
Hacker News commenter stevage singled this out as the standout quality of the project:
I really appreciate this level of transparency. Wish it was the standard.
The fair-use design: how OnKey sidesteps music licensing
OnKey does not provide, stream, or download music. That single constraint is what makes the rest of the legal design possible, and the README states the rules users are asked to follow:
- Keep learned transcriptions to yourself. The transcription of each song's melody is for personal practice and should not be shared or published.
- Use the built-in Share feature to post a take. Share produces a short video of your voice and your pitch line with no music, and the singer can add the song from Instagram's own music library, which is licensed for that use. Headphone takes are recommended; do not post screen recordings with the music playing.
- Use a licensed karaoke service for a bar or an event. OnKey's lyrics come from a free community database.
- Do not modify OnKey to save the music.
Rights holders can contact hello@singonkey.app, and LEGAL.md covers the details.
This is a direct response to a problem other builders in the thread ran into. Commenter fourneau described a karaoke scoring project that stalled for exactly this reason:
My karaoke project stopped in its tracks because I couldn't afford to secure rights to music and there didn't seem to be a great legal solution to get audio.
Fourneau also noted that DAM and JoySound karaoke systems already ship a scoring mode that does two things: help you sing on key, and rank you anonymously against other singers.
Building from source and verifying a release
OnKey is MIT licensed, and the README documents a full source build for anyone who does not want to trust the maintainer's binary. It requires an Apple Silicon Mac with the Xcode command line tools, Rust, Node, and Python 3:
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 npx tauri build
The fetch-models.sh step downloads the models and checks them by SHA-256. One capability is lost in a self-built copy: it cannot ask Shazam to name a new song, because that requires the maintainer's Apple signature. Spotify and Apple Music report what is playing themselves, so this only affects YouTube playback and the Listen only mode.
Official releases are signed with Murrell's Apple Developer ID and notarised by Apple. spctl -a -vv /Applications/OnKey.app shows who signed the installed app.
On the licence's trademark terms: modified versions cannot be called OnKey or use its icon, and a credit linking back to the repository is appreciated if you build on the code. CONTRIBUTING.md documents the tests and how to check a release's checksums, and THIRD_PARTY_NOTICES.md carries the full notices and licence texts.
What commenters praised
The enthusiasm in the thread centered on three things: the idea, the fact that no song charting is required, and the transparency of the privacy documentation.
Commenter wnissen liked that songs do not need developer support:
What a fun idea! I love that the song doesn't have to be programmed in by the developer.
wnissen also compared it to the Rock Band era of rhythm games, which gave an incentive to practice without necessarily improving singing, and pointed to the Yale Music Lab pitch-perception quiz at themusiclab.org/quizzes/td for testing relative pitch perception.
Other reactions came from people with a practical use for it: infossgmllc said a daughter in choir would be checking it out, abktya said it would suit a wife and daughter who sing all day, and nopurpose noted surprise that an external app can interact with YouTube in a Safari tab at all.
Commenter bita_nidir had the same project on a personal TODO list for 20 years, including Linux and violin support, and asked what Apple Silicon constraints exist in the code, offering to send a pull request.
Criticisms and open questions from the thread
Resource use and the Tauri stack
The sharpest technical criticism came from commenter viraptor, who argued the app is entirely vibe coded and questioned why it uses a webview via Tauri when a native Swift app could be smaller and smoother:
People used electron/tauri/whatever to make things easier to write and maintain, but if we're just vibing things anyway, can we go back to respecting resources, please?
The commenter added that they liked the idea and had used a paid app doing something similar in the past. This is a criticism of the implementation choice, not a verified claim about how the code was written.
Platform limits: Apple Silicon only
OnKey requires an M1 or newer Mac. Commenter mkesper asked for a Linux version, and hungryhobbit made the same point more pointedly, noting that Macs and Linux are similar enough now to make a port worth considering.
Commenter busssard offered a possible path around the Mac-only constraint: their own vocal notation project, hosted at om-intelligence.ch, which turns a song into singable notation and could, in their framing, be integrated.
Language coverage
Commenter robofanatic asked whether OnKey works with songs in any language or only English. The README does not address language coverage directly; its pipeline operates on separated vocal audio and CREPE pitch tracking rather than on lyrics, while lyrics themselves come from LRCLIB.
Pitch, intervals, and the meaning of "off-key"
Commenter TZubiri argued that relative intervals matter more than absolute frequencies:
I think it's more important to get the intervals right, you can take any starting frequency, and as long as you get the intervals right it will sound right, even if the frequency itself isn't perfect. Whereas if you use a frequency based approach like this you will have an absolute frame of reference instead of a relative one.
OnKey partly accommodates this by counting singing an octave down as correct, but its display compares your pitch against the learned note positions rather than scoring interval accuracy in the abstract.
Commenter criddell raised a terminology question: to them, "off-key" suggests singing a note outside the key of the piece, not being sharp or flat relative to a target note. They noted that some tracks on YouTube appear to be entirely sharp, likely because they were sped up during mixing or mastering, and asked whether those would count as off-key.
Pedagogy: does visual feedback replace listening?
Commenter sligbad, who teaches rhythm students, warned about dependence on visual feedback:
I think these kinds of tools can be helpful, but the number of rhythm students I have seen who need to break out of the dependence on a visual metronome is rough. Part of the struggle is really listening to yourself, and learning how to pick up on your own mistakes.
They added a warning aimed at the builder as much as the user: do not let time spent making and maintaining practice tools detract from the most important thing, which is more practice.
Commenter enzoaguado made the related scope argument that singing is much more than hitting the right notes, listing breath management, vocal technique to avoid injury on difficult songs, techniques such as belting, twang, head voice, chest voice, and vocal fry, and prosody and rhythm training as skills an aspiring singer needs that a pitch scorer does not cover. Their verdict was that a tool like this is a good entry point and a taste of what singing involves, but that covering or at least naming these other aspects would help.
Feature requests and unanswered questions
- Gamification. Commenter pheraph suggested a score or star rating combined with a difficulty level for a daughter who would likely enjoy it. OnKey already produces a score and a per-line report, but the comment asks for a progression layer on top.
- Excluding mislabelled sections. Commenter hensenjuang asked whether a section can be excluded from scoring when the vocal separation picked up a backing vocal instead of the lead melody.
- Instrument support. Commenter julianromano asked whether OnKey could be extended to musical instruments.
- Pitch detection detail. Commenter HummingBirdGif asked how pitch detection is implemented; the README answers this at the component level with CREPE for pitch tracking and the GAME note model for note bars.
The broader debate the thread surfaced
Two themes ran through the discussion beyond the app itself.
First, the case for and against AI-assisted app building. Commenter drltaidev, who describes a programming background and a PhD in machine learning, said they are impressed by what Claude Code can do and hardly write a line of code themselves anymore, while noting the downside: everyone can now build their own version of an idea, and it is not necessarily the best versions that survive. They also agreed with the scope criticism that singing involves far more than pitch.
Second, the value of stating exactly what software sends over the network. The most-upvoted reaction in the thread was not a feature request but an appreciation of OnKey's disclosure of its four outbound request types, with a wish that it were the standard for shipped software.
Sources
Related
- Project
- Project
- Dispatch
- Dispatch
- Dispatch