Questions tagged [sox]

SoX (Sound eXchange) is a computer program for audio manipulation

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.
92 questions
20
votes
1 answer

Remove silence from audio files while leaving gaps

Currently we're using this command within a shell script to remove silence from audio files: ffmpeg -i $INFILE -af silenceremove=0:0:0:-1:1:${NOISE_TOLERANCE}dB -ac 1 $SILENCED_FILE -y This works fine except that it removes all the silence, causing…
Nathan Arthur
  • 303
  • 1
  • 2
  • 7
18
votes
4 answers

End sox recording once silence is detected

I'm writing a script that uses sox to record me talking. Now I need sox to wait until it detects sound before it begins recording, and I do have that figured out. But I also need sox to exit once there has been silence for at least 3 seconds. As it…
Isaac
  • 390
  • 1
  • 2
  • 10
9
votes
1 answer

sox: splitting audio on silence but leaving tails

I love how sox has the ability to split an audio file on silence. The issue I'm haivng is that occasionally my audio tracks end with fadeouts, or notes decaying into reverb (subtle sounds that sox will mistake for silence). I'm trying to adjust the…
pepper
  • 336
  • 1
  • 3
  • 12
9
votes
3 answers

batch convert mp3 files to wav using sox

for a single .mp3, I can convert it to wav using sox ./input/filename.mp3 ./output/filename.wav I tried: #!/bin/bash for i in $(ls *mp3) do sox -t wav $i waves/$(basename $i) done But it throws the following error: sox FAIL formats: can't…
kRazzy R
  • 259
  • 1
  • 2
  • 13
9
votes
2 answers

sox: Split audio on silence but keep silence

I've got multiple audiobooks that are stored in large mp3s. And I'm trying to split these large mp3s into multiple smaller files. I've found a tool that can detect silence in audio files and split audio files based on this "delimiter". Here is an…
Lugaxx
  • 685
  • 2
  • 7
  • 16
9
votes
3 answers

What and how is the encoding of a raw (headerless) audio file?

I have done this: me@riverbrain:~/sgf$ echo "test" | text2wave -otype raw -F 16000 >> test.raw which produced a headerless audio file. The wonderful thing about this file is that it can be concatenated (using cat, like text) with another raw audio…
ixtmixilix
  • 13,040
  • 27
  • 82
  • 118
8
votes
2 answers

Sox: Convert a .wav file with required properties in a single command

I have a test.wav file.  I need to use this file to process an application, with following properties: monochannel 16 kHz sample rate 16-bit Now, I'm using the following commands to attain these properties: sox disturbence.wav -r 16000…
GShaik
  • 169
  • 2
  • 2
  • 7
8
votes
3 answers

Play a sound file slower or faster

How can you play a sound slower or faster? That would be useful for listening carefully one audio passage or to listen fast forward to find a concrete passage. Is there something with the play sox command that would do this? Alternative simple…
Quora Feans
  • 3,806
  • 7
  • 29
  • 46
7
votes
2 answers

sox returns an error when I try to handle mp3 files

Hello so here is the deal, I used: $ yum install sox To install it in CentOS 6. After that I did a quick test: $ sox test.mp3 test.amr and this is what it returns: $ sox formats: no handler for file extension `mp3' I need this done with sox not…
cppit
  • 171
  • 1
  • 1
  • 3
6
votes
1 answer

pipe the output of parec to sox

sox is probably the one linux program that continues to frustrate me. At the same time, I am awed by what it can do, and I'd like to get close to being fluent in it, if not mastering it. Today, I've spent about 2 hours trying to get sox to read…
ixtmixilix
  • 13,040
  • 27
  • 82
  • 118
6
votes
3 answers

How to create the spectrogram of many audio files efficiently with Sox?

I have a bunch of audio files and I would like to create the spectrogram for each individual file using Sox. Usually, for a single file, I do this: sox audiofile.flac -n spectrogram However I don't know how to extend this method to more than one…
Carl Rojas
  • 1,049
  • 4
  • 14
  • 27
5
votes
5 answers

Programmatically change the playback speed (NOT pitch) in real-time

I'm looking for a software that reproduces audio files (wav and mp3 if possible) and provides a way to change the playback speed in real-time, flawlessy. I mean, without any gap, pop, or noise. Like the sampling clock is changed smoothly. I'm NOT…
Mark
  • 677
  • 1
  • 10
  • 24
5
votes
1 answer

How to monitor microphone volume level?

I've found a solution that doesn't work by me: audio - Monitoring the microphone level with a command line tool in Linux - Super User https://superuser.com/questions/306701/monitoring-the-microphone-level-with-a-command-line-tool-in-linux The…
ka3ak
  • 1,235
  • 4
  • 18
  • 30
5
votes
1 answer

Split large amount of wav files to small parts

I have large amount of wav files (over 50 000) and I need to split every wav file to 10 second long parts. t's nearly impossible to do it one by one, so my question is: How can I do it in ffmpeg (or in sox)?
Taron
  • 51
  • 1
  • 1
  • 3
5
votes
3 answers

sox in between two pipes to resample a voice audio

I'm trying to put the "sox" utility in a two pipes command to resample a mono 44kHz audio file to a 16kHz audio file. It works fine with a single pipe : $ speexdec toto.oga - | sox -V -t raw -b 16 -e signed -c 1 -r 44.1k - -r 16k toto.wav But when…
SebMa
  • 1,941
  • 4
  • 22
  • 37
1
2 3 4 5 6 7