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. The iscc-sdk uses fpcalc to extract Chromaprint vectors with the following command line parameters:

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

gen_audio_code(cv, bits = ic.core_opts.audio_bits) #

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

Parameters:

Name Type Description Default
cv Iterable[int]

Chromaprint vector

required
bits int

Bit-length resulting Content-Code Audio (multiple of 64)

ic.core_opts.audio_bits

Returns:

Type Description
dict

ISCC object with Content-Code Audio

gen_audio_code_v0(cv, bits = ic.core_opts.audio_bits) #

Create an ISCC Content-Code Audio with algorithm v0.

Parameters:

Name Type Description Default
cv Iterable[int]

Chromaprint vector

required
bits int

Bit-length resulting Content-Code Audio (multiple of 64)

ic.core_opts.audio_bits

Returns:

Type Description
dict

ISCC object with Content-Code Audio

soft_hash_audio_v0(cv, bits = ic.core_opts.audio_bits) #

Create audio similarity hash from a chromaprint vector.

Parameters:

Name Type Description Default
cv Iterable[int]

Chromaprint vector

required
bits int

Bit-length resulting similarity hash (multiple of 32)

ic.core_opts.audio_bits

Returns:

Type Description
bytes

Audio-Hash digest