How to use sox to convert mp3 file from stdin?

Clash Royale CLAN TAG#URR8PPP
up vote
0
down vote
favorite
I have a situation where I get a mp3 audio output in the stdout, and I'd like to save it directly in a wav file.
Example:
I could do that:
gtts-cli "Hello World" -o out.mp3 && sox out.mp3 out.wav`
But I'd like something as:
gtts-cli "Hello World" | sox -p out.wav
Now this command raise the error:
sox FAIL formats: can't open input '-': can't find sox file format identifier.
I have installed the library libsox-fmt-mp3. I also get the same error if I try:
gtts-cli "Hello World" | sox -p -t mp3 out.wav
Thanks,
pipe mp3 sox
add a comment |
up vote
0
down vote
favorite
I have a situation where I get a mp3 audio output in the stdout, and I'd like to save it directly in a wav file.
Example:
I could do that:
gtts-cli "Hello World" -o out.mp3 && sox out.mp3 out.wav`
But I'd like something as:
gtts-cli "Hello World" | sox -p out.wav
Now this command raise the error:
sox FAIL formats: can't open input '-': can't find sox file format identifier.
I have installed the library libsox-fmt-mp3. I also get the same error if I try:
gtts-cli "Hello World" | sox -p -t mp3 out.wav
Thanks,
pipe mp3 sox
1
Something like| sox -t mp3 - out.wavshould work.
– meuh
2 days ago
It works, thanks.
– Rafael Toledo
2 days ago
add a comment |
up vote
0
down vote
favorite
up vote
0
down vote
favorite
I have a situation where I get a mp3 audio output in the stdout, and I'd like to save it directly in a wav file.
Example:
I could do that:
gtts-cli "Hello World" -o out.mp3 && sox out.mp3 out.wav`
But I'd like something as:
gtts-cli "Hello World" | sox -p out.wav
Now this command raise the error:
sox FAIL formats: can't open input '-': can't find sox file format identifier.
I have installed the library libsox-fmt-mp3. I also get the same error if I try:
gtts-cli "Hello World" | sox -p -t mp3 out.wav
Thanks,
pipe mp3 sox
I have a situation where I get a mp3 audio output in the stdout, and I'd like to save it directly in a wav file.
Example:
I could do that:
gtts-cli "Hello World" -o out.mp3 && sox out.mp3 out.wav`
But I'd like something as:
gtts-cli "Hello World" | sox -p out.wav
Now this command raise the error:
sox FAIL formats: can't open input '-': can't find sox file format identifier.
I have installed the library libsox-fmt-mp3. I also get the same error if I try:
gtts-cli "Hello World" | sox -p -t mp3 out.wav
Thanks,
pipe mp3 sox
pipe mp3 sox
edited 10 hours ago
Elayne
482
482
asked 2 days ago
Rafael Toledo
63
63
1
Something like| sox -t mp3 - out.wavshould work.
– meuh
2 days ago
It works, thanks.
– Rafael Toledo
2 days ago
add a comment |
1
Something like| sox -t mp3 - out.wavshould work.
– meuh
2 days ago
It works, thanks.
– Rafael Toledo
2 days ago
1
1
Something like
| sox -t mp3 - out.wav should work.– meuh
2 days ago
Something like
| sox -t mp3 - out.wav should work.– meuh
2 days ago
It works, thanks.
– Rafael Toledo
2 days ago
It works, thanks.
– Rafael Toledo
2 days ago
add a comment |
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f481971%2fhow-to-use-sox-to-convert-mp3-file-from-stdin%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
1
Something like
| sox -t mp3 - out.wavshould work.– meuh
2 days ago
It works, thanks.
– Rafael Toledo
2 days ago