Ignore the barking. If you believe your dog is barking to get your attention, ignore them for as long as it takes them to stop. Don't talk to them, don't touch them, don't even look at them; your attention only rewards them for being noisy. When they finally quiet, even to take a breath, reward them with a treat.