In order to smoothly perform interactions between a humanoid robot and a human, knowledge about the human locomotion can be efficiently used. Indeed, in a human-robot collaboration, a prediction model of the human behaviour allows the robot to act proactively. In this paper, an optimal control based model predicting the human Center of Mass (CoM) trajectory during gait is presented. A Walking Pattern Generator (WPG) based on non-linear model predictive control is, then, introduced in order to generate the robot CoM and footsteps along the predicted trajectory. The combination of the human trajectory prediction model and this new WPG aims to allow the robot to proactively walk along with a human instead of passively follow him. These models have been tested in simulation on Gazebo on a TALOS humanoid robot model using measured human trajectories. To perform the CoM and foot trajectories computed by the WPG, a real-time whole-body controller is used. This controller is a Quadratic Program which solves the inverse dynamics of the robot at torque level.