Well, train and train more. Also, I would recommend you to visit a vet. Frequent and incoherent barking can show that a dog has a problem. After all, it's better to be safe than sorry, isn't it? If everything is ok with the dog and training doesn't help then you should read about the best dog barking deterrent
right here. There is a decent article about this accessory and there are lots of reviews and comparisons. Interesting thing but I haven't ever used it before.