The number spectrum of nonequilibrium neutrinos resulting from neutron star matter deviation from beta equilibrium is calculated. For this purpose, the chemical potential gap ($\ensuremath{\delta}\ensuremath{\mu}$) in a typical density change and in the high degeneracy regime (${k}_{B}T\ensuremath{\le}0.1\phantom{\rule{0.28em}{0ex}}\text{MeV}$) is estimated. This is done under the application of realistic descriptions of nuclear matter and the assumption of the presence of free hyperons (${\mathrm{\ensuremath{\Sigma}}}^{\ensuremath{-}}, {\mathrm{\ensuremath{\Lambda}}}^{0}$) in the neutron star core. Realistic nuclear interactions are taken into account by a microscopic many-body approach---the lowest order constrained variational (LOCV) method---for asymmetric nuclear matter. We find that addition of a three-body force interaction leads to a dramatic change in the trend of the symmetry energy at high densities and consequently the change in the sign of $\ensuremath{\delta}\ensuremath{\mu}$. This, as a result, changes the dominant flavor of the nonequilibrium neutrinos. By accounting for the hyperons' presence, we see that apart from the sign change of $\ensuremath{\delta}\ensuremath{\mu}$ its value can change noticeably. In hypernuclear matter, the effect of particle fractions is also very important. We have also investigated the effect of deviation from beta equilibrium on the dynamic part of the number spectra of nonequilibrium neutrinos produced in the neutron branch of the modified Urca process. It is shown that this part of the number spectra is not affected significantly by the nonequilibrium process and can be replaced by its equilibrium value.