Nevertheless, a question arises: Dog barking is what makes a dog unique and it would be unnatural to prevent dog barking with tools such as dog barking collars as the dog would then be experiencing a strong sense of "guilt" for barking.
A very simple method consists in determining why your dog is barking. Very often your dog is craving for attention and barking is giving him what he wants: your dog is used to getting attention without earning it.
Your dog needs to understand that barking for attention does not work, barking does not get results -no matter what the result is- and barking does not necessarily imply yelling from you...
Here is an example: when you leave home in the morning do not act as if it was a big deal. If you do, your dog will base his conduct on yours and will have an exaggerated reaction when you get back. However, if you ignore him in the morning you will see that his reaction when you get back will be much more controlled: your absence was not a big deal after all. Keep in mind that your dog will always indirectly mirror your reaction.
Likewise when your dog barks do not scream or shout at him: that would give him the reaction he has been craving for. Screaming from your part indirectly equals attention so your dog will read your anger as a form of attention: do not fall into that trap.
If you don't give his barking any attention the barking will diminish as your dog will see it as being useless. It is a strategic game: do not let your dog have the upper hand on you.
Now, dogs are awesome animals don't get me wrong. However you need to clarify the rules right from the start so that your dog can respect and obey you. Stopping your dog from barking can be achieved in many different ways but if you apply these techniques you will be successful.
One big thing is important: You need to ignore your dog when he barks and find other methods to assert your authority.
Now if you really want to stop your dog from barking, maybe you could contemplate the idea of getting a Basenji dog...