The spectral response of a CdZnTe semiconductor detector has been calculated with the EGS4 Code System. The latest low-energy photon production and transport routines developed at KEK, which consider the K and L shell fluorescent photon production in compounds, bound Compton scattering, Doppler broadening, etc., were included in the EGS4 code. The calculations of the CdZnTe detector also took into account the collection efficiency of the produced electron-hole pairs (described by Hecht equation) and the modification on spectral peaks due to both the Fano factor and electronic-noise broadening. The calculated results are compared with measurements made with encapsulated 241 Am and 137 Cs disk sources. It was found that, by trying various mobility-lifetime values for holes, the calculated spectral response still did not have perfect agreement with measurements.