Skip to main content

Recognize and Visualize Songs in Your CLI

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

Using uv:

uv tool run pyzam --speaker

Using pip:

# 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 --write --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 Duration 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.13.0.tar.gz (9.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pyzam-0.13.0-py3-none-any.whl (10.1 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: pyzam-0.13.0.tar.gz
  • Upload date:
  • Size: 9.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.5.13

File hashes

Hashes for pyzam-0.13.0.tar.gz
Algorithm Hash digest
SHA256 b16d392408ca7c31416d92712e102abf1a76827c9f056b9f4fe89cc858f98b12
MD5 d392d0f5d77b9fbd26c9451b44f25a75
BLAKE2b-256 6a6a2ad55c8e6b5fba97eabd6b9bea17ce2d4330522bd293364fd5cf14f99cc9

See more details on using hashes here.

File details

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

File metadata

  • Download URL: pyzam-0.13.0-py3-none-any.whl
  • Upload date:
  • Size: 10.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.5.13

File hashes

Hashes for pyzam-0.13.0-py3-none-any.whl
Algorithm Hash digest
SHA256 7b3d7cb81576c484b23f7fa0f122f457b0477994880cadb723f95fcdafb5b48e
MD5 b045bde4a1472a335d2b53f9d230972c
BLAKE2b-256 81b0269cf77b670438976c4a6593f510742ebbf9567998618b76c5b3e1e10090

See more details on using hashes here.

Supported by

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