This tip is based on research regarding dogs and music. If you are going to be away for a long period of time, you may want to consider treating your dog to classical music. Choose classical pieces that are about 50-60 bpm. This can have a soothing effect, causing the dog less anxiety (and less barking).
Here are some albums you may want to try: