Robots learn to mirror human emotions in real time