以编程方式将G729音频转换为WAV PCM

时间:2022-10-07 19:41:41

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.

我有G729编码的音频文件。我需要以编程的方式将它们转换为WAV PCM (16bit 8kHz mono),在一个正在做其他事情的工具的流中。我有一个可执行文件可以帮我完成。但是每次转换时生成外部进程对资源的消耗太大。尤其是当我需要同时做很多的时候。寻找一个。net库或代码,让我在进程中调用它。

7 个解决方案

#1


3  

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

遵循这个链接:VoiceAge Open .729实现。他们还提供用C编写的g729解码器和编码器。

#2


0  

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.

根据*,G.729包含了几项专利,并获得了Sipra的许可,所以你很可能找不到合适的小叶。除非您正在解码大量非常小的文件,否则生成新进程的成本与进行解码的成本相比不应该那么高,所以我建议使用您拥有的可执行文件。

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.

就资源而言,是的,与使用线程相比,生成过程需要更多的资源。不过,这其实并不重要,只要您在机器中生成的进程数量与内核数量相同。生成更多进程只会浪费资源,不会获得额外的并行性。

#3


0  

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."

*说:“g729包含了来自几个公司的专利,并获得了Sipro的许可(http://www.sipro.com/)。在一些国家,使用G.729可能需要许可证费用和/或使用费。

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.

如果您必须在进程中,一个解决方案(不是说它是最好的)可能是使用LibAVCodec,它在LGPL下。

#4


0  

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

一个免费使用的参考实现: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.

请注意其他人提出的专利问题,引用实现只在英特尔处理器上运行,您需要向英特尔支付费用,以便使用它们的IPP库作为商业产品的一部分分发代码。

#5


0  

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.

如果您的系统上有一个用于G729的ACM编解码器,那么您可以使用NAudio将其转换为PCM。使用包含NAudio的NAudioDemo应用程序,它将显示您的系统上可用的ACM编解码器,并使用它们解码文件。

#6


0  

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...

当谈到g729转换器时,我首先想到的是ITU g729 - a标准。一种非常麻烦的方法是将g729转换为pcm,首先在wav文件前面加一个wav头。它从.g729构造.wav。自ITU官方g729a(和官方不支持多线程…)*高度参与这个想法,我猜你要考虑并发性和如何正确程序内的静态变量和一帮g729a lib.I用于涉及在OP杭钢这样一个小项目,我基本上巨大的g729文件拆分为g729的块,分别解码的方式合理的并发编程…

#7


0  

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).

如果您只想看到文件所需的编解码器,请转到GSopt并下载最新版本(您可以点击这里直接打开下载页面)。

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)

下载后,提取文件打开文件夹并运行EXE,现在从browse按钮中选择文件,加载文件后其所有信息将显示。(如果文件未显示在浏览对话框中,请从浏览文件对话框中选择所有文件(*.*)))

#1


3  

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

遵循这个链接:VoiceAge Open .729实现。他们还提供用C编写的g729解码器和编码器。

#2


0  

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.

根据*,G.729包含了几项专利,并获得了Sipra的许可,所以你很可能找不到合适的小叶。除非您正在解码大量非常小的文件,否则生成新进程的成本与进行解码的成本相比不应该那么高,所以我建议使用您拥有的可执行文件。

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.

就资源而言,是的,与使用线程相比,生成过程需要更多的资源。不过,这其实并不重要,只要您在机器中生成的进程数量与内核数量相同。生成更多进程只会浪费资源,不会获得额外的并行性。

#3


0  

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."

*说:“g729包含了来自几个公司的专利,并获得了Sipro的许可(http://www.sipro.com/)。在一些国家,使用G.729可能需要许可证费用和/或使用费。

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.

如果您必须在进程中,一个解决方案(不是说它是最好的)可能是使用LibAVCodec,它在LGPL下。

#4


0  

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

一个免费使用的参考实现: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.

请注意其他人提出的专利问题,引用实现只在英特尔处理器上运行,您需要向英特尔支付费用,以便使用它们的IPP库作为商业产品的一部分分发代码。

#5


0  

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.

如果您的系统上有一个用于G729的ACM编解码器,那么您可以使用NAudio将其转换为PCM。使用包含NAudio的NAudioDemo应用程序,它将显示您的系统上可用的ACM编解码器,并使用它们解码文件。

#6


0  

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...

当谈到g729转换器时,我首先想到的是ITU g729 - a标准。一种非常麻烦的方法是将g729转换为pcm,首先在wav文件前面加一个wav头。它从.g729构造.wav。自ITU官方g729a(和官方不支持多线程…)*高度参与这个想法,我猜你要考虑并发性和如何正确程序内的静态变量和一帮g729a lib.I用于涉及在OP杭钢这样一个小项目,我基本上巨大的g729文件拆分为g729的块,分别解码的方式合理的并发编程…

#7


0  

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).

如果您只想看到文件所需的编解码器,请转到GSopt并下载最新版本(您可以点击这里直接打开下载页面)。

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)

下载后,提取文件打开文件夹并运行EXE,现在从browse按钮中选择文件,加载文件后其所有信息将显示。(如果文件未显示在浏览对话框中,请从浏览文件对话框中选择所有文件(*.*)))