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
5
votes
1 answer

How to convert 16bit wav to raw audio

I'm trying to use sox to convert asterisk voicemails to raw audio. The encoding information of the original wav is PCM S16 LE, so I thought I would just be able to do sox msg0000.wav msg0001.raw but the raw file from that is garbled and, according…
scotter
  • 105
  • 2
  • 3
  • 7
5
votes
2 answers

Sox mix and delay

I am mixing audio using SOX. the command SOX -m voice.wav audio.wav final.wav is what I am using. My goal is to delay the voice.wav of 10 second, if I try to use delay 10.0 then I have double voice. How to get right?
Giuseppe
  • 1,079
  • 13
  • 31
5
votes
2 answers

What alternative syntaxes are there for expressing XML?

What human-readable and human-editable syntaxes exist that can be automatically converted to and from XML with no loss of expressivity. In other words, an updated version of this list. The three syntaxes mentioned there are: SOX PYX SLiP Are there…
Steve Bennett
  • 114,604
  • 39
  • 168
  • 219
5
votes
1 answer

sox has exited with error code 1 in node js

I want realtime streaming using Google Cloud Speech to text I'm running some example code at Google Cloud speech to text document but this error occurs sox has exited with error code 1. Enable debugging with the environment variable…
nathaneast
  • 61
  • 3
5
votes
1 answer

Recording from multiple channels through sox

I am trying to record 2 different microphones through Sox for one of my application. I am currently just testing on Mac terminal for the audio recording. However, I am only able to get audio through one microphone. The sox command I am using is: sox…
Cipher
  • 5,894
  • 22
  • 76
  • 112
5
votes
2 answers

Change huge amount of data from NIST to RIFF wav file

So, I am writing a speech recognition program. To do that I downloaded 400MB of data from TIMIT. When I inteded to read the wav files (I tried two libraries) as follow: import scipy.io.wavfile as wavfile import wave (fs, x) =…
J Agustin Barrachina
  • 3,501
  • 1
  • 32
  • 52
5
votes
3 answers

Any idea why I can execute command from Command Line but not From PHP exec()

OK, I have done some creative searches and am kind of hitting a road block. I am trying to use the linux program "sox." I am trying to call it from my PHP script. The script DOES work if I use the command line. However, when I use PHP exec, it…
Scott
  • 877
  • 4
  • 12
  • 24
5
votes
3 answers

Mix Audio tracks with offset in SOX

From ASP.Net, I am using FFMPEG to convert flv files on a Flash Media Server to wavs that I need to mix into a single MP3 file. I originally attempted this entirely with FFMPEG but eventually gave up on the mixing step because I don't believe it it…
Laramie
  • 5,457
  • 2
  • 39
  • 46
5
votes
2 answers

Trim off N samples from audio file using SoX / FFmpeg etc

Is there a way to trim off N samples from audio file using SoX / FFmpeg or the likes of?
Vasyl Shumskyi
  • 133
  • 1
  • 7
5
votes
1 answer

SoX FIR one-liner

I'm trying to apply reverb by convolving with an impulse response in SoX. The following shell script does exactly what I want: #!/usr/bin/env bash # # Convolve audio file with and impulse response (IR) # # Usage: # # applyReverb.sh
jorgeh
  • 1,727
  • 20
  • 32
5
votes
1 answer

Generate a waveform image from an audio file

Building a python application that converts raw audio files into wave using sox on a linux system. I want it to be able to generate an image (PNG or Jpeg) of the audio waveform pattern but I am unable to find a command line tool or python package…
oden
  • 3,461
  • 1
  • 31
  • 33
5
votes
3 answers

change pitch of multiple audio files with Sox

I am intending to take my entire music collection and change the pitch from the original recorded a=440hz to the more natural sounding/feeling a=432hz. For those of you who are not familiar with this concept, or the "why" for doing this, I highly…
user2946608
  • 51
  • 1
  • 3
5
votes
2 answers

How to use soxlib for iOS to remove start and end silence

The task is to remove silence by threshold from the start and end of audio recording. I use this sox port to iOS. https://github.com/shieldlock/SoX-iPhone-Lib/ I've found that command line sox tool makes my task by following command: sox in.wav…
cohe4ko
  • 51
  • 2
4
votes
2 answers

Basics of compiling binary with no dependencies using gnu toolchain

I'm trying to make an audio file I create slow down using SoX, and although I can easily compile the source files on the linux machine I use regularly, I need to transfer the binary to another linux machine with limited permissions and memory. I…
Malz
  • 173
  • 7
4
votes
1 answer

How do I set an audio file to certain characteristics?

How do I convert an mp3 file to a file with the following characteristics? single-channel (monaural) little-endian unheadered 16-bit signed PCM sampled at 16000 Hz I have tried running this command: ffmpeg -i audio16000.mp3 -ar 16000 -ac 1…
daniel
  • 1,446
  • 3
  • 29
  • 65