This happened to me too! Scottie was the most perfect angel from when I got him to about 7 months. Then he discovered his voice and wouldn't stop barking! It was totally out of control.
Here's a YT post, which I found super helpful, that teaches a training technique of letting them bark 3 times as a warning, giving the "that's enough" command, and then "quiet" command:
http://www.yorkietalk.com/forums/gen...h-barking.html It's not that easy to train, but for me it was necessary to pursue. Eventually after a LOT of barking headaches, using a water bottle to spray him when he was barking, and giving him a treat each time he stopped, Scottie eventually learned it around 1 years old. Though, I'm not 100% sure if it was the training efforts or because he became older or a combination of the two.
There are several training techniques of giving the command for "speak" and "quiet" too. Basically you need to teach them how to bark on command in order to be quiet on demand. I tried teaching "speak" but wasn't quite as successful.
Others have also recommended a product called "stop that", which I never tried. It's some kind of citrus spray.