Sound classification from the command line, using macOS SoundAnalysis. Classify audio files or listen to the microphone in real time. Recognizes 303 sound categories --- dogs barking, glass breaking, sirens, musical instruments, speech, rain. All on-device, no API keys, no network calls.
$ cacophony classify recording.wav
0.9792 speech
0.5980 sigh
0.5331 mosquito_buzz
0.4602 insect
0.4339 click
$ cacophony listen
Listening for 5.0s...
0.8234 dog_bark
0.6012 animal
0.5891 domestic_animal
Works with audio files (classify) or live mic input (listen). A
categories command lists all 303 recognized sounds:
$ cacophony categories | grep drum
drum
drum_kit
snare_drum
bass_drum
timpani
--json and --top=N work on all commands. listen also takes
--duration=MS and --threshold=N.
Uses Apple's SoundAnalysis and AVFoundation frameworks via Objective-C runtime bindings --- no Swift, no Objective-C source files.
brew install georgemandis/tap/cacophony