@allanc, do you have things like Kong toys?
If so, buy one just to try for now. Fill it up, with anything from their food, a little bit of peanut butter smeared on the inside, to jars of meat paste, to bananas.. Stick it in the freezer, let it go rock hard, then when you want to work, and not your 'allowed' to for want of a better expression give your dog the kong.
This will certainly keep it quiet for a good 20-30 mins.
Some alternatives include.
Fresh frozen pigs trotters.
Frozen dog bones. (We never give our dogs ANY cooked bones. Only fresh. Reason being that the chemical composition alters durIng the cooking process. Yes that even includes fresh chicken carcasses!.
Learn to use a clicker, and do some clicker training. Basically ignore the bad, reward the good.
Dog barks, ignore it. Dogs quiet, click and treat. After a while start putting a cue to the quiet behaviour.
It certainly sounds like your dog is getting bored or anxious. I certainly don't mean this in a derogatory way.
Did you know that just 10 mins of mental training. (Which can include some obedience work, and when that's mastered, start doing some tricks) is the equivalent of a 5 mile walk to your dog.
It seems like barking is your dogs way of releasing this lent up energy.
I know all the above through personal reasons, which I can't go into on a public thread. But feel free to pm me, and I can go into details.
I do dog training (well agility training) of a weekend, when we aren't competing, and these are some of the tricks I use with my dog.
Hope this helps you some.