A ragged spy device

The best way to accomplish this is to break it down into different tasks. I suggest starting with being able to detect noise.