This paper proposes a hyper-Erlang software reliability model (HErSRM) in the framework of non-homogeneous Poisson process (NHPP) modeling. The proposed HErSRM is a generalized model which contains some existing NHPP-based SRMs like Goel-Okumoto SRM and Delayed S-shaped SRM, and can represent a variety of software fault-detection patterns. Such characteristics are useful to solve the model selection problem arising in the practical use of NHPP-based SRMs. More precisely, we discuss the statistical inference of HErSRM based on the EM (expectation-maximization) algorithm. In numerical experiments, we show that the HErSRM outperforms conventional NHPP-based SRMs with respect to fitting ability.