Decide on a command word. Opt for a word that's natural and cozy for you to use. Common decisions are "hush," "enough," and “quiet."
When your dog barks, get his attention. Use a clap, whistle or another temporary sound.
After he has stopped barking, provide the command in a very firm however cheerful tone, and provides him a dog treat. Practice 1-2 times on a daily basis till he has down his new ability.