HTML5 audio wav 13kbps

1

They send me audios in .wav format with a bitrate of 13kbps that I need to play on an audio tag. The problem is that browsers, from what I have researched, support wav of 8 or 16 kbps.

I've tried jQuery players like jPlayer and nothing ... So now I'm trying from console in linux to convert that audio to a wav with bitrate 8-16 or mp3 to do the exec () in the php audio load to my website.

I am using sox and licks, but I do not give the correct command. I used the last response from the post: link but it generates a heavy cdr file in between and makes the process very slow.

Any concrete alternative or command to convert the bitrate of the wav or convert to mp3 without generating that cdr (if I try to convert the wav directly gives me coding error)?

soxi of the audio:

Input File     : 'out.wav'
Channels       : 1
Sample Rate    : 8000
Precision      : 16-bit
Duration       : 00:03:58.32 = 1906560 samples ~ 17874 CDDA sectors
File Size      : 387k
Bit Rate       : 13.0k
Sample Encoding: GSM
    
asked by PriNcee 27.01.2017 в 11:37
source

1 answer

1
  

Return to me: "Unsupported data format: 0x0031"

You could do the following:

  • Using sox , convert wav encoded in GSM to PCM :

    sox in.wav -r 8k -c 1 -s out.wav
    
  • Then using lame , convert the wav PCM to MP3 :

    lame out.wav out.mp3
    

// Update

Due to the comment that the resulting file is too large , you could also do it like this:

Using ffmpeg

ffmpeg -i prueba.wav -vn -ab 8k -ac 2 -f mp3 prueba.mp3

Where:

-vn                 disable video
-ab bitrate         audio bitrate
-ac channels        set number of audio channels
-f fmt              force format
    
answered by 27.01.2017 / 15:05
source