0
$\begingroup$

I have two "sources" of audio:

  • record WAV audio files (44.1kHz, 16bit, stereo) with Linux arecord and convert them with LameMP3Encoder to MP3 files (44.1kHz, 320kbps, 32bit**, CBR)***
  • record MP3 audio files (44.1kHz, 320kbps, 16bit, CBR) directly* using Darkice and LameMP3Encoder

No I need to calculate MFCCs of the same section in both sources. As I was told here, it is important for MFCCs to keep the same format throughout my workflow. Will the coefficients come out different for the two cases? And if so, how could I solve my issue?

*whatever Darkice is doing in the background
**I think this could be changed to 16bit if needed
***Does it change the WAV files when I open them with Adobe Audition don't modify anything but click 'Save As' and keep the format the same?

$\endgroup$
  • $\begingroup$ Can you clarify what your question is, and what do you mean by "slightly"? I think it's fairly obvious that the two methods do not produce identical results. $\endgroup$ – MBaz Apr 6 '15 at 15:10
  • $\begingroup$ I edited my question. Let me try to describe my task: I need to classify cars and trucks by their sound. I have 2 microphones incl. sound cards and a RaspberryPi. With these components I did some test recording where I used the arecord command in Linux to record to .wav files. Then I went through these files and looked for cars and trucks and wrote down the exact timing information. With a little Java code I extracted 4 seconds around the known centers to single .wav files. No I have 75 .wav files each with a different car in it and 75 .wav files each with a different truck in it. $\endgroup$ – msc Apr 6 '15 at 15:49
  • $\begingroup$ I needed to merge these files in order to have one large file containing all vehicles. Then I used Adobe Audition to insert about 3 seconds of silence (I just took some from the original recordings) between each vehicle. I saved it as .wav file again. Since I have to stream in mp3 later on, I used the LameXP tool to convert the .wav file with all vehicles into a mp3 file. This file then gets streamed via VLC and Icecast2. The stream is received in Java and handed on to R, where I detect the vehicles and save the samples for each vehicle (4s-> 132300 samples per vehicle) to separate text files. $\endgroup$ – msc Apr 6 '15 at 15:50
  • $\begingroup$ After all vehicles were streamed and saved I read the text files with R again and calculate my features (MFCCs, SRP, ZCR). The dataframe conaining all features and the vehicle class is used to train a SVM classifier. When this is done I replace the part where the samples are written to files with a classification step using my trained SVM. I also set up the RaspberryPi to stream mp3 directly to my Laptop (with Darkice and Icecast2) instead of using VLC and Icecast2 on the Laptop. And now I need to know if this works regarding the audio formatting? $\endgroup$ – msc Apr 6 '15 at 15:50
  • $\begingroup$ Looking at stmllr.net/blog/… under the section 'Configuring Darkice' it seems that Darkice is recording as wav/pcm and converts to mp3 (using lame) before streaming to Icecast. Did I get this correctly? $\endgroup$ – msc Apr 6 '15 at 17:23

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.