A theoretical model of line shape function and its impact on the measured results is presented, which is based on direct absorption and wavelength modulation spectroscopy (WMS) for gas concentration detection under different pressures. Methods of linear fitting and result modification have been illustrated and compared. A new testing system with the result modification method used for water vapor concentration detection under different pressures between 1 and 7 atm is applied. With an additional pressure sensor placed in the gas cell and calibration performed, relationships between the amplitude of the second harmonic and concentration of the target gas under different pressures can be obtained.