Music genre recognition is one of the main problems in infotainment tools and music streaming service providers for different tasks such as music selection, classification, recommendation, and personal list creation. Automatic genre recognition systems can be useful for different music-based systems, especially different music platforms. Therefore, this study aimed to classify music genres using machine learning. In this context, GTZAN dataset consisting of 10 classes was used. In this dataset, data augmentation was applied by segmentation. Each record of 30 seconds was divided into 10 parts, increasing the number of samples in the dataset by a factor of 10. Then, features were extracted from the audio signals. The resulting features are chroma, harmony, mel frequency cepstral coefficients, perceptr, root mean square, roll-off, spectral centroid, tempo, and zero crossing rate. The types, variances, and averages of the obtained features were used. Thus, 57 features were obtained. This feature set was pre-processed by delimiting the decimal part, standardization, and label encoding. In the last step, classification was made with different machine learning methods and the results were compared. As a result of hyperparameter optimization in the Extra Tree model, 92.3% performance was achieved. Precision recall and f-score values are 92.4%, 92.3%, and 92.3%, respectively. As a result, an efficient and high-performance model in music genre recognition was created.