Questions tagged [libsox]

LibSoX is an audio file-format and effects library.

LibSoX is a library of sound sample file format readers/writers and sound effects processors. It is mainly developed for use by SoX (Sound exChange) but is useful for any sound application.

Resources

See Also

35 questions
10
votes
2 answers

SOX and fade in and fade out

I'm trying to create a fade in and fade out for several wave files that I won't know the total time duration in seconds of. I read the manual but the example I see all looks like I need to know the full length of the file. Can someone post an…
Rick T
  • 3,349
  • 10
  • 54
  • 119
7
votes
1 answer

sox - how to create mp3 file with bit rate 16kbps

Currently the command used is `sox input.wav -G -t mp3 -r 16k test.mp3` But this is creating a file with bit rate 24.0 kbps. How to make the bit rate of the out put file to 16.0 kbps?
Shamis Shukoor
  • 2,515
  • 5
  • 29
  • 33
4
votes
1 answer

Calculation of fft using python

By using wave in Python we can read .wav audio format and can calculate the frequency and power of a signal. But I want to calculate the frequency of .mp3 audio format directly. I've heard a little bit about Pysox. Is Pysox capable of reading frames…
user007
  • 451
  • 2
  • 5
  • 10
4
votes
1 answer

how to install flac support (flac libraries) to sox in Windows

when I try to work on flac files I got "no handler for file extension flac" error. is there any way to solve this problem in windows.
3
votes
1 answer

JSON.stringify an object with a blob

I have an object with an audio blob inside of it. When I call JSON.stringify on the object, the blob disappears. How to stringify a binary blob in an object ? The audio blob is from the sox-element and in this case is of mime type 'audio/wav'. let…
Matt
  • 509
  • 2
  • 14
3
votes
2 answers

Change audio file pitch without changing tempo using libsox

I developed a simple app that changes the pitch of an audio file with libsox (using this example). Here is my code. It works with 2 input arguments - input file path & output file path: #include #include #include…
DucTM31
  • 89
  • 6
3
votes
1 answer

Proper way to chain several effects with libSox and read the output data

I am trying programmatically apply few effects with libSox and I currently cannot understand if I am doing it right. For example, I need to apply tempo and gain effects and read the resulting audio in a buffer for a further processing. The…
Egor Lakomkin
  • 1,374
  • 14
  • 26
3
votes
1 answer

Downsampling a wav file using libsox

I'm trying to convert a 16KHZ 16-bit Signed PCM encoded wave file to 8KHz 8-bit mu-encoded wav file using the Sox library C program (http://sox.sourceforge.net/). The conversion from PCM to mu is working fine. But when I apply the down-sampling…
Khalandar
  • 33
  • 1
  • 5
2
votes
0 answers

sox with MP3 on Heroku

My app uses sox to apply some effects to an audio file on a Heroku dyno. I added sox, libsox-fmt-mp3 and libsox-fmt-all to Aptfile using the APT buildpack. Sox is installed but MP3 files are still not working. sox -h tells me that there is no MP3…
lorisleitner
  • 688
  • 1
  • 5
  • 20
2
votes
1 answer

Convert audio into FLAC using libsox

I am trying to programmatically convert audio in memory buffer using libSoX API. It worked fine for changing the sampling rate, for instance, but with conversion between PCM and FLAC I have certain troubles. QByteArray inData = [...]; sox_effect_t…
Dmytro Prylipko
  • 4,762
  • 2
  • 25
  • 44
2
votes
2 answers

trimming 10 milliseconds from the beginning of an audio file using sox

I'm trying to trim off the first 10 milliseconds of a 30+ min file. The trim commands trims it but the output I get is 10 milliseconds. What I want is to keep the end part of the audio file and to get rid of 10 milliseconds of the beginning of the…
Rick T
  • 3,349
  • 10
  • 54
  • 119
1
vote
1 answer

How to set sample format when using sox with ffmpeg?

I am trying to convert a 44.1k 16bit flac file into 48k 32 bit (float) wav file. This is the command I use: 'ffmpeg -i in.flac -af aresample=resampler=soxr:precision=28:out_sample_fmt=fltp:out_sample_rate=48000 out.wav' No matter which value I use…
Finch
  • 205
  • 2
  • 10
1
vote
1 answer

deterministic dithering with libsoxr

I have an issue with some unit test code which is giving different results for every execution. I tracked it back to libsoxr (0.1.3) and discovered that is its down to the dithering option: That is, if soxr_create() is invoked with: soxr_io_spec_t…
Bruce Adams
  • 4,953
  • 4
  • 48
  • 111
1
vote
0 answers

How to use Sox Library 'pad' command in mac os application to add silence to begining and end of audio file?

I am trying to add silence to begining and end of an audio wav file in a mac OS application(objective c). For that i am using sox library. i use prebuilt compiled framework from this repo. Dragged and dropped the libsox.a and sox.h files. I am…
Awais Fayyaz
  • 2,275
  • 1
  • 22
  • 45
1
vote
0 answers

How can I send my audio file to stdout with the libsox library?

I'm setting an audio program on my raspberry using libsox, the developer library of SoX. And for instance I need to make it play my input mp3 file to my stdout output so I can hear the song with my earpiece connected to the jack port of the…
Nie Lie
  • 11
  • 1
1
2 3