Audio compression
Jay Kickliter
Posts: 446
I've seen mention of it, but does anyone have any working mu-law/ADPCM CODEC PASM to share? Just checking before I reinvent the wheel.
And to anyone curious of what I'm talking about, it's a simple(ish) way to compress speech to a 4 bit 8 kHz stream. Used in telephony.
Thanks.
And to anyone curious of what I'm talking about, it's a simple(ish) way to compress speech to a 4 bit 8 kHz stream. Used in telephony.
Thanks.
Comments
-Phil
http://hazelware.luggle.com/tutorials/mulawcompression.html
I imagine a lookup dat table is how you would do it. I have some c# code for alaw , but ran across the above, which looks like you could translate a bit easier into pasm.
Using ADPCM you can reduce it to 4 bit "samples". Thanks for the link.
Phil. Don't want to go into specifics yet, but you read my mind.
G.728 runs at 16 kbps with good performance, but it is somewhat compute intensive. G.729 runs at 8 kbps, and is lower compute than G.728. I don't know if it will fit on a Prop or not.
There is license-free C source for these standards available on the internet. I would suggest implementing the codec in C first using the Catalina compiler. If this is not fast enough, then you can optimize compute-intensive portions of the code in PASM.
Dave
Download link please:)
About 15 years ago the ITU realized that it is more precise to specify an audio codec as a program than just in words, block diagrams and tables. So they have both a human language version of the standard as well as source code. The G.191 standard contains C source code for G.711, G.722, G.726, G.727 and G.728. It is located at http://www.itu.int/rec/T-REC-G.191/en .
I think G.729 was the first ITU audio standard that bundled both the human language version and the C source code together into one document. There is also a G.723.1, which I believe is a 16 ksps at low data rates.
The earlier audio codecs are completely license free. However, I believe some of the later standards do have intellectual property claimed against them. It is best to thouroughly research the licensing issues of any standard before it is included in a product.
Dave
http://www.rowetel.com/blog/?page_id=452
http://hackaday.com/2010/09/23/codec2-gnu-low-bitrate-speech-codec/