There is a William Smith born c1784 in Tannadice (I think), Forfar. He was enrolled into the 6th Royal Veterans Battalion at Inverness on 25 Dec 1819 & served until 27 May 1820, but before that he had been with the 71st Regiment for 3 years & 60 days (dates not given).
Dates etc would seem to fit, but this William was only a private in the 6th, and appears to have signed his name whereas 'your' William signed X at marriage.
The only other information, other than a description, is that he was a labourer, and written on the back is Brechin, Forfar, along with what looks like Apd 28 May 1820. Ent Admd 7 Feb 1811. No idea what that all means!
You don't say where their children were born, so I haven't been able to look at the 1820 baptism.