Questions tagged [sox]

SoX - Sound eXchange is an Open Source command line utility that manipulates audio sound files.

Filter by
Sorted by
Tagged with
0
votes
0answers
14 views

Detecting end of a sox stream in combination with netcat

I'm sending an audio stream with sox to a TCP port on the same machine. I use this code for it: sox test.wav -t raw -c 1 -b 16 -r 16k -e signed-integer - | \ nc -N localhost $port >> $out When ...
1
vote
1answer
58 views

How can I redirect sox messages to null or a log file

I run the following command to capture the output of audio into a file: $ sox -t pulseaudio alsa_output.pci-0000_00_1b.0.analog-stereo.monitor -t mp3 test.mp3 silence 1 0.1 3% 1 3.0 3% > /dev/null ...
2
votes
1answer
125 views

How can I record the audio output using sox?

I want to record the output of Google Text to speech to a mp3 file. I need a command that I can use in Terminal. I read sox can record audio, however don't know how to set up it to record the output ...
1
vote
0answers
302 views

How to convert all mp3 audio in a folder to 8d or 9d audio in ubuntu terminal

In ubuntu terminal, is there any command to make all mp3 in a folder to 8d or 9d audio. Something like ffmpeg or other? According to mashable, 8D audio is essentially an effect applied to a stereo ...
1
vote
0answers
462 views

Finding a functioning voice changer for Discord on Ubuntu?

I've been trying to find (or make) a voice changer for a project I have with some friends for a tabletop gameover Discord, which includes role-playing. Thing is, I can't find any real-time voice ...
0
votes
0answers
29 views

No audio from recording script while using cron

Good day, New to the group, and I am having an issue with cron. When I run this script (start.sh) to record audio in terminal it works perfectly: !/bin/bash sleep 1 source /home/will/roboradio/161....
2
votes
0answers
50 views

Can a symbolic link provide default arguments?

I'm playing around with the SoX, an audio conversion program. After installation I notice that it creates a symbolic link /usr/bin/play -> sox. I notice that I can play an audio file with play ...
2
votes
1answer
537 views

CLI line buffer: How to pipe to grep an output stream?

I have this command (for pomodoros): play -n synth 25:00 pinknoise I don't want to silent completely the output (-q option), just the header (grep don't work). Normal output: File Size: 94.3T ...
1
vote
1answer
999 views

Convert .gsm to .wav with sox

I'm trying to convert one music files with format .gsm to format .wav. This is how I tried: for f in *.gsm; do sox $f new/${f%.wav}; done The result is that I get the same files with the same format ...
2
votes
1answer
390 views

I would like to give the crontab command priority over current audio stream Ubuntu 18.04

The mp3 will automatically run at the specified time using crontab. */10 7-21 * * * play /home/mo/document/1.mp3 */10 7-21 * * * sleep 20;play /home/mo/document/2.mp3 */10 7-21 * * * sleep 40;play /...
3
votes
1answer
1k views

How do I add mix in audio from one file to a another

I'm trying to add background audio to a primary wav file. sox -m primary.wav background.wav output.wav I have about 5s of background chatter in background.wav and I'd like the output to always be ...
2
votes
2answers
459 views

Error Loading SoX

I use a really useful tool called r128gain which performs loudness normalisation on audio files. Under 17.10, however, I get the following error however... Failed opening "/home/Downloads/r128gain-1....
1
vote
2answers
104 views

How to find out which songs in a directory are loudest?

Backstory: I have about 400 odd songs that I use for background music in my wikipedia audiobooks. I had thought I had normalized them all properly so their volume would not overwhelm the speech, but ...
1
vote
2answers
2k views

How to play sound on our local server through ssh without logging in on that server?

I'm using sox to play a sound on our local server (ubuntu 16.04). I run play myfile.mp3 through ssh. However, that sound only plays if I'm logged in on that local server. Any idea how to achieve this ...
4
votes
3answers
2k views

Write the dynamic output of terminal into a text file

It comes down to being able to save the dynamic output (I'll explain) of terminal into a text file, but here's what I'm ultimately seeking. I created a custom command for terminal called playRandom, ...
0
votes
1answer
202 views

How to stop all “play” commands currently running in other shells? [duplicate]

I have a script that invokes the play command when I press f10. I would like to edit that script so if I press it while an audio file is playing, then it kills that first before playing the next file. ...
0
votes
1answer
328 views

How to prevent wrong audio file tag encoding after using SoX?

SoX changes tags. The title is changed from 4 марта to 4 маÑÑа. The SoX command is simple sox f.mp3 f2.mp3. How to prevent wrong audio file tag encoding after using SoX?
0
votes
1answer
970 views

Is there an easy way to kill a 'play' job (from sox)

I use the play utility from the sox package to generate noise so that sirens won't wake me up at ungodly hours! However play runs like a daemon, meaning that pressing Ctrl+C will not stop it. So I ...
5
votes
2answers
4k views

sox and rec without the mic

I'm trying to record the output of my speakers, but when I do this, it also records from the microphone. I'd like to only record the non-microphone devices. Trying: $ (AUDIODEV=hw:0,0; rec test.mp3)...
1
vote
0answers
128 views

Generate the sounds of a babbling brook or a water-fall with SoX?

I got so inspired by this question "Generate White Noice to Calm a Baby", so I was wondering what else i possible to do with SoX... Is it possible to generate the sound of a babbling brook? Is it ...
2
votes
1answer
546 views

SoX suggestions - Binaural Beats?

I got so inspired by this question Generate white noise to calm a baby, and was wondering if SoX could be used for generating Binaural Beats. Basically I'd want to make sounds that are such that ...
3
votes
0answers
255 views

Convert stream video/x-ms-asf to audio and pipe it to stdin of sox

Short story I'm trying co convert something which seems to appear a video stream (to be precise it's a FM radio streamed to the internet via http://stream.polskieradio.pl/program3) of type video/x-ms-...
2
votes
2answers
2k views

How to record with sox?

I would like to record some text-to-speech. Right now I pipe the audio to play so that it can be played. The command that I use to play the tts is play -q - I have tried using audio-record and ...
1
vote
2answers
13k views

combine multiple audio files with slience between each audio file in sox

I have about 20 audio files(.wav) in a folder , this is how I combine this wave files sox *.wav output.wav I want to add delay or silence between each wave . I have tried pad , but it's just put ...
0
votes
1answer
911 views

Is there a way with sox to trim parts of audio file with volume under a certain level?

I have an audio file and I want to delete the parts of this audio file that have less than a certain level of volume. Is that possible with sox?
0
votes
1answer
1k views

Cross fading several audio files using sox

I'm trying to cross-fade several audio files together with a 3 second cross-fade and join them together in to one file with sox. I can join several files together by the command below but not sure ...
1
vote
1answer
1k views

output SoX synthesized sound to file

I have the following SoX command that generates a nifty 'spacecraft' sound: play -n -c1 synth whitenoise band -n 100 20 band -n 50 20 gain +25 fade h 1 864000 1 How could I output about 10 seconds ...
0
votes
1answer
68 views

Command substitiution problem, confused

I am trying to have sox play a file from user input. To do this, I set up a command like the one below: $ play proc/$(read -n 1).wav I have files 0.wav through 9.wav located in the directory proc. I ...
13
votes
4answers
16k views

How to convert .aif audio files to mp3?

I have audio files with .aif extensions (AIFF/Amiga/Mac audio). How to play them and, more important: how to convert them to mp3 or other more common audio format? update: trying to run a command ...
2
votes
1answer
1k views

Batch split large FLACs to mp3 using sox or similar

I have about 50x 1 hour long flac files (audiobooks), each of which I need to encode into (approx.) 10 minute long segments at a convenient silence point (+ or - 30 seconds either side of 10 minutes). ...
13
votes
6answers
15k views

How can I play a song in the background via my command line?

I have installed play : sudo apt-get install sox libsox-fmt-mp3 I can now play my audio files like this : play Desktop/SONGS/01\ -\ Oh\ Baby\ Girl.mp3 Since I'm learning shell, I wish I could do ...
6
votes
1answer
259 views

Injecting packages installed from source into apt/synaptic

Example: I build/install SoX myself, as provided Ubuntu package did not include additional audio format libraries that I might use and it's one of the packages I want latest version anyway. Now I ...