This paper solves the stochastic realization problem for a discrete-time stationary process with an exogenous input. The oblique projection of the future outputs on the space of the past observations along the space of the future inputs is factorized as a product of the extended observability matrix and the state vector. The state vector is chosen by using the canonical correlation analysis (CCA) of past and future conditioned on the future inputs. We then derive the state equations of the optimal predictor of the future outputs in terms of the state vector and the future inputs. These equations lead to a forward innovation model for the output process in the presence of exogenous inputs. The basic step of the realization procedure is a fac...