WhatAmIHearing is an open-source music identification tool designed to recognize songs playing on your PC. Built as a Shazam client alternative, it leverages your computer's audio input to identify music when your phone's microphone isn't sufficient.
Key Features:
Direct support for PC audio input to capture and analyze music.
Custom API key integration to bypass rate limits of the default Shazam API.
Cross-platform compatibility with Windows and Linux operating systems.
Real-time identification of songs from live audio streams or recorded tracks.
Audience & Benefit:
Ideal for casual listeners, music enthusiasts, and anyone needing accurate song identification on their PC. By utilizing your computer's superior audio capabilities, WhatAmIHearing provides a reliable alternative to mobile-based solutions, ensuring quick and precise results.
Available for installation via winget, the app is designed with ease of use in mind while maintaining its robust functionality for music lovers everywhere.
README
WhatAmIHearing
An open-source Shazam client for identifying music on your PC. For when your phone's microphone just doesn't cut it.
How do I get it?
Direct Download
Go to the Releases Page and on each release there is a zip file attached named WhatAmIHearing.zip:
Click it to download the zip file, unzip it, and run WhatAmIHearing.exe to open the app.
WinGet
WhatAmIHearing is available to install via WinGet with the following command:
winget install zemoto.WhatAmIHearing
By default, it will install to %LOCALAPPDATA%\Microsoft\WinGet\Packages and a WhatAmIHearing command will be added to your command line to launch the app from there.
Updating
Settings are stored in a config.json and history is stored in history.json. Both files are kept next to your WhatAmIHearing.exe. When updating, to keep your settings you need to move those files from your previous version and put them next to the new WhatAmIHearing.exe.
Rate Limiting
Shazam's API has a monthly quota of 500 requests per month on the free tier. To work around this the app supports using your own API key instead of the one bundled with the app.
The Authorization section of that app contains the API key which can be pasted in the API Key text box in the app. WhatAmIHearing will immediately start using the new key without having to restart.
Feel free to ask any questions or report any issues by creating a new Issue.
Technical Details
Written in C# with WPF for the UI.
ZemotoCommon is my utility submodule containing classes that I use in all of my projects.
Uses POST calls to Shazam's API with the raw audio in the body for song detection. API calls are defined in the Api class. HTTP calls are made via the built-in HttpClient class and handled in the ApiClient wrapper class.
The NAudio package is used for recording, resampling, and playback. The Recorder class handles wrapping all the recording logic.
Compiling
The app is compiled with Visual Studio Community 2022. For building the release version, I use the Publish feature in Visual Studio with the following settings:
Configuration: Release (default configuration provided by Visual Studio)
Target Framework: net6.0-windows
Target Runtime: win-x64
Deployment Mode: Framework-dependant or Self-contained depending on the version I am building.