On telling Lewis he was under arrest, Mr Brooks said Lewis ``squared off in front of me'', and his posture became aggressive.
Mr Brooks got his pepper spray out, at which point Lewis darted into the lounge area where his girlfriend was holding onto the child.
There was a gap of three-to-four metres between himself and the woman and child, Mr Brooks said.
Following Lewis into the lounge, Mr Brooks said he sprayed at Lewis but did not think it had worked. He sprayed again as Lewis ran in behind the woman and child, but ``stopped when he reached them - the spray carried on a bit''.
At that point, the baby started screaming and the couple began abusing him, and shut the door on him.
He went outside then came back in, but by the time he reached the lounge, Lewis had escaped out a window, Mr Brooks said.
He chased Lewis down the street aiming his taser at him, and a little way down the road Lewis stopped, lay down on the road and was arrested.
The baby was treated at the scene, and then taken to hospital.
Judge Bridget Mackintosh said she could not see how these actions could be connected to an assault on the woman and child, for which there was one charge each.
"The police allege the assault was an indirect application of force by using the woman and child as a shield.
"It's too remote - there is not the required connection ... the two charges are dismissed.''
Lewis had earlier pleaded guilty to two further charges relating to the incident - one of resisting arrest, and another of escaping police custody.
He had also pleaded guilty to a charge of breaching a four month home detention sentence imposed in October last year.
He had already served two months of that sentence, which Judge Mackintosh cancelled and re-imposed a total seven month sentence on all matters.
He will be released on July 20.