MagicMirror² v2.13.0 is available! For more information about this release, check out this topic.

Shazam Mirror Module



  • Hi Guys,

    not sure how to accomplish this but basically i want to find a way for my smart mirror to use something similar to Shazam to display the album art work for whatever is playing in the room. I don’t use any streaming services otherwise i would just use a spotify module or something. I’m a big vinyl fan so it would be awesome to have this in a picture frame and have the album art full screen and fade in and out as i change albums. Thoughts guys? Thanks!



  • Could we use https://docs.audd.io/ for ID, has a great API and its kinda free

    just dont know how to script the raspberry pi to sample from its imput jack for 3 seconds, send it off, get the song title, artist, album and album art work then display it nicely then repeat like every 5 seconds?



  • looking at the api, you have a choice…

    a file - you don’t have that
    some detected musical data (humming) - detect from sound
    some words - detect from lyrics

    i think you will need a microphone to capture a or b

    arecord or record can capture the audio.
    for speech to text (lyrics mode), you will need to use some additional tooling
    local on system speech to text … use pocketSphinx https://github.com/cmusphinx/pocketsphinx
    reco ‘ok’, 80%
    MMM–voice uses pocketsphinx
    snowboy- captures wave forms, then send off google speech reco api… great quality, but requires api.
    MMM-Hotword uses snowboy

    there is a nodejs lib, sonus. that does the snowboy approach, and signals with words detected… like MMM-Hotword,
    you don’t want EVERY sound, just stuff after you request it (hotword to start)


  • Module Developer

    Interesting challenge.
    But, MMM-Hotword(snowboy) should first know what to catch before it sounds. So that module would not match to your purpose - anonymous lyrics catching.

    Usually for that feature, you need STT (Speech-To-Text) solution. I made one for my private purpose with Google STT for MagicMirror, but I think not recommended. Because it is pricy and your purpose is tooooo ambiguous random.

    Anyway, this WHAT-IS-PLAYING-NOW could be a very interesting challenge and worth to invest time. If nobody make a result, I’ll try this in a few days.


  • Module Developer

    Hmmmm… AudD is not free. (Default free 300 req is just for one time, not refreshable)
    1000 req per month is $2, 2000 req per month is $7. the next plan is $420. wow.
    So, not enough for usage as ALWAYS-LISTENING-DETECTION.
    However, it is somehow useful for TELL-ME-WHAT-IS-THIS-SONG.



  • Hey,
    I’m from the AudD team.

    @sdetweil said in Shazam Mirror Module:

    a file - you don’t have that

    Actually you do have files. You can record what’s playing using a microphone and send it to the API. AudD is music recognition API, and that’s exactly what it has been built for.

    @Sean said in Shazam Mirror Module:

    Hmmmm… AudD is not free. (Default free 300 req is just for one time, not refreshable)
    1000 req per month is $2, 2000 req per month is $7. the next plan is $420. wow.
    So, not enough for usage as ALWAYS-LISTENING-DETECTION.
    However, it is somehow useful for TELL-ME-WHAT-IS-THIS-SONG.

    That’s right. Also, we would be happy to support developing a music recognition module for smart mirrors, so if you need more requests during the development, just contact us.


  • Module Developer

    @Mihonarium
    Glad to hear from you. With my brief glance, There seems no quota-remains API. Instead of that exact API(I don’t want to consume quota just for querying how much quota remains), it will be nice to return available-quota as a result of the normal API request.
    I think $2 or $7 plan is enough for TELL-ME-WHAT-IS-THIS-SONG device as MagicMirror in house.
    It will be interesting challenge for me. Wait for a while. 😃



  • @Sean said in Shazam Mirror Module:

    But, MMM-Hotword(snowboy) should first know what to catch before it sounds.

    well, you would use the hotword, then the phrase (what is playing now), I think u have all that

    and then go into record mode (function config) for some configured seconds then stop recording, (operation completed)
    then take that wave file and send it to the reco engine, and get text back, which you present or speak.

    I also added a ‘give up the mic’ operation to the pocketShpinx library so some other module could use it. (the mic)


  • Module Developer

    @sdetweil
    Sure, Already my MMM-Hotword has the feature - Hotword then seamless recording. So I need just to make a module to request API with that file recorded.
    All I concern about is, what to do with the result. I’m considering searching and playing song from spotify by humming.



  • @Sean said in Shazam Mirror Module:

    and playing song from spotify by humming.

    yes, operation,
    mirror, play song with music like this (record)
    mirror, what song is this (record)

    how do you know hum vs text… well, reco can tell you. no text back…


Log in to reply