# Which parameters should I take care of while converting .au to .wav for Genre Classification

I am learning to develop Music Genre Classification models. I have a dataset in which files are in ".au" format, which I need to convert into ".wav". I used SoX (Sound eXchange) to convert it. With a simple:

sox input.au input.wav

the files are converted smoothly. Which parameters can be lost doing this, which can affect the accuracy of my model?

• What information does SoX show for the .au and the generated .wav files? Try sox --i <filename>. – Olli Niemitalo Oct 16 '16 at 11:22
• Input File : 'blues.00000.au' Channels : 1 Sample Rate : 22050 Precision : 16-bit Duration : 00:00:30.01 = 661794 samples ~ 2251 CDDA sectors File Size : 1.32M Bit Rate : 353k Sample Encoding: 16-bit Signed Integer PCM Comment : 'blues.00000.wav' – sandepp Oct 16 '16 at 11:27
• And the wav file? – Olli Niemitalo Oct 16 '16 at 11:34
• Input File : 'blues.00000.wav' Channels : 1 Sample Rate : 22050 Precision : 16-bit Duration : 00:00:30.01 = 661794 samples ~ 2251 CDDA sectors File Size : 1.32M Bit Rate : 353k Sample Encoding: 16-bit Signed Integer PCM – sandepp Oct 16 '16 at 11:36

• With python numpy, one could verify if the file is compressed is by reading the raw data and plotting or listening. You can read the .au file as a binary via data = numpy.fromfile('myfile.au',np.int8) and plot the raw data. – panthyon Mar 17 '17 at 4:20
For example µ-law encoding at the same sampling frequency would be indicated by SoX as Precision: 14-bit, Bit Rate: 176k, Sample Encoding: 8-bit u-law. Now both the .au file and the .wav file have identical encoding so assuming SoX does nothing patently stupid, the audio data will be identical. If the .au file has metadata in the annotation field, it will be lost as it is not copied by SoX into the .wav file.