WORCESTER — A former Barre man was sentenced to 10 to 12 years in state prison Tuesday in Worcester Superior Court after admitting to raping two teenage girls. “I wanted to tell you what my life was like before I met you,” one of the girls told 49-year-old William R. Ahearn before his sentence was imposed. “I was happy.” Ahearn, formerly of Wauwinet Road, pleaded guilty to five charges of child rape aggravated by 10-year age difference Tuesday, along with several other charges. In a statement of facts Ahearn did not contest Tuesday, Assistant District Attorney Lambrini Pashou said Ahearn, who lived in a trailer near one of the girls’ homes, solicited them through texts to have sex.