Teaching your dog to speak may sound nonsensical, but to stop your dog from barking, first, teach him to bark on command. Give your dog the command to speak.
Have someone immediately make a noise, such as knocking on a door. This is sure to make your dog bark. Let him bark two or three times. Then stick a tasty treat in front of his nose. When he stops barking to sniff the treat, praise him, and give him the treat. Repeat until he starts barking as soon as you say speak. Once your dog can reliably bark on command, move on to the quiet command.
Teach dog that barking is OK until told to be quiet. Simultaneously, hold a treat in front of your dog’s nose. Most dogs get quiet immediately because they can’t sniff and lick the treat while barking at the same time. Praise your dog continuously during his quiet time with petting and words of encouragement. When your dog makes a mistake and barks, and he will, reprimand him immediately. Never strike your dog, but do something that will catch his attention, such as clapping loudly. As soon as your dog starts barking, you must instantly reward him. If you are still having trouble, then you may need to spend some time working with your dog on specific barking situations.
Here are a few of the more common ones. If your dog is in his crate or confined to a room behind a baby gate or other barrier, he may bark because he wants to be with you. But if that’s not always possible, then you’ll need to train him to stay quiet. Next time he’s barking uncontrollably in his more confined space, try this. Start by turning your back and ignoring him. Whenever he stops barking, turn and praise him. Give him a treat and make a game of it. As he catches on that being quiet gets him a treat, lengthen the amount of time that he must remain quiet before being rewarded.
Dogs that are afraid of other dogs will often bark at them. Have a friend with a dog stand out of sight, far enough away that you know your dog won’t bark at the other dog. As soon as the friend and dog come into view, start feeding your dog lots of treats. Keep feeding until the friend and her dog are out of sight. Ask your friend and her dog to gradually walk closer. Do not try to progress too quickly. It may take days or weeks before your dog can pay attention to you and the treats without barking at the other dog.