Question

I have G729 encoded audio files. I need to programmatically convert them to WAV PCM (16bit 8kHz mono) in the flow of a tool that is doing other thing too. I have an executable that will do that for me. But spawning that external process every time I convert is too heavy on resources. Especially if I need many of them being done in parallel. Looking for a .NET library or code that will let me call this inside my process.

Was it helpful?

Solution

Follow this link : The VoiceAge Open G.729 Implementation. They also provide g729 decoder and encoder written in C.

OTHER TIPS

According to Wikipedia, G.729 includes several patents and is licensed by Sipra, so you probably won't have much luck finding an appropriate lobrary. Unless you're decoding a large number of very small files, the cost of spawning a new process shouldn't be that big compared to the cost of doing the decoding, so I'd say use the executable you have.

As far as resources go, yes, spawning processes requires a lot more resources compared to using threads. This shouldn't really matter, though, so long as you only spawn as many processes as you have cores in your machine. Spawning more processes just wastes resources and doesn't gain you any extra parallelism.

Wikipedia says: "G.729 includes patents from several companies and is licensed by Sipro (http://www.sipro.com/). In a number of countries, the use of G.729 may require a license fee and/or royalty fee."

But I guess you have already considered that in your application.

If you absolutely must be in-process, one solution (not saying it's the best) could be to use LibAVCodec, which is under LGPL.

A free-to-use reference implementation at: http://www.readytechnology.co.uk/open/ipp-codecs-g729-g723.1/

Note the patent issues raised by others, the fact that the reference implementation only runs on Intel processors and that you need to pay Intel a fee in order to distribute code using their IPP library as part of a commercial product.

If you have an ACM codec on your system for G729 then you can use NAudio to convert it to PCM. Have a go using the NAudioDemo application included with NAudio which will show you what ACM codecs are available on your system, and decode a file using them.

What prompts me first when it comes to g729 convertor is ITU G729-A standards.One quite cumbersome way is to convert g729 to pcm first them add up a wav header in front of your wav files.That constructs a .wav from .g729.Since ITU official g729a(and officially do not support multi threads...) lib is highly involved in this idea,I guess you have to consider concurrency and how to properly program with a bunch of static variables within g729a lib.I used to involve in a small project like OP descibes and I basically split huge g729 files into g729 chunks and decode them individually in a manner of reasonable concurrency programming...

If you only want to see the codec needed for the file then go to GSopt and download the latest version of it (you can click here to directly open the download page).

After download, extract file open folder and run the EXE, Now select the file from the browse button and after file is loaded all its information will be shown. (If file is not shown in the browse dialogue box just select All Files(*.*) from browse file dialogue)

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top