There is a device I'm going to try with my two labs that emits a sound in a frequency that humans can't hear but is annoying to dogs. The device is activated by barking. I want to use it in the house to see if they'll stop barking indoors. It works within a certain range but it would also work outside if you want. My Labs are very vocal and sometimes it isn't appropriate. Where we live now is not a problem because our nearest neighbor is 300 yards away. If we ever move to a neighborhood it would be an annoyance for neighbors. You can get them at pet stores or online.
Labmomma