Skip to main content

Notice

Please note that most of the software linked on this forum is likely to be safe to use. If you are unsure, feel free to ask in the relevant topics, or send a private message to an administrator or moderator. To help curb the problems of false positives, or in the event that you do find actual malware, you can contribute through the article linked here.
Topic: WAV Sample Size & Rate - Detection & Resampling (Read 2407 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

WAV Sample Size & Rate - Detection & Resampling

I run a music label group and we're developing a site where our label managers can upload their master recordings. We deal with WAV files--I know, not the ideal format.

The issue I have is that we need all our WAVs to be 44.100khz/16Bit-- and sometimes the artists don't send the right type. We're going to have our site try to detect the sample size & sample rate, and if its not correct, re-sample the WAV.

Does anyone have any suggestions for a *nix command line app that can do this? We currently use LAME to encode all our WAVs to mp3, but it looks like the -decode option there is only for decoding an MP3->WAV, not a WAV->WAV.

Any leads would be appreciated, thanks!

WAV Sample Size & Rate - Detection & Resampling

Reply #1
There are several: SoX, SSRC & sndfile-resample spring to mind.  SoX (and I think sndfile-resample) comes with a utility to query the existing bit depth and sample rate which you could use in a script.
If you're reducing bit-depth, you also need to dither/noise-shape; both SoX and SSRC support this.

  -bandpass

 

WAV Sample Size & Rate - Detection & Resampling

Reply #2
Thank you bandpass, that is extremely helpful. I really appreciate your expertise. I will look into these next week as we tackle the problem.