4

I have a few hundred audio files of spoken lectures. I need a piece of software I can call from the command line to process the audio in various ways e.g. changing format, normalising, etc.

So far I have tried to batch process files using Audacity using a chain as detailed in this video. However, this is not satisfactory as I can't call this from command line (and therefore batch process files in a flexible way adapting to size/filetype etc.).

Are you able to point towards any software that can do this kind of audio processing from the command line?

James Owers
  • 7,948
  • 10
  • 55
  • 71
  • 1
    Does it have to be in Audacity? There is something called SOX which, I believe can be good for your purpose here. You could put it into a bash script and from the output of the SOX command, decide what to do with it. (http://sox.10957.n7.nabble.com/audio-file-information-td1246.html) – Phorce Mar 17 '15 at 13:55
  • Doesn't have to be Audacity at all. Can SOX do the compression or is it just used to detect properties of the audio file? I'm looking for a program to do the compression via the command line (I have failed to get Audacity to do this). – James Owers Mar 17 '15 at 15:24
  • 2
    Yes - See http://sox.sourceforge.net/sox.html – Phorce Mar 17 '15 at 15:29
  • @Phorce This question has an overly broad and "give me teh codez" flair to it. But it's just me. Furthermore, the actual question in the post (*Are you able to point towards any software that can do this kind of audio processing from the command line?*) is a recommendation request. Those are off-topic and recommendation questions will be closed. (I haven't downvoted, but I voted to close) – Artjom B. Mar 17 '15 at 17:24
  • @Artjom B. is there a way I can better "describe the problem and what has been done so far to solve it"? – James Owers Mar 18 '15 at 07:11
  • @ArtjomB., does the phrase "Are you able to point towards any software..." make this question "off topic"? If I were to remove this line, would the question fit the brief? – James Owers Mar 18 '15 at 09:38
  • @kungfujam Yes, that would make it on-topic, but what is the question your would replace it with? It would probably still be closed as either *too broad* or *unclear what you're asking*. There is [softwarerecs.se] where this type of question might be on-topic. – Artjom B. Mar 18 '15 at 10:08
  • @ArtjomB. Ok, rather than alter the question to be on-topic here, since the question is already answered to my satisfaction, it seems most appropriate to migrate it to the Software Recommendations SE site. Do you have privileges to do this? – James Owers Mar 18 '15 at 10:39
  • @kungfujam No, I don't. Only moderators can do that (visible by the diamond in their name). You could flag your question with the *other* reason and explain that you are the OP and want it migrated. But before you do, 1. please look for duplicates on SoftwareRecs and 2. edit your question to make it clear that you don't actually need a script written, but rather only a software recommendation and the script story is only there to help them understand your requirement. – Artjom B. Mar 18 '15 at 10:58
  • You can use Audacity builtin scripting features https://manual.audacityteam.org/man/scripting.html – Alexei Eleusis Díaz Vera Aug 17 '19 at 21:12

1 Answers1

8

Depending on your requirements, you don't always have the use Audacity.

You can use SOX in order to achieve what you are trying to do in terms of getting the file information of an audio file, as well as carry out compression.

 sox long.mp3 short.mp3 trim 10

For comparison etc..

To expand, you can use a bash script, to iterate through each of the files in a directory and then run the command on each of the files.

Phorce
  • 4,424
  • 13
  • 57
  • 107