The tag has no usage guidance.

learn more… | top users | synonyms

10
votes
4answers
8k views

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 ...
8
votes
1answer
1k views

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 ...
5
votes
3answers
11k views

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

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 ...
4
votes
3answers
708 views

Why do 'nohup' and 'disown' not work on SoX (invoked as 'play')

I can run this command: $ play mylist.m3u And music plays. I can then press Ctrl-Z to suspend the job, and issue bg to have it run in the background. However, if I then run disown and exit, the ...
4
votes
1answer
6k views

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 ...
4
votes
0answers
103 views

Default input device sox

I'm trying to configure sox to use a webcam that I just ordered. I've confirmed that the mic works through the GUI. I ran arecord -l and found that the card, device numbers are 1 and 0, respectively. ...
3
votes
1answer
875 views

Piping Sox and FFMPEG together

I'm processing a variety of audio files in a bunch of different formats and I'd like to unify their format and configuration using FFMPEG and SoX. There are two steps to my process: Convert the ...
2
votes
1answer
153 views

Play last few seconds of mp3

Is there any way to play last N seconds of an mp3 file on bash commandline?
2
votes
1answer
29 views

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 ...
2
votes
0answers
158 views

Need a script for automation the convert a lot number audio files to another format [closed]

I have a lot number audio files in MP3 the proprietary format, I want to convert them to 'opus' the free and high quality format, with keep metadata also. My selection command-line programs are SoX (...
2
votes
2answers
407 views

How to add an audio file to a shell script

How can I add an audio file (OGG vorbis) into a shell script making the script as small as possible and at the same time being able to execute it on as most systems as possible? I want the audio file ...
1
vote
1answer
29 views

Shuffle Using SoX?

Is there anyway to shuffle songs using play on a folder using SoX? play ~/Music/*/**
1
vote
2answers
690 views

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 ...
1
vote
2answers
103 views

sox in between two pipes

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 -...
1
vote
2answers
309 views

adding additional tracks using sox and the command line

I'm trying to add additional tracks using sox using the command line Example: I have several different stereo tracks a drum track, vocal track, effects track, etc. Can I add additional stereo tracks ...
1
vote
1answer
255 views

Generating a long sound file with SOX without actually playing the tone

I know how to play a tone for a specific amount of time using SOX. play -n synth 5 sin 347 I know how to save a tone using SOX. sox -n note.mp3 synth 5 sin 347 Question is : How can I save a ...
1
vote
1answer
291 views

Create SOX batch script to extract first 15 seconds and rename multiple files in folder

I have a folder with several MP3 files that I need to extract 10-15 seconds of audio from. I would also like to rename these by appending sample-(name).mp3 to the converted files. How can I do this ...
1
vote
2answers
495 views

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 ...
1
vote
1answer
441 views

sox segmentation fault

My attempt to record sound with sox on Raspberry PI fails: pi@raspberrypi ~/tmp $ rec new.wav Segmentation fault And so does play: pi@raspberrypi ~/tmp $ play test.wav Segmentation fault Yet it ...
1
vote
1answer
168 views

Can I record sound until silence OR a maximum length of recording?

Looking at detecting sound until some silence occurs, I arrived at the command rec recording.flac rate 32k silence -l 1 0.1 3% 1 3.0 3%. I realize my specific use would be somewhat different: I do ...
1
vote
1answer
411 views

How to use sox or ffmpeg to detect silence intervals in a long audio file and replace them by zeros (aka suppress background noise)?

I have a long audio file that was created by concatenating many short files. I would like to detect silence between the speech segments (just a threshold is enough for my purposes) and replace them by ...
1
vote
0answers
350 views

Playback and simultaneous recording through external USB sound card

I've an external USB sound card (in my case it's a TerraTec Aureon 7.1 USB). I've looped the earphone-out to the line-in using a 3.5mm jack cable. I'm interested in starting the playback of a MP2 ...
1
vote
0answers
105 views

SOX script to recognise special pattern

Is it possible to define SOX script that would recognize a pattern having short broadcast followed by a very short pause and then again short broadcast? This would happen when someone presses tangent ...
1
vote
0answers
14 views

sox returns an error when I try to handle mp3 files [duplicate]

Hello so here is the deal, I used : yum install sox (to install it in centos 6) then after that did a quick test: [root@s17069267 ~]# sox test.mp3 test.amr and this is what it returns: sox formats:...
0
votes
1answer
41 views

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

I have an test.wav file. I need to use this file to process an application, with following properties i) monochannel ii) 16khz sample rate iii) 16bit Now, I'm using following commands to attain ...
0
votes
1answer
250 views

Unix - Addressing filename with space for script [duplicate]

I have files Deep.flac and A1 - Rolling In The Deep.flac I wrote the script below, however it can only work with Deep.flac It cannot seem to work with filenames with spaces. I am newbie, learning ...
0
votes
0answers
48 views

How to upgrade SoX to the latest version on RedHat?

I've just installed SoX on RedHat using yum. It automatically installed v14.2.0 which is not the latest version. When I ran yum --showduplicates list sox to check the available packages, it shows ...
0
votes
0answers
152 views

Cannot build sox with FLAC support

I'm trying to configure and build sox v14.4.1 with FLAC support enabled, on Ubuntu. I have downloaded and installed flac and done an sudo ldconfig (just in case the libs were wrongly linked), but ...