Questions tagged [sox]

SoX (Sound eXchange) is a computer program for audio manipulation. Questions about interactive use of the command line tool should be asked on Super User.

Sound eXchange, abbreviated SoX, is a free cross-platform digital audio editor, licensed under the GNU General Public License.

It can read and write many audio formats, including AU, WAV, AIFF, MP3 (via an external LAME MP3 encoder), Ogg Vorbis and FLAC. Some random features :

  • Editing via concatenate, trim, pad, repeat, reverse, volume, fade, splice, normalise
  • Recording and playing audio (on many systems); playing via URL (internet file or stream)
  • Processing via chorus, flanger, echo, phaser, compressor, delay, filter (high-pass, low-pass, shelving, etc.)
  • Adjustment of speed (pitch and tempo), pitch (without tempo), tempo (without pitch), and sample-rate
  • Noise removal using frequency profiling
  • Silent passage removal
  • Multi-file merging, multi-file and multi-track mixing.
563 questions
0
votes
1 answer

Need to merge multiple pairs of audio files with sox in BASH

I need to merge 400 pairs of audio files into 400 output files. The pairs are in one folder with names like this: 001-filename-beg.mp3, 001-filename-end.mp3, 002-filename-beg.mp3, 002-filename-end.mp3, etc. The second file in each pair should…
0
votes
2 answers

How to merge all WAV files appearing on the same line in a list?

I have a plain text file containing a list of WAV files: 0001.wav 0002.wav 0003.wav 0004.wav 0005.wav 0006.wav 00007.wav 0008.wav 0009.wav 0010.wav 0011.wav 0012.wav 0013.wav 0014.wav 0015.wav These same files are in the same folder as the plain…
Village
  • 22,513
  • 46
  • 122
  • 163
0
votes
1 answer

BASH: Crop, split channels, and fade out batch of .AIFFs with sox

I have a set of stereo .AIFF piano samples from http://theremin.music.uiowa.edu/MISpiano.html Each sample is preceded by ~5 sec silence, and fades into ~30 seconds of silence; i.e. it continues well below the threshold of my hearing. I wish to trim…
P i
  • 29,020
  • 36
  • 159
  • 267
0
votes
1 answer

sox merge two files of different length

I have two audio files A of length X and other B of length Y (X > Y). Now I want to replace the last Y part of file A with the file B. For e.g. file A is of length 60s and file B is of length 43s. I need to replace the last 43s of file A with file…
Trum
  • 71
  • 1
  • 9
0
votes
1 answer

Sox absolute paths and piping

I have a question about using Sox. I need to mix many audio files and every file has it's own specific time when it should be added. I'm using piping and everything goes fine until I need to grab files with absolute paths with spaces in folder…
Art
  • 831
  • 3
  • 8
  • 26
0
votes
0 answers

Appending audio files with different channel counts using sox

I've been trying to prepend an audio mp3 file to a recorded mp3. The recorded mp3 is mono channel (having 1 channel as I made it record). I want the user of my app to select any audio file say mp3 and prepend that to my recorded file. The selected…
bir433
  • 61
  • 5
0
votes
1 answer

SoX (Sound eXchange) Dying on some MP3 Files

I've been using sox from the command line to run an audio conversion web tool. It's working pretty well. I compiled it with MP3 support (which does work) and have also installed ffmpeg to handle m4a files. My problem is that some mp3's, which come…
JRL
  • 840
  • 6
  • 18
0
votes
2 answers

How to change the samples rates when do the format conversion by sox C libraries?

I am trying the format conversion between two audio files using the sox libraries. I can convert one to another with no parameters changing by the API provided by the library.Just like the process by executing the command: sox a.wav b.ul And now…
gold_luck
  • 49
  • 8
0
votes
1 answer

change wav, aiff or mov audio sample rate of MOV or WAV WITHOUT changing number of samples

I need a very precise way to speed up audio. I am preparing films for OpenDCP, an open-source tool to make Digital Cinema Packages, for screening in theaters. My source files are usually quicktime MOV files at 23.976fps with 48.000kHz…
0
votes
1 answer

How to concatenate SoX commands?

I have this two commands in SoX: rec -V3 output.wav trim 0 50 sox output.wav out.wav trim 0 10 : newfile : restart I need to do this work but in only one command line. I need the recorded file "output.wav" to be trimmed into several files of…
EzeEst
  • 117
  • 1
  • 11
0
votes
1 answer

Remove excess samples/sound in a mp3 file

Ive been using SoX to trim files to be exactly 2 seconds long, but ive noticed that audio files always have an extra 32 milliseconds or so on the end, apparently its extra data to tell a different decoder its information, but does it have to add on…
heath sargent
  • 213
  • 1
  • 3
  • 7
0
votes
1 answer

libsox split multichannel wav to mono channels

I want to split a Multichannel (2,8 or 16) wav file into its channels and save every channel in another wav-File. So far I've accomplished to get libsox up and running in my c++, objective c++ project. Libsox isnt well documented and there aren many…
hmrc87
  • 352
  • 1
  • 4
  • 12
0
votes
1 answer

SOX producing "poping" or "crackling" noise after padding operation

I'm trying to pad the beginning of a .wav file with silence using the following command sox infile.wav padded.wav pad 14 0 However, at second 14 (where the silence padding ends), there's a very egregious popping noise not found in the original…
Brandon
  • 975
  • 1
  • 8
  • 19
0
votes
3 answers

How to return a character set after matching a specific string in a regular expression

I'm actually using using a command line tool called sox to retrieve information about an audio file. This returns the following output: Samples read: 449718 Length (seconds): 28.107375 Scaled by: 2147483647.0 Maximum…
Sam Leicester
  • 109
  • 10
0
votes
1 answer

What is the fastest way to combine audio files on a web server?

Disclaimer: Forgive my ignorance of audio/sound processing, my background is web and mobile development and this is a bespoke requirement for one of my clients! I have a requirement to concatenate 4 audio files, with a background track playing…
Jay
  • 156
  • 6