Coughing, a prevalent symptom of many illnesses, including COVID-19, has led researchers to explore the potential of cough sound signals for cost-effective disease diagnosis. Traditional diagnostic methods, which can be expensive and require specialized personnel, contrast with the more accessible smartphone analysis of coughs. Typically, coughs are classified as wet or dry based on their phase duration. However, the utilization of acoustic analysis for diagnostic purposes is not widespread. Our study examined cough sounds from 1183 COVID-19-positive patients and compared them with 341 non-COVID-19 cough samples, as well as analyzing distinctions between pneumonia and asthma-related coughs. After rigorous optimization across frequency ranges, specific frequency bands were found to correlate with each respiratory ailment. Statistical separability tests validated these findings, and machine learning algorithms, including linear discriminant analysis and k-nearest neighbors classifiers, were employed to confirm the presence of distinct frequency bands in the cough signal power spectrum associated with particular diseases. The identification of these acoustic signatures in cough sounds holds the potential to transform the classification and diagnosis of respiratory diseases, offering an affordable and widely accessible healthcare tool.