The Patchbay_

Fréchet Audio Distance

Reference implementation of FAD and CLAP score for evaluating generated audio against a reference set.

LanguagePython
CategoryML & generative
LicenseMIT
PlatformsLinux Windows macOS
Installpip install frechet_audio_distance
First released2022
MaintainedYes
LinksSource

Strengths

Limitations

Best for

Comparing checkpoints, prompts or settings objectively instead of trusting your ears across sessions.

Minimal example

from frechet_audio_distance import FrechetAudioDistance

frechet = FrechetAudioDistance(
    model_name="vggish",
    sample_rate=16000,
    verbose=True,
)

score = frechet.score("/path/to/reference/audio", "/path/to/generated/audio")
print(score)   # lower is closer to the reference distribution
Use it to compare, not to judge. FAD tells you how close your generated set sits to a reference distribution. It cannot tell you whether a track is good, and it is meaningless across different embedding models or reference sets. Fix both, then compare.

Related tools

librosaEssentiaAudioCraft (MusicGen)torchaudio

← Back to all tools