Barking is an attention seeking behavior (at least in this case).
An attention seeking behavior is rewarded and encouraged by interacting with your dog in any way. Sure you may be yelling at him, holding his mouth shut or spraying him with water, but he is still getting what he wants. Your attention, good or bad.
In order to stop a behavior like this we have to remove what the dog wants when hes doing what we dislike, and give him what he wants when hes doing what WE want. in this case you will ignore him completely when he barks, going so far as to leave the room and shut a door between yourself and him. And give him your attention whenever hes being quiet, becaus eyou want him to be quiet not bark.
I m not kidding when I say reward him ANYTIME he s being quiet. If he looks at you and doesn t bark reward! If he s walking toward you and isn t barking reward! If he s drinking water and not barking reward!
Look at it this way,
Kids draw on walls because kids like to draw. If you yell at the kid, take away his markers and order him to scrub the wall... He s still going to draw on it again as soon as possible, because he enjoys drawing. BUT if you make him scrub the wall and then give him a stack of paper, and make a HUGE deal over his drawing on the paper... He s going to want to draw on the paper not the wall.
I would recommend buying a training aid, your going to want something to startle him out of the behavior, so that he ll be quiet for a second and you can reward him for being quiet.
A pet corrector from Petco.com
A sonic remote
A dog whistle
Clapping your hands
Stomping your feet and shouting!
Really any loud startling noise that will make him go "Oh! What?" The timing here is key, you make the noise, he shuts up even for just a second and you reward him! There by reinforcing that its being quiet that gets your attention not the barking.
Rewards can be anything from a small stinky treat, to a play session, to petting, to just a "Good boy!"