Giter Site home page Giter Site logo

Comments (15)

ibramn avatar ibramn commented on June 14, 2024 26

I solved this problem by installing sox 14.4.1 rather than 14.4.2

from node-speakable.

moshedri avatar moshedri commented on June 14, 2024 15

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

from node-speakable.

favarete avatar favarete commented on June 14, 2024 8

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)

from node-speakable.

amartin7211 avatar amartin7211 commented on June 14, 2024 4

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.

from node-speakable.

BashirAljounaidy avatar BashirAljounaidy commented on June 14, 2024 4

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

from node-speakable.

amartin7211 avatar amartin7211 commented on June 14, 2024

I am having similar trouble. Any luck yet?

from node-speakable.

 avatar commented on June 14, 2024

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

from node-speakable.

amartin7211 avatar amartin7211 commented on June 14, 2024

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

from node-speakable.

MadhbhavikaR avatar MadhbhavikaR commented on June 14, 2024

https://sourceforge.net/p/sox/mailman/message/34108419/

from node-speakable.

ken-riley avatar ken-riley commented on June 14, 2024

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!

from node-speakable.

ali-gs avatar ali-gs commented on June 14, 2024

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

from node-speakable.

userabuser avatar userabuser commented on June 14, 2024

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.

from node-speakable.

dsnyder0pc avatar dsnyder0pc commented on June 14, 2024

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!

from node-speakable.

iskmz avatar iskmz commented on June 14, 2024

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

from node-speakable.

houaohui avatar houaohui commented on June 14, 2024

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 : )

from node-speakable.

Related Issues (13)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.