stream-audio-fingerprint
stream-audio-fingerprint copied to clipboard
wav header is included when running the sample code.
in the demo js, I believe it processes the wav header as well as the data :(.
the ffmpeg options are:
'-i', 'pipe:0',
'-acodec', 'pcm_s16le',
'-ar', 22050,
'-ac', 1,
'-f', 'wav',
'-v', 'fatal',
'pipe:1'
these are better, providing only the raw samples: '-i', 'pipe:0', '-map', '0:a', '-acodec', 'pcm_s16le', '-ar', 22050, '-ac', 1, '-f', 'data', '-v', 'fatal', 'pipe:1'
The fingerprints produced are different. It is quite odd that the fingerprints are SO different just for a few added bytes at the start.... quite a few common fingerprints, but >75% are different, and not just offset by time.
I did a simple PR for this. Also made the png dep a devDependency.... 'cos people don't need it unless they are playing?