worldveil / dejavu

Audio fingerprinting and recognition in Python
MIT License
6.36k stars 1.43k forks source link

Unable to match any sounds to fingerprint #222

Closed nickolaspz closed 4 years ago

nickolaspz commented 4 years ago

After successfully running the fingerprint function (for 5, 15 second songs) and seeing the database populated with the results, I run the recognition function with a 5 or 6 second sample of a sound that was fingerprinted. Every time, I get a different result with a low / single digit matching amount of fingerprints despite there being thousands of fingerprints in the db for every sound.

I've tried running this on python 2.7 as well python 3.6 using this fork: https://github.com/mauriciorepetto/dejavu.git@dejavu_python_3.6.6

The following has been ran on a windows and a docker env.

I am fingerprinting a few .wav files with the following code:

config = {
        "database": {
            "host": "127.0.0.1",
            "user": "root",
            "passwd": "root",
            "db": "dejavu"
        }
    }
djv = Dejavu(config)
djv.fingerprint_directory("path_to_wav", [".wav"], 3)

Then, the matching part:

song = djv.recognize(FileRecognizer, file_path)

On docker I run:

apt-get update && apt-get install -y portaudio19-dev python3-pyaudio git gcc musl-dev libpq-dev ffmpeg

requirements.txt

backports.functools-lru-cache==1.5
beautifulsoup4==4.8.0
certifi==2019.9.11
chardet==3.0.4
Click==7.0
cycler==0.10.0
docopt==0.6.2
ffmpeg==1.4
Flask==1.1.1
Flask-Cors==3.0.8
gunicorn==19.9.0
idna==2.8
psycopg2-binary==2.8.4
itsdangerous==1.1.0
Jinja2==2.10.1
Js2Py==0.66
kiwisolver==1.1.0
MarkupSafe==1.1.1
packaging==19.2
pipwin==0.4.5
pydub==0.23.1
pyjsparser==2.7.1
pyparsing==2.4.2
PyPrind==2.11.2
python-dateutil==2.8.0
pytz==2019.2
requests==2.22.0
robobrowser==0.5.3
soupsieve==1.9.3
BobbySteez commented 4 years ago

I also have an issue with this. The recording seems to go smoothly but then I have single digit match (100% due to luck). I tried multiple mics with no luck. I’m still new at coding so if anybody else could chip in it’d be much appreciated.

Cheers,

grishabh282 commented 4 years ago

I also have an issue with this. The recording seems to go smoothly but then I have single digit match (100% due to luck). I tried multiple mics with no luck. I’m still new at coding so if anybody else could chip in it’d be much appreciated.

Cheers,

can you share with me code in python3

grishabh282 commented 4 years ago
###I am facing this issue during execution time

raise JSONDecodeError("Expecting value", s, err.value) from None json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)###

nickolaspz commented 4 years ago

I also have an issue with this. The recording seems to go smoothly but then I have single digit match (100% due to luck). I tried multiple mics with no luck. I’m still new at coding so if anybody else could chip in it’d be much appreciated. Cheers,

can you share with me code in python3

https://github.com/mauriciorepetto/dejavu.git@dejavu_python_3.6.6

BobbySteez commented 4 years ago

Any luck troubleshooting this?

ghost commented 4 years ago

I also have an issue with this. The recording seems to go smoothly but then I have single digit match (100% due to luck). I tried multiple mics with no luck. I’m still new at coding so if anybody else could chip in it’d be much appreciated. Cheers,

can you share with me code in python3

https://github.com/bcollazo/dejavu/

hai19991331 commented 4 years ago

same