I don't think they work otherwise more people would be using them. Perhaps if you went to some effort to train your dog to be quiet when it heard the noise, it might work, but you're using it to keep from doing that. Besides other dogs within hearing range would also be getting it and how do you know someone else isn't using them within hearing to train their dogs. Doggy would be so confused.
I haven't found high frequency noises to be a deterrent for other animals that they are supposed to keep away. I think you would be better off saving your money and working with your dog another way. I know many people are opposed, but I think that if it could make the difference in a happy dog and happy owner, that debarking is a possibility. You will hear scare stuff about maiming, etc, but my experience was that after the surgery we enjoyed our dog much more and she was happier because we weren't at her to shut up all the time. She was an incorrigible barker and didn't stop after the surgery. The noise just wasn't so annoying.