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.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
cv |
Iterable[int] |
Chromaprint vector |
required |
bits |
int |
Bit-length resulting Content-Code Audio (multiple of 64) |
64 |
Returns:
Type | Description |
---|---|
dict |
ISCC object with Content-Code Audio |
gen_audio_code_v0(cv, bits = 64)
#
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) |
64 |
Returns:
Type | Description |
---|---|
dict |
ISCC object with Content-Code Audio |
soft_hash_audio_v0(cv)
#
Create 256-bit audio similarity hash from a chromaprint vector.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
cv |
Iterable[int] |
Chromaprint vector |
required |
Returns:
Type | Description |
---|---|
bytes |
256-bit Audio-Hash digest |