Yes. There's often no difference. However, 'with' can suggest that both parties are talking to each other, while 'to' can suggest that only one party is speaking and the other is listening, eg The teacher is going to talk to Tom because he did not do his homew