Rule reminder
Object pronouns attach to the END of the gerund: parlare + gli = parlandogli; guardare + la = guardandola.
'Speaking to her, I realized the truth.' Choose correctly.