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

How to fix "Here is no default audio device configured" speech-to-text

Am trying to call the speech-to-text api of google console for nodejs and apparently is working, but when i try to run the example provider for here the example node MicrophoneStream.js and doing the installation like this here, am having the…
theboshy
  • 378
  • 6
  • 17
4
votes
1 answer

Sox file format fail

I have tried to convert pcm files to wav, but keep getting a FAIL format error, no matter how many (or few) options I try. I am wondering what I need to do to get the file handler for pcm files. Installing sox again and updating the terminal did…
Ingerid
  • 131
  • 1
  • 5
4
votes
2 answers

silence out regions of audio based on a list of time stamps , using sox and python

I have an audio file. I have a bunch of [start, end] time stamp segments. WHAT I WANT TO ACHIEVE: Say audio is 6:00 minutes long. Segments I have are : [[0.0,4.0], [8.0,12.0], [16.0,20.0], [24.0,28.0]] After I pass these two to sox + python , out…
kRazzy R
  • 1,561
  • 1
  • 16
  • 44
4
votes
3 answers

Can I use Git for source control and still be SOX compliant?

I'd like to consider migrating from Subversion to Git for my source control but my company is bound by SOX compliance. Has anyone successfully implemented Git in a SOX compliant environment and if so could you elaborate on any of the potential…
4
votes
1 answer

Resample audio file from terminal

I currently have a list of file for which I need to change the sample rate for. I'recently been aware that this is possible using sox But when I try do it, I keep on getting a error message that sox wav: Premature EOF on .wav input file And…
I am not Fat
  • 283
  • 11
  • 36
4
votes
2 answers

How to package SoX binary with MP3 support for a NodeJS AWS Lambda Function with limitations of AWS's Linux AMI?

I've been working on this issue for the past 3 months and am completely stuck. I am trying to package up my NodeJS AWS Lambda function that will use SoX and it's dependencies to convert audio files to MP3. I can get my code to recognize the custom…
M_G
  • 191
  • 1
  • 1
  • 7
4
votes
1 answer

Convert WAV file to TXT file

I have an 8-Bit-WAV-file which I would like to convert into a plain TXT-file. It's important that the resulting TXT-file only contains numbers between 0 and 255, representing the value of every single sample. Of course something like -128 to 128…
lsgng
  • 465
  • 8
  • 22
4
votes
1 answer

Calculation of fft using python

By using wave in Python we can read .wav audio format and can calculate the frequency and power of a signal. But I want to calculate the frequency of .mp3 audio format directly. I've heard a little bit about Pysox. Is Pysox capable of reading frames…
user007
  • 451
  • 2
  • 5
  • 10
4
votes
0 answers

Is it possible to install SoX on XAMPP and how to use it?

I have installed sox on my windows. It is working on windows command prompt. C:\Program Files\sox-14-4-2>sox audio1.vox audio2.wav I don't know how to use this on php. Is it required to install this sox on xampp server too. If yes, then how to…
deepak bhardwaj
  • 534
  • 3
  • 9
  • 21
4
votes
4 answers

Using python subprocess to call sox

I am trying to use subprocess.call to run a sox command as follows: import subprocess subprocess.call(['sox','-n','-b','16','output.wav','synth','2.25','sine','300','vol','0.5']) While this command works fine on a unix command line, here I get the…
4
votes
1 answer

Sox batch process under Debian

I want to resample a bunch of wav files that I got on a folder. My script is this: for f in *.wav; do sox “$f” -r 48000 “${f%%%.wav}.wav”; done The console give me this error: "sox FAIL formats: can't open input file `“90.wav”': No such file or…
DaNoiseMan
  • 139
  • 2
  • 13
4
votes
1 answer

how to install flac support (flac libraries) to sox in Windows

when I try to work on flac files I got "no handler for file extension flac" error. is there any way to solve this problem in windows.
4
votes
3 answers

What is the best way keep a bash script looping in the background on startup - Linux?

I have created a bash script to record sound input via the line in/mic port of the sound card and when sound is detected via breaking silence it records to a temp file, then date-stamps it in a new file and adds it to a database. What i need to…
user3323052
  • 90
  • 1
  • 6
4
votes
2 answers

SoX How to add noise to a file?

I would like to ADD noise to audio files. Is there a way to accomplish this in SoX (or other tool)? I am performing machine learning research, and need to test my algorithms in the presence of noise. Ideally, I would like to specify a signal to…
donnpat
  • 41
  • 1
  • 3
4
votes
1 answer

With the audio tool sox, how can I determine whether a stereo recording is in fact mono?

I have stereo files (2-channel-WAV) which sound totally like mono recordings. Is there a way to let sox run over the file and output whewther the 2 channels are the same or not? Or is there another command line tool doing this sort of wave…
halloleo
  • 9,216
  • 13
  • 64
  • 122