Specifically, modern anti-bark collars have integrated a small microphone on their system. This microphone is the one that detects if your dog is starting to its daily regimen of tantrums. It can help indicate the collar if its wearer is growling, barking, or doing other noises that might cause nuisances to other people.
In some models of anti-bark collars, a special mechanism has been included in them in where they can detect the barking through bodily vibrations of the dog. It is a more sophisticated capability than collars that are using microphones because it can efficiently detect the barking, even in low volumes.