I'm looking for a relatively simple way (some examples or libraries with a good API maybe?) to compare two sounds with Java (with tolerance of course). The sources are some sound files with hand-clap noises. The sound I want to compare them with is a live recording via a microphone. The microphone starts a 3 second recording every time it recognizes a louder sound and compares it with the source files.
Purpose: I'm running a Raspberry Pi with a microphone and if I clap my hands I want to toggle the lights in my apartment.