SpectrogramFingerprinter<T>

Models & Types ยท AiDotNet.Audio.Fingerprinting

Spectrogram peak-based audio fingerprinter (Shazam-style).

Inheritance: AudioFingerprinterBase<T> โ†’ SpectrogramFingerprinter<T>

For Beginners

This algorithm finds the loudest frequency points in the audio (like mountain peaks on a landscape) and remembers their positions. By comparing peak patterns, it can identify songs even with background noise or slight speed changes.

How It Works

This fingerprinter uses spectral peak detection similar to the Shazam algorithm. It finds prominent peaks in the spectrogram and creates hash codes from peak pairs, providing robustness to noise and speed variations.

Constructors

Constructor Summary
SpectrogramFingerprinter(SpectrogramFingerprintOptions options) Creates a new spectrogram-based fingerprinter.

Properties

Property Summary
string Name { get; } Gets the name of the fingerprinting algorithm.

Methods

Method Summary
AudioFingerprint<T> Fingerprint(Tensor<T> audio) Generates a fingerprint from audio vector.
AudioFingerprint<T> Fingerprint(Vector<T> audio) Generates a fingerprint from audio vector.
IReadOnlyList<FingerprintMatch> FindMatches(AudioFingerprint<T> query, AudioFingerprint<T> reference, int minMatchLength) Finds matching segments between fingerprints.
double ComputeSimilarity(AudioFingerprint<T> fp1, AudioFingerprint<T> fp2) Computes similarity between two fingerprints.