The research compares the performance of support vector machine (SVM) and random forest algorithms in identifying songs suitable for relaxation in patients with stress problems. The dataset comprises both Thai and international songs categorized into therapy and non-therapy groups. The results demonstrate that the support vector machine achieves an accuracy of 78%, outperforming the random forest with an accuracy of 72%. Precision and F1-score metrics further emphasize the superiority of the support vector machine in classification. Notably, the support vector machine has recall rates of 50% and 100% for therapy and non-therapy classes, respectively, while the random forest has recall from class therapy of 38% and class non-therapy of 100%. The findings suggest that providing individuals with stress issues the opportunity to listen to stress-reducing music can be a viable approach to reducing the need for psychiatric therapy. The support vector machine is a better algorithm than the random forest for classifying songs for relaxation because it is more accurate, precise, and has more even recall rates.