logoalt Hacker News

simonw09/30/20246 repliesview on HN

Some details on how this works: https://twitter.com/rtwlz/status/1840821351055311245

    The phone has a Tasker script running on loop (even if
    the battery dies, it’ll restart when it boots again)

    Script records 10 min of audio in airplane mode, then
    comes out of airplane mode and connects to nearby free
    WiFi.

    Then uploads the audio file to my server, which splits it
    into 15 sec chunks that slightly overlap. Passes each to
    Shazam’s API (not public, but someone reverse engineered
    it and made a great Python package). Phone only uses 2%
    of power every hour when it’s not charging!

Replies

oorza10/01/2024

If 2% of the battery is 2% of 3000mAh (which is probably a generous over-estimate of the phone's capacity), that means the phone pulls ~60mA.

You can buy a 60,000 mAh battery (or build one) for about $50, which would buy this device 10,000 hours, or round it down and call it 1 year.

show 5 replies
andai09/30/2024

That's so cool, I gotta check out this Tasker thing!

>when it boots again

Do any Android phones turn on automatically when sufficiently charged? The ones I've had stay switched off but with a little battery charging animation. (I think my old iPhone auto powered on when charged past a certain percentage though.)

show 2 replies
Amarok10/11/2024

Google search is now better than Shazam at recognising a tune. From experience, it can also detect the right tune when someone is (badly) singing it rather than playing the song.

repeekad10/01/2024

surely shazam will realize when one IP address is responsible for 1000x a usual person's bandwidth?

or, given Pixel phones can identify audio in the background seemingly without impacting battery, are modern algorithms for identifying music from audio so efficient that shazam pays almost nothing per clip?

show 3 replies
mbonnet10/02/2024

How does it reboot if it dies?

bilalq09/30/2024

A bit disappointing that this sends audio recordings to a server. Even if it's not the intention, that leaves so much possibility for abuse.

Why not use a Pixel phone with on-device song matching? It also keeps history on device. Getting that data out of the app might be a little tricky, but should be possible.

show 2 replies