Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FAIL sox: Sorry, there is no default audio device configured #18

Open
ibramn opened this issue Mar 2, 2016 · 15 comments
Open

FAIL sox: Sorry, there is no default audio device configured #18

ibramn opened this issue Mar 2, 2016 · 15 comments

Comments

@ibramn
Copy link

ibramn commented Mar 2, 2016

can anyone help me solving this error ?
I'm working on windows OS and sox-14-4-2

@amartin7211
Copy link

I am having similar trouble. Any luck yet?

@amartin7211
Copy link

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.

@ghost
Copy link

ghost commented May 16, 2016

Can you please let us know how you have fixed this. I tried to add cmdArgs but that throw "Missing filename error"

@amartin7211
Copy link

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

@ibramn
Copy link
Author

ibramn commented Jun 17, 2016

I solved this problem by installing sox 14.4.1 rather than 14.4.2

@MadhbhavikaR
Copy link

@moshedri
Copy link

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

@ken-riley
Copy link

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!

@ali-gs
Copy link

ali-gs commented Jun 18, 2017

Tor me uninstalling 14.4.2 and installing 14.4.1 worked on windows 10. Also had to set the environment path variable.

@userabuser
Copy link

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.

@favarete
Copy link

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)

@BashirAljounaidy
Copy link

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

@dsnyder0pc
Copy link

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:
alt text
…and no, I don't have 19 TB of music…that's mostly photos and other stuff. :)

Merry Christmas!

@iskmz
Copy link

iskmz commented Mar 26, 2022

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

@houaohui
Copy link

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;
#define SOXCMD "sox -q -r %d -c 1 -b 16 -e signed-integer -t waveaudio default -t raw -"
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 : )

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests