This paper presents algorithms for overcoming a common problem of gamma-ray spectroscopy, namely the peak pileup recovery problem. Three different approaches are studied and evaluated within a spectroscopy system. The first approach is a direct search based on Nelder-Mead technique without any derivatives in order to find the local minimum points. A Gaussian shape in conjunction with the peak height and its position of each pulse are used to construct the pulse. Hence, the main pulse parameters such as peak amplitude, position and width can be determined. The second algorithm is based on the nonlinear least square method. In this paper another technique is tried. This technique which is proposed as third algorithm is based on a maximum peak search method combined with the first derivative method to determine peak position of each pulse. Comparison among these approaches is conducted in terms of parameters errors and execution time. This comparison based on a reference signal from 137 Cs point source acquired by data acquisition system. The third approach shows the best accuracy, for determining accurate energy spectrum. Therefore, it provides better isotope identification than other algorithms.