Piano transcription in the browser
ONNX files for transcribing piano right in the browser
2 min readupdated
This repository contains ready-to-use ONNX models (a format for running models across different platforms and in the browser) for converting piano recordings into sheet music and MIDI directly on the user's device without sending data to a server. The bundle includes Transkun V2 models for note recognition and stream separation, as well as Demucs v4 (htdemucs_6s) for isolating the piano part from a full song. Everything is optimized to run with onnxruntime-web via WebGPU or WebAssembly. This tool is useful for web developers, musicians, and audio analysis enthusiasts.
Key features
- Full on-device processing without uploading audio to external servers
- Uses Transkun V2 to convert audio frames into musical scores and context
- Includes the Demucs v4 (htdemucs_6s) model to isolate the piano track from a mix
- Supports acceleration via WebGPU with a WebAssembly fallback
What you can do
- Integrate note recognition into a web service for musicians and track transcription
- Build a browser app to convert piano recordings into MIDI format
- Use the Demucs model to extract piano stems from finished songs before analysis
Example
The models are split into parts for efficient execution: for example, transkun-forward.onnx takes 44.1 kHz stereo audio frames and outputs note scores, after which a semi-Markov Viterbi algorithm determines the intervals.
Read more
DetailsFile format: ONNX
Core components: Transkun V2 (transcription) and Demucs v4 (audio separation)
Base datasets: MAESTRO (for Transkun)
Original author licenses: MIT and CC BY-NC-SA 4.0










Comments