Photothermal spectroscopy has found a wide range of applications as a method of monitoring thermal, optical and recombination parameters of semiconductors. We consider microphone detection, widely used in photoacoustic spectroscopy, and piezoelectric detection. Both methods require knowledge of the temperature distribution in the sample and in its surroundings, the support surface and gas. For the microphone signal, we simulated the temperature at one of the sample surfaces; for the piezoelectric signal, we simulated the spatial temperature distribution orthogonal to the sample surface. We modeled an idealized semiconducting sample and one with surface defects. We found that the amplitude and phase spectra vary between the methods, enabling determination of optical and thermal parameters.