This post will be an ongoing one. I’m on a quest to filter audio from the command line. Although Audacity is fantastic, it is absolutely killing me. Some good searching on the internet helped me to arrive at a conclusion.
The dilemma with using Audacity is that one must use the interface. I had hoped to find a command line tool so I could write a Bash shell script in order to automate the process. Slowly and surely it appeared the tool to use is Sox which stands for ‘Sound Exchange’. The question now is how do we use it?
Some good searching showed me the following link:
Notice that the general structure follows this:
In this example, ‘file1.ext1’ is the name of the input file with whatever appropriate audio extension. ‘Options’ are all of the Sox-specific options. Finally, ‘output.ext2’ is the name of the output file with the delegated extension.
In the end, I now have a tool, Sox, which can be controlled from the command line and in shell scripts. It is relatively efficient (seemingly) and seems to be able to handle everything I throw at it.
As I record more and more podcasts for class, this means that I can bundle a week’s worth of lectures into a directory and then use a shell script to process everything in the directory by their record dates (which should be accurately set in the recorder).
Feel free to leave any questions or thoughts below in the ‘comments’ section!