James Green, 35, also pleaded guilty to struggling violently with police officers during an incident in Wood Street in Galashiels on December 18, 2018.
Not-guilty pleas to four other charges were accepted by the crown.
Fiona Hamilton, prosecuting, told Selkirk Sheriff Court that Green was stopped by the officers as they had noticed he was unsteady on his feet.
She said: “Initially he tried to walk away, but then he started shouting and swearing and expressing his dislike for the police.
“He started to assault the female constable by punching her three times to the face.
“Her male colleague attempted to restrain the accused.”
The fiscal said that the female officer then fell to the ground and her male colleague pressed the emergency button on his terminal to request support.
He also produced an incapacitant spray and deployed it, hitting the accused in the eyes, and Green, of Winston Road in Galashiels, was then restrained and handcuffed.
Ms Hamilton said the female police officer sustained injuries including cuts, bruising, swelling and soft tissue damage to her hand, as well as bruising to her cheek and forehead.
The case will recall at Selkirk Sheriff Court on June 15.