In order to solve the problem that the precision and robust of basic cross-correlation(BCC) method in time delay estimation is poor, an improved time delay estimation algorithm based on generalized cross correlation is put forward and simulated to study the performance of the algorithms from the aspects of anti — noise and anti — reverberation robustness. Then, combined with the microphone array structure, sound source localization based on time delay estimation is achieved. The simulation results show the improved method has high accuracy and small computation of the source location in the case of noise and reverberation, which can be used for sound source localization.