Skip to content

ISCC - Audio-Code#

A similarity preserving hash for audio content (soft hash).

Creates an ISCC object that provides an iscc-field with an Audio-Code and a duration-field.

The Content-Code Audio is generated from a Chromaprint fingerprint provided as a vector of 32-bit signed integers. Chromaprints are extracted with fpcalc 1.5.0 using the following command line parameters:

$ fpcalc -raw -json -signed -length 0 myaudiofile.mp3

gen_audio_code(cv, bits = 64) #

Create an ISCC Content-Code Audio with the latest standard algorithm.

:param Iterable[int] cv: Chromaprint vector :param int bits: Bit-length resulting Content-Code Audio (multiple of 64) :return: ISCC object with Content-Code Audio :rtype: dict

gen_audio_code_v0(cv, bits = 64) #

Create an ISCC Content-Code Audio with algorithm v0.

:param Iterable[int] cv: Chromaprint vector :param int bits: Bit-length resulting Content-Code Audio (multiple of 64) :return: ISCC object with Content-Code Audio :rtype: dict

soft_hash_audio_v0(cv, bits = 64) #

Create audio similarity hash from a chromaprint vector.

:param Iterable[int] cv: Chromaprint vector :param int bits: Bit-length resulting similarity hash (multiple of 32) :return: Audio-Hash digest :rtype: bytes