Skip to main content

A CLI music recognition tool for audio and mixtapes using Python.

Project description


Pyzam logo Pyzam logo



Pyzam is a free CLI music recognition tool for audio and mixtapes in Python.

Installation

Dependencies

Pyzam requires ffmpeg installed.

Installation

$ pip install git+https://github.com/lukafilipxvic/Pyzam.git#egg=Pyzam

Usage

# Listen to speaker (5 seconds by default)
pyzam --speaker

# Listen to microphone
pyzam --microphone

# Listen to audio files
pyzam --input audio_file.mp3
# Loop the recognition continously and save the logs as CSV file
pyzam --speaker -d 10 --loop

# Listen to mixtapes and save the logs as CSV file
pyzam --input audio_file.mp3 --duration 12 --mixtape

See pyzam --help for more options.

Options

Argument name Description
--input Detects from the given audio input file.
--microphone, -m Listens to the microphone of your device.
--speaker, -s Listens to the speaker of your device (default).
--help, -h Show usage & options and exit.
--duration, -d Length of microphone or speaker recording. Max = 12 seconds.
--loop, -l Loop the recognition process indefinitely.
--mixtape Detects every -d seconds for a given input file, only works with --input. --write is enabled automatically.
--json, -j Return the whole Shazamio output in JSON.
--write, -w Writes the output of as a CSV file.

Known Limitations

Shazam API Call Limit (Error 429)

Shazam allows up to 20 requests per minute. Hence, a proxy is recommended to speed up recognition when using --mixtape.

12 Second Sample Limit per request

The maximum sample duration that Shazam allows is 12 seconds. Any audio after 12 seconds will not be recieved by Shazam.

Project details


Release history Release notifications | RSS feed

This version

0.10

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pyzam-0.10.tar.gz (6.1 kB view hashes)

Uploaded Source

Built Distribution

pyzam-0.10-py3-none-any.whl (7.1 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page