A broadband spectroscopy method is proposed to measure the ultrasonic wave phase velocity of Z-cut quartz under high pressure up to 4.7 GPa. The sample is in a hydrostatic circumstance under high pressure, and we can get longitudinal wave and shear wave signals simultaneously in our work. By fast Fourier transform of received signals, the spectrum and phase of the received signals could be obtained. After unwrapping the phase of the received signals, the travel time of ultrasonic wave in the sample could be obtained, and the ultrasonic wave phase velocity could also be resolved after data processing. The elastic constant of measurement under high pressure is also compared with previous studies. This broadband spectroscopy method is a valid method to get ultrasonic wave travel parameters, and it could be applied for elasticity study of materials under high pressure.