Abstract The potential benefits of using compound semiconductors for X-ray and gamma ray spectroscopy are already well known. Radiation detectors based on high atomic number and wide band gap compound semiconductors show high detection efficiency and good spectroscopic performance even at room temperature. Despite these appealing properties, incomplete charge collection is a critical issue. Generally, incomplete charge collection, mainly due to the poor transport properties of the holes, produces energy resolution worsening and the well known hole tailing in the measured spectra. In this work, we present a digital pulse processing (DPP) system for high resolution spectroscopy with compound semiconductor radiation detectors. The DPP method, implemented on a PC platform, performs a height and shape analysis of the detector pulses (preamplifier output pulses), digitized by a 14-bit, 100 MHz ADC. Fast and slow shaping, automatic pole-zero adjustment, baseline restoration and pile-up rejection allow precise pulse height measurements both at low and high counting rate environments. Pulse shape analysis techniques (pulse shape discrimination, linear and nonlinear pulse shape corrections) to compensate for incomplete charge collection were also implemented. The results of spectroscopic measurements on a planar CdTe detector show the high potentialities of the system, obtaining low tailing in the measured spectra and energy resolution quite close to the theoretical limit. High-rate measurements (up to 820 kcps) exhibit the excellent performance of the pulse height analysis and the benefits of pulse shape techniques for peak pile-up reduction in the measured spectra. This work was carried out in the framework of the development of portable X-ray spectrometers for both laboratory research and medical applications.