A friend was being annoyed every night by a very barkish canine in the neighboring yard. He devised a dogvoice operated relay that turned on an ultrasonic yelp at about 120 db. He mounted it close to his fence line. The dog developed a near-reverent silence very quickly. I sympathize on both sides of the issue.
Gary Larson once did a cartoon of a man wearing an electronic box on a strap around his neck that was marked "Dog Language Translator". There were many dogs in the picture with speech bubbles over their heads. Each dog was saying, "Hey! Hey! Hey!"