A shazam like tool to store songs fingerprints and retrieve them

Overview

musig 🔈

GoDoc CircleCI

A shazam-like tool that allows you to compute song's fingerprints and reverse lookup song names.

It's more or less an implementation of the shazam paper as described in this awesome article

Installation

You will need to have go on your computer (version > 1.11 to be able to use go modules).

You will also need to have portaudio installed (brew install portaudio on macOS, apt install portaudio19-dev on Ubuntu / Debian, for other distributions you can search for the portaudio package), it is required for the listen command that listens on your microphone to match the recording against the database.

To build the binary:

git clone [email protected]:sfluor/musig.git
cd musig
make

You will then be able to run the binary with:

./bin/musig help

Usage

musig usage

To do some testing you can download wav songs by doing make download.

Load them with ./bin/musig load "./assets/dataset/wav/*.wav"

And try to find one of your song name with:

./bin/musig read "$(ls ./assets/dataset/wav/*.wav | head -n 1)"

You can also try to use it with your microphone using the listen command:

./bin/musig listen

If you want to record a sample and reuse it multiple times after you can also use the record command:

./bin/musig record

For more details on the usage see the help command:

A shazam like CLI tool

Usage:
  musig [command]

Available Commands:
  help        Help about any command
  listen      listen will record the microphone input and try to find a matching song from the database (Ctrl-C will stop the recording)
  load        Load loads all the audio files matching the provided glob into the database (TODO: only .wav are supported for now)
  read        Read reads the given audio file trying to find it's song name
  record      record will record the microphone input and save the signal to the given file
  spectrogram spectrogram generate a spectrogram image for the given audio file in png (TODO: only .wav are supported for now)

Flags:
      --database string   database file to use (default "/tmp/musig.bolt")
  -h, --help              help for musig

Use "musig [command] --help" for more information about a command.

Testing

To run the tests you can use make test in the root directory.

TODOs

  • improve the documentation
  • support for mp3 files
You might also like...
In memory Key/Value store in go using gRPC.
In memory Key/Value store in go using gRPC.

In memory cache, using gRPC Contents About Running Server Local Docker Kubernetes Example Helm Terraform API Add Get GetByPrefix GetAllItems DeleteKey

OpenDILab RL Object Store

Introduction Decision AI Store Installation Prerequisites Linux Python = 3.6 pip install . Quick Start Start Etcd Server di_store etcd_server ./conf/

Project Kebe is the open-source Snap Store implementation.

Introduction Kebe intends to be a full replacement for the Snap Store. Quickstart Once you have an environment setup (for instance using https://githu

A pizza store design using NATS pub sub queue.
A pizza store design using NATS pub sub queue.

A pizza store design using NATS pub sub queue.

A simple distributed key-value store by using hashicorp/raft

raftkv This repository holds a simple distributed key-value store by using hashicorp/raft. raftkv provides gRPC and HTTP APIs. Please take a look API

Consul K/V Store Implementation For Go
Consul K/V Store Implementation For Go

Consul K/V Store Implementation For Go Enables Consul to be used as a configuration source in go applications Dynamic Configuration with Consul's Key/

Inventory: Task 1 : Online Store

Task 1 : Online Store ### Q1: Describe what you think happened that caused those bad reviews during our 12.12 event and why it happened. Answer : You

GopherTalk: a multi-user chat powered by GO to explore its standard library and features like sockets, goroutines, channels and sync package kcp is a prototype of a Kubernetes API server that is not a Kubernetes cluster - a place to create, update, and maintain Kube-like APis with controllers above or without clusters.
kcp is a prototype of a Kubernetes API server that is not a Kubernetes cluster - a place to create, update, and maintain Kube-like APis with controllers above or without clusters.

kcp is a minimal Kubernetes API server How minimal exactly? kcp doesn't know about Pods or Nodes, let alone Deployments, Services, LoadBalancers, etc.

Comments
  • Segfault on 24bit files

    Segfault on 24bit files

    Greetings!

    It looks like parseRawData() segfaults on 24bit wav files, because there's no conversion function defined here

    	byteSizeToIntFunc = map[int]bytesToIntF{
    		16: bits16ToInt,
    		32: bits32ToInt,
    	}
    
    panic: runtime error: invalid memory address or nil pointer dereference
    [signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0x10a3643]
    
    goroutine 1 [running]:
    github.com/DylanMeeus/GoAudio/wave.parseRawData(0xc00010000c, 0x4, 0x102880, 0x10, 0x1, 0x2, 0xac44, 0x40998, 0x6, 0x18, ...)
    	...go/pkg/mod/github.com/!dylan!meeus/[email protected]/wave/reader.go:145 +0x143
    github.com/DylanMeeus/GoAudio/wave.ReadWaveFile(0x10d7ea8, 0x13, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, ...)
    

    I imagine the omission is due to there being no math constant defined for a max 24bit integer, which is understandable. It looks like other packages work around this by simply defining their own -- either by defining it as 8bitmax+16bitmax, or, in the case of mysql:

    const (
    	MaxUint24 = 1<<24 - 1
    	MaxInt24  = 1<<23 - 1
    	MinInt24  = -1 << 23
    )
    

    I'm happy to drop a PR if it'd be helpful, but I figured I'd just give you a heads up first, as I'm not 100% sure that my solution is correct

    Cheers,

    opened by gkuchta 1
  • Enhancement: compute the correlation between two matches instead of only counting the matches

    Enhancement: compute the correlation between two matches instead of only counting the matches

    This is to improve the matching process, it's very similar to what is described in the shazam paper, illustrations are from the shazam paper:

    A matching sample will look like: image

    Whereas a non-matching sample will look like: image

    opened by sfluor 0
Owner
Sami Tabet
Software Engineer
Sami Tabet
A C/S Tool to Download Torrent Remotely and Retrieve Files Back Over HTTP at Full Speed without ISP Torrent Limitation.

remote-torrent Download Torrent Remotely and Retrieve Files Over HTTP at Full Speed without ISP Torrent Limitation. This repository is an extension to

Bruce Wang 59 Sep 30, 2022
Moviefetch: a simple program to search and download for movies from websites like 1337x and then stream them

MovieFetch Disclaimer I am NOT responisble for any legal issues or other you enc

Hashm 3 Dec 2, 2022
A CLI tool queries the GitHub GraphQL API for users and ranks them according to number of contributions

Project homepage Most Active GitHub Users Counter This CLI tool queries the GitHub GraphQL API for users and ranks them according to number of contrib

Mike Owino 0 Dec 6, 2021
Given a list of domains, you resolve them and get the IP addresses.

resolveDomains Given a list of domains, you resolve them and get the IP addresses. Installation If you want to make modifications locally and compile

Josué Encinar 33 Oct 19, 2022
Automatically register a list of domain names, add them to Cloudflare and set DNS records.

NameCannon Automatically register a list of domain names, add them as zones on Cloudflare, then add DNS records. Usage $ ./NameCannon --namesiloSecret

Kevin Roleke 1 Jan 26, 2022
Reads JSON object (stream) from file/stdin and routes it/them to GCP Pub/Sub topics.

json2pubsub Publish JSON object (stream) into GCP Pub/Sub topic based on a field value. Usage: json2pubsub --project=STRING <mapping> ... Reads JSON

Sääsivu 2 Nov 3, 2022
Tapestry is an underlying distributed object location and retrieval system (DOLR) which can be used to store and locate objects. This distributed system provides an interface for storing and retrieving key-value pairs.

Tapestry This project implements Tapestry, an underlying distributed object location and retrieval system (DOLR) which can be used to store and locate

Han Cai 1 Mar 16, 2022
Use Consul to do service discovery, use gRPC +kafka to do message produce and consume. Use redis to store result.

目录 gRPC/consul/kafka简介 gRPC+kafka的Demo gRPC+kafka整体示意图 限流器 基于redis计数器生成唯一ID kafka生产消费 kafka生产消费示意图 本文kafka生产消费过程 基于pprof的性能分析Demo 使用pprof统计CPU/HEAP数据的

null 43 Jul 9, 2022
Backend implementation using go, proto3 and gRPC for a mock online store

Backend implementation using go, proto3 and gRPC for a mock online store Ricardo RICO URIBE Tasks I - Order service The current system exposes a produ

Ricardo Rico 0 Oct 10, 2021
A consistent distributed data store.

Doozer What Is It? Doozer is a highly-available, completely consistent store for small amounts of extremely important data. When the data changes, it

null 3.3k Dec 1, 2022