krig / go-sox

libsox bindings for go

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

How to convert GSM to MP3 using sox

jmaghuyop opened this issue · comments

Hi. After i'd tried this code to convert GSM to MP3, It was converted successfully but when i tried to play, there's no content.
i cannot directly convert it to wav due to the error of the audio file: WAV:RIFF Header not found
sox -t gsm -r 8000 -c 1 -e signed-integer 003533-dialer-Feb-01-2017-16-00-17-PM.WAV -t wav -e signed-integer 0017.wav

file 0017.wav
0017.wav: RIFF (little-endian) data, WAVE audio, Microsoft PCM, 16 bit, mono 8000 Hz
sample output.
sox 0017.wav -n stat
Samples read: 0
Length (seconds): 0.000000
Scaled by: 2147483647.0
Maximum amplitude: 0.000000
Minimum amplitude: 0.000000
Midline amplitude: 0.000000
Mean norm: -nan
Mean amplitude: -nan
RMS amplitude: -nan
Maximum delta: 0.000000
Minimum delta: 0.000000
Mean delta: -0.000000
RMS delta: -0.000000
Rough frequency: -2147483648
Probably text, not sound

image