Open ibramn opened 8 years ago
I am having similar trouble. Any luck yet?
I got this working using: sox -t waveaudio "Logitech" outputFileName.wav
"Logitech" is what I renamed my microphone in the recording tab of the sound control panel. I renamed it by clicking the properties button and typing in the text box.
Can you please let us know how you have fixed this. I tried to add cmdArgs but that throw "Missing filename error"
I would first try getting sox working in the command line and then go in and edit the cmdArgs to reflect the code that's working in the command line. take the code I entered and change "Logitech" to whatever your mic is named in the control panel and see if that works
I solved this problem by installing sox 14.4.1 rather than 14.4.2
i had the some problum and solved it using the sox 14.4.2 i got the solution from here 👍 http://rpm.pbone.net/index.php3/stat/45/idpl/29638255/numer/7/nazwa/soxformat
to play a file just use the following format:
sox " filename.format"(e.g file.wav) -t waveaudio
i'm not sure what this mean but i do know that it work for all files format i tryied even mp3 which was a big suprise for me consider the problems that i had with this format from the first time i used sox
hope it helps you too
I had the same problems as above using 14.4.2 on windows 10. I tried the -t waveaudio option. I also tried renaming my output device and then using it. None of the solutions that I found here or on other sites worked with 14.4.2.. What did work for me was downloading and using 14.4.1. Thanks ibramn!
Tor me uninstalling 14.4.2 and installing 14.4.1 worked on windows 10. Also had to set the environment path variable.
In the event this helps anyone else...
In addition to specifying the device index or name you can also specify -d
in place, example:
sox -t waveaudio -d output.wav
= OK
sox -t waveaudio 0 output.wav
= OK
sox -t waveaudio Microphone output.wav
= OK
In the case of this library we see here:
sox -d -t flac -
= FAIL (no default output device)
In my case downgrading to 14.4.1 made no difference, the order of parameters must be as shown above.
In case someone else – here in the future – still gets stuck with this problem. For me, using 14.4.2, the issue was fixed after installing SoX handlers for other audio formats.
sudo apt install libsox-fmt-all
(I'm using Raspberry Pi, by the way. Just to leave the keyword here and possibly help more people)
In case someone else – here in the future – still gets stuck with this problem. For me, using 14.4.2, the issue was fixed after installing SoX handlers for other audio formats.
sudo apt install libsox-fmt-all
(I'm using Raspberry Pi, by the way. Just to leave the keyword here and possibly help more people)
Thank you very much it help me very much
Santa brought me a Raspberry Pi Zero 2 W for Christmas today (well, "Santa" is me, but I've been having so much fun with it that I feel like a kid). I've managed to get it to play 24-bit, 96 kHz FLAC over Wi-Fi, usually without any under-runs. I'm so impressed with this tiny bugger. The command above was helpful for getting audio going, so thanks so much for sharing. I just had to add my account to the audio
group with:
$ sudo usermod -a -G audio $LOGNAME
After logging back in, I am able to play tracks without having to use sudo
:
…and no, I don't have 19 TB of music…that's mostly photos and other stuff. :)
Merry Christmas!
In case someone else – here in the future – still gets stuck with this problem. For me, using 14.4.2, the issue was fixed after installing SoX handlers for other audio formats.
sudo apt install libsox-fmt-all
(I'm using Raspberry Pi, by the way. Just to leave the keyword here and possibly help more people)
much appreciated 😀 was able to run sox 14.4.2 , inside wsl2 (ubuntu 20.04) on win10 host, using this pretty simple fix 😅 after configuring PulseAudio of course
i use pocketsphinx with sox cmd on windows platform, and sox is 14.4.2 when i run live.exe, it come this error, but find the answer: popen_sox(int sample_rate) { char soxcmd; int len; FILE sox;
len = snprintf(NULL, 0, SOXCMD, sample_rate);
if ((soxcmd = malloc(len + 1)) == NULL)
E_FATAL_SYSTEM("Failed to allocate string");
if (snprintf(soxcmd, len + 1, SOXCMD, sample_rate) != len)
E_FATAL_SYSTEM("snprintf() failed");
// Replaced "popen" with "_popen"
if ((sox = _popen(soxcmd, "rb")) == NULL)
E_FATAL_SYSTEM("Failed to popen(%s)", soxcmd);
free(soxcmd);
return sox;
} hope this can be helpful to some one : )
can anyone help me solving this error ? I'm working on windows OS and sox-14-4-2