If you are concerned about your neighbor's barking dog, there are a few things you can do to address the issue before resorting to using an ultrasonic device. First, try talking to your neighbor about the problem and see if there is a solution that works for both of you. If that does not work, you can try contacting your local animal control agency to see if they can provide any assistance. As a last resort, you can consult with a lawyer to discuss your options and determine if using an ultrasonic device would be considered an invasion of privacy in your jurisdiction.