Guardsman Lee Wheeler, 29, said: "I was talking to her about the baby, of course.
"I asked her, 'Do you know if it's a girl or boy', and she said, 'Not yet'.
"She said, 'I'd like to have a boy and William would like a girl'. That's always the way.
"I asked her if she had any names yet and she said no.
"I said I suppose you've got to stick to traditional names."
Wheeler said the duchess told him the couple had not settled on names for the baby, who will be third in line to the British throne.
The duchess wore a green dress coat and a shamrock lapel pin as she presented sprigs of shamrock to soldiers in the annual ceremony at a barracks in Aldershot, southern England.
She also pinned a spring on the collar of the regiment's mascot, an Irish wolfhound named Domhnall.
Kate suffered a minor mishap when one of her high heels became briefly stuck in a drainage grille. The duchess leaned on her husband as she wrenched it loose.
The royal St Patrick's Day tradition was started by Queen Alexandra, the wife of King Edward VII, in 1901.
- PA with AP