Template matching

Hey guys i want to make a project which is like detect snoring sound, because this is for study so basically it don't need to be complicated. My coworker recommend me using a sample snoring sound which is okay for me but the main problem is this tool more or less require template matching and i am new to this
Anyone can help me? Please guide me guys

These might help. I haven't used them so I can't say how well or easy either works.

http://www.dtic.upf.edu/~jlozano/interfaces/microphone.html

http://interface.khm.de/index.php/lab/interfaces-advanced/frequency-measurement-library/