• Recent
  • Tags
  • Unsolved
  • Solved
  • MagicMirror² Repository
  • Documentation
  • 3rd-Party-Modules
  • Donate
  • Discord
  • Register
  • Login
MagicMirror Forum
  • Recent
  • Tags
  • Unsolved
  • Solved
  • MagicMirror² Repository
  • Documentation
  • 3rd-Party-Modules
  • Donate
  • Discord
  • Register
  • Login
A New Chapter for MagicMirror: The Community Takes the Lead
Read the statement by Michael Teeuw here.

Shazam Mirror Module

Scheduled Pinned Locked Moved Unsolved Requests
10 Posts 4 Posters 2.2k Views 4 Watching
Loading More Posts
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • S Offline
    Slick
    last edited by Oct 28, 2019, 12:52 PM

    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!

    1 Reply Last reply Reply Quote 0
    • S Offline
      Slick
      last edited by Oct 28, 2019, 1:03 PM

      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?

      1 Reply Last reply Reply Quote 0
      • S Offline
        sdetweil
        last edited by sdetweil Oct 28, 2019, 1:17 PM Oct 28, 2019, 1:15 PM

        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)

        Sam

        How to add modules

        learning how to use browser developers window for css changes

        ? 1 Reply Last reply Oct 28, 2019, 2:19 PM Reply Quote 0
        • ? Offline
          A Former User @sdetweil
          last edited by Oct 28, 2019, 2:19 PM

          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.

          S 1 Reply Last reply Nov 4, 2019, 7:54 PM Reply Quote 0
          • ? Offline
            A Former User
            last edited by Oct 28, 2019, 3:41 PM

            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.

            1 Reply Last reply Reply Quote 0
            • M Offline
              Mihonarium
              last edited by Nov 4, 2019, 7:16 PM

              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.

              ? 1 Reply Last reply Nov 4, 2019, 7:34 PM Reply Quote 0
              • ? Offline
                A Former User @Mihonarium
                last edited by Nov 4, 2019, 7:34 PM

                @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. :D

                1 Reply Last reply Reply Quote 0
                • S Offline
                  sdetweil @Guest
                  last edited by Nov 4, 2019, 7:54 PM

                  @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)

                  Sam

                  How to add modules

                  learning how to use browser developers window for css changes

                  ? 1 Reply Last reply Nov 4, 2019, 8:00 PM Reply Quote 0
                  • ? Offline
                    A Former User @sdetweil
                    last edited by Nov 4, 2019, 8:00 PM

                    @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.

                    S 1 Reply Last reply Nov 4, 2019, 8:04 PM Reply Quote 0
                    • S Offline
                      sdetweil @Guest
                      last edited by Nov 4, 2019, 8:04 PM

                      @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…

                      Sam

                      How to add modules

                      learning how to use browser developers window for css changes

                      1 Reply Last reply Reply Quote 0
                      • 1 / 1
                      • First post
                        Last post
                      Enjoying MagicMirror? Please consider a donation!
                      MagicMirror created by Michael Teeuw.
                      Forum managed by Sam, technical setup by Karsten.
                      This forum is using NodeBB as its core | Contributors
                      Contact | Privacy Policy