We calculate the plasma oscillation spectrum in high-electron-mobility transistors (HEMTs) with recessed gate having the highly doped caps adjacent to the source and drain contacts and the windows between the caps and the gate. The resonant plasma frequencies are found as functions of the lengths of the gate, cap, and window regions, the electron concentration in the transistor channel, and the gate voltage. We demonstrate that the effect of cap region can result in a significant reduction of the resonant frequencies in comparison with those calculated for simplified HEMT model. This can provide a plausible explanation of the data obtained in recent experimental studies of the detection of terahertz radiation in and its emission from HEMTs.