Will a dog whistle to stop a dog from barking?

yes. But you have to train the dog to stop barking using a dog whistle first. I don't know how to do that as I'm not a proffesinal dog trainer.