I know how irritating it can be when your dog starts barking at top of his voice at mid night. But, you can't control you dog's barking. However, there's one product which can help you. bark off is one device, which is widely used. Bark off, placed outside and inside the house, produces a voice at a very low pitch which isn't audible to human ears which distracts your dog. This product is much more effective than the shock collar which hurts your canine and can damage its vocal cord. The ultrasonic signal is completely safe for your dogs and to you also.
Bark off is a pretty effective device and works on various kinds of canine. Only, if your dog has some hearing problem than this product may loose it's effectiveness, otherwise, it works just fine.