Skip to main content

A CLI music recognition tool for audio and mixtapes.

Project description


Pyzam logo Pyzam logo



https://pepy.tech/project/pyzam https://pepy.tech/project/pyzam

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

Pyzam usage

Installation

Dependencies

Pyzam requires ffmpeg installed.

Installation

Using pip:

$ pip install pyzam

Using environment.yml with Conda (installs ffmpeg for you):

conda env create -n pyzam --file=environment.yml

conda activate 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

# Listen to audio via URL
pyzam --url "https://archive.org/download/09-hold-me-in-your-arms/02%20-%20Never%20Gonna%20Give%20You%20Up.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).
--url, -u Detects from the given URL to an audio file.
--help, -h Show usage & options and exit.
--duration, -d Length of microphone or speaker recording. Max = 12 seconds.
--quiet, -q Supresses the operation messages (i.e. Recording speaker for X 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


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.12.tar.gz (10.5 kB view details)

Uploaded Source

Built Distribution

pyzam-0.12-py3-none-any.whl (10.0 kB view details)

Uploaded Python 3

File details

Details for the file pyzam-0.12.tar.gz.

File metadata

  • Download URL: pyzam-0.12.tar.gz
  • Upload date:
  • Size: 10.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.12.5

File hashes

Hashes for pyzam-0.12.tar.gz
Algorithm Hash digest
SHA256 de7845e0ef31ab3d5462268d6ae4d2171a6851d289d7e8deac734febf28cbf3a
MD5 9fd1b477c7eae58f2798238dc401a693
BLAKE2b-256 da67fdb1f5cc3581ebe0d7eef032f1f8ac9041698fa7e0dfbfc461919dc0e33e

See more details on using hashes here.

File details

Details for the file pyzam-0.12-py3-none-any.whl.

File metadata

  • Download URL: pyzam-0.12-py3-none-any.whl
  • Upload date:
  • Size: 10.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.12.5

File hashes

Hashes for pyzam-0.12-py3-none-any.whl
Algorithm Hash digest
SHA256 35f7f9a6f1a4b9f14013d35f6a8ef3a74d8e9aa6727a3fe6f8a5d352fac0f377
MD5 44727c164085d90f05ee98650cd45fe5
BLAKE2b-256 5f692f9cab5642b4b2b053335f5e83a5057faefa353ee1f76b2c7331e42fe88c

See more details on using hashes here.

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