Fréchet Audio Distance
Reference implementation of FAD and CLAP score for evaluating generated audio against a reference set.
| Language | Python |
|---|---|
| Category | ML & generative |
| License | MIT |
| Platforms | Linux Windows macOS |
| Install | pip install frechet_audio_distance |
| First released | 2022 |
| Maintained | Yes |
| Links | Source |
Strengths
- Fills the gap almost every generation project has: measuring whether output actually got better
- Four embedding backends — VGGish, PANN, CLAP and EnCodec — so you can match the metric to the material
- CLAP score measures text-to-audio agreement, not just audio realism
- MIT licensed and simple to drop into a training or evaluation loop
Limitations
- FAD measures distributional similarity to a reference set, not musical quality — a high score is not a good song
- Results are only comparable within the same embedding model and reference set
- Needs a decent reference corpus to mean anything
- No substitute for listening
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
See all Fréchet Audio Distance alternatives & how they compare →