stream-audio-fingerprint icon indicating copy to clipboard operation
stream-audio-fingerprint copied to clipboard

wav header is included when running the sample code.

Open btsimonh opened this issue 2 years ago • 1 comments

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.

btsimonh avatar Sep 12 '21 09:09 btsimonh

I did a simple PR for this. Also made the png dep a devDependency.... 'cos people don't need it unless they are playing?

btsimonh avatar Sep 12 '21 09:09 btsimonh