songprint is a pure-Kotlin library that converts raw PCM audio into the binary signature format used by Shazam clients. Feed it 10–12 seconds of 16kHz mono audio and it produces a compact fingerprint you can send to the public Shazam discovery endpoint to identify any song — all in a few milliseconds, with no native code and no external dependencies.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/hitenpatel/songprint/llms.txt
Use this file to discover all available pages before exploring further.
Quickstart
Add the dependency and identify your first song in minutes.
API Reference
Full documentation for SignatureGenerator, RecognitionClient, and Pcm.
PCM Preparation
Convert raw audio bytes from any sample rate or channel count to the required format.
How It Works
Understand the FFT pipeline and Shazam’s constellation-map signature format.
Why songprint?
Zero Dependencies
No external runtime libraries. The entire implementation is self-contained Kotlin.
No API Key Required
Works with the public Shazam discovery endpoint — no registration needed.
KMP-Ready Core
The fingerprinting core uses only common Kotlin — no
java.io, java.nio, or java.util.zip.Battle-Tested
Built for RadioShake, an Android internet-radio app that identifies live-stream songs continuously.
How it works in three steps
Generate the signature
Pass the samples to
SignatureGenerator. The pure-Kotlin FFT pipeline runs in milliseconds.Installation
Add JitPack to your repositories and include the dependency:build.gradle.kts
songprint requires JVM 17 or later. The fingerprinting core (
SignatureGenerator and Pcm) is pure common Kotlin and can be used in Kotlin Multiplatform projects. RecognitionClient uses java.net.HttpURLConnection and is JVM-only.