In this study an algorithm, based on artificial neural networks (ANNs), for classifying four different varieties of Iranian pistachio nuts, Kaleghouchi (Ka), Akbari (Ak), Badami (Ba) and Ahmadagaee (Ah) is presented. To develop the ANN models a total of 3200 pistachio sound signals, 800 samples for each variety, were recorded. Features of pistachio nut varieties were extracted from analysis of sound signal in both time and frequency domains by means of fast fourier transform (FPT), power spectral density (PSD) and principal component analysis (PCA) methods. Altogether forty features were selected as input vector to ANN models. Network output vector consisted of four neurons for classification of varieties. In developing the ANN models, several ANN architectures, each having different numbers of neurons in hidden layer, were evaluated. The optimal model was selected after several evaluations based on minimizing the mean square error (MSE), correct separation rate (CSR), and correlation coefficient (r). Selected ANN for classification was of 40-12-4 configuration. CSR of the proposed ANN model for four pistachio varieties, Ka, Ak, Ba, and. Ab were 96.97%, 97.64%, 96.36%, and 99.10%, respectively. Net weight average of system accuracy was found to be 97.51 %.