In this paper, we consider a bivariate process (Xt, Yt) t∈Z which, conditionally on a signal (Wt) t∈Z , is a hidden Markov model whose transition and emission kernels depend on (Wt) t∈Z. The resulting process (Xt, Yt, Wt) t∈Z is referred to as an input-output hidden Markov model or hidden Markov model with external signals. We prove that this model is identifiable and that the associated maximum likelihood estimator is consistent. Introducing an Expectation Maximization-based algorithm, we train and evaluate the performance of this model in several frameworks. In addition to learning dependencies between (Xt, Yt) t∈Z and (Wt) t∈Z , our approach based on hidden Markov models with external signals also outperforms state-of-the-art algorithms on real-world fashion sequences.