mimbres / neural-audio-fp

https://mimbres.github.io/neural-audio-fp
MIT License
179 stars 25 forks source link

Get fingerprints for custom wav input files #21

Closed ac-alpha closed 2 years ago

ac-alpha commented 2 years ago

I want to generate just the fingerprints for custom wav file as input. I just want to generate fingerprint for one single wav file. Could someone point me to a script which can do so. e.g. If I have a wav file of 10s and my seg length is 1s and hop 0.5s, then I want a fingerprint output of size (19 x fp_dim).

mimbres commented 2 years ago

@ac-alpha It is briefly described in readme/More Features/Fingerprint Generation.

python run.py generate --source SOURCE_ROOT_DIR --output FP_OUTPUT_DIR --skip_dummy # for custom audio source
python run.py generate --help # more details...
ac-alpha commented 2 years ago

Thanks @mimbres. The script above ignores the last (total_segments%test_bsz) segments of the wav file, so I was not sure if the script is correct or not.

mimbres commented 2 years ago

@ac-alpha Thanks for reporting the issue. The problem with the last segments (total_seg%test_bsz) being dropped is an expected behavior.