HubCloneHubClone
Tasks

Audio Classification

Audio classification assigns a label to an audio clip, such as the sound source or the speaker's emotion.

Inputs

Input
Birdsong recorded in a park, 5 s

Audio Classification Model

Output

Output
  • bird0.95
  • wind0.03

About Audio Classification

Audio classification assigns a label to an audio clip, such as the sound source or the speaker's emotion. Browse audio classification models on HubClone to compare checkpoints, or open a Space to try one in the browser.

Use Cases

Sound event detection

Recognize alarms or glass breaking.

Language identification

Detect which language is spoken.

Inference

The Transformers pipeline API runs audio classification models in a few lines. Replace <model-id> with any model listed on this page.

from transformers import pipeline

pipe = pipeline("audio-classification", model="<model-id>")
pipe("sample.flac")

Useful Resources

Want to dig deeper into the topic? Great! Here is a hand-picked list of resources we found helpful.

Documentation

  • Audio Classification task guide
  • Pipelines reference

Notebooks

  • Fine-tuning a audio classification model