Nobody mentioned the rattling can?
I use an old pop can with 3 or 4 pennies inside. I tape the opening so the change doesn't come out. The first time you use this you want to throw the can in their general direction to scare them (make sure you don't hit them with it). Then every time they bark after that, shake the can to produce a large amount of noise. The dogs will soon learn that whenever they bark, the loud can goes off. I don't even shake mine anymore and my dogs don't yap.
It works.