Roman Gaufman
asked this on June 20, 2011 15:20
As I understand, the format is G.723-24 (3-bit samples at 8khz)
The specification on the card says Audio Sampling Rate 8KHz or 16KHz. How would I get the 16khz?
Even when trying to use the 8Khz, I'm doing:
arecord -D hw:10,0 -r 8000 -f U8 | decode-g72x -3 -l | sox -r 8000 -b 16 -c 1 -s -t raw - -t wav test.wav
And all I'm getting is pink noise.
What am I doing wrong?
The decoder I'm using can be found here: http://www.ps-auxw.de/g72x++.tar.bz2 and I've tested it successfully recording G726 from IP cameras.
The flags I'm using mean:
-3 Process G.723 24kbps (3-bit) input data
-l Generate 16-bit linear PCM data
Comments
Have you had any progress on your side with this? We plan to look into this issue this week.
Havent really tried anything else - arecord -D hw:10,0 -r 8000 -f U8 doesn't seem to give me G.723-23 (3-bit samples at 8khz) - not entirely sure what it gives. I will try with the 3.0.3 kernel - I believe it sets the format correctly?
That's been my result as well. I don't believe 3.0.3 will help, as it seems like a issue with ALSA.
I mentioned this in another thread (http://support.bluecherrydvr.com/entries/20212721-using-ffmpeg-to-r...). This produces 8 bit / 8Khz audio, which is what the driver currently kicks out. We need to change the driver to record 16Khz eventually.
# Record audio from ALSA driver and decode.
arecord -Dplughw:1,0,0 -traw | ./decode-g72x -3 -l > ./decoded.g723
# decode-g72x tool can be downloaded here:
# http://www.ps-auxw.de/g72x++.tar.bz2
# Convert the .g723 file .wav by using ffmpeg
ffmpeg -y -f s16le -acodec pcm_s16le -ar 8000 -ab 24k -i ./decoded.g723 -acodec pcm_s16le -ar 8000 ./audio0.wav