beetbox / pyacoustid

Python bindings for Chromaprint acoustic fingerprinting and the Acoustid Web service
MIT License
330 stars 66 forks source link

Chromaprint not defined in windows #67

Closed Alvarofg closed 3 years ago

Alvarofg commented 3 years ago

Hi, I'm looking for a way to use this library in windows. When downloading from https://acoustid.org/chromaprint all I'm getting for windows is the utility fpcalc.exe. Which, I can use to generate fingerprints using acoustid.fingerprint_file() once I included it in the system path.

However, when trying acoustid.fingerprint() I'm getting an

fper = chromaprint.Fingerprinter()
NameError: name 'chromaprint' is not defined
...
except chromaprint.FingerprintError:
NameError: name 'chromaprint' is not defined

I'm thinking I have to do something extra to get actually install the chromaprint library. Any advise?

Things I tried:

  1. pip install chromaprint <-- It turns there is another unrelated package called chromaprint
  2. checked #44 fpcalc.exe is the $PATH
sampsyo commented 3 years ago

You'll need to import chromaprint to use the chromaprint module in Python.

Alvarofg commented 3 years ago

Hi Adrian, adding import chromaprint results in:

raise ImportError("couldn't find libchromaprint")
ImportError: couldn't find libchromaprint

I'm guessing I'm in need of the DLLs 'chromaprint.dll', 'libchromaprint.dll'

Alvarofg commented 3 years ago

I ended up downloading the source code from https://github.com/acoustid/chromaprint.git and used VS 2019 Community to build it. I got a chromaprint.dll file which I moved into $Path . It seems to be working now

sampsyo commented 3 years ago

Great!