记录.flac格式或将wav转换为.flac [英] Record to .flac format or convert wav to .flac

查看:107
本文介绍了记录.flac格式或将wav转换为.flac的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

目前我不想尝试使用新的谷歌语音识别。据我所知,它只接受.flac格式。我正在使用NAudio录制我的麦克风数据,但它将其存储为wav文件。我找不到将wav文件转换为flac格式或直接录制为flac格式的方法!任何人都可以帮忙吗?

Currently I wan't to try and use the new google speech recognition. To my knowledge it only accepts .flac format. I'm using NAudio to record my mic data but it stores it as a wav file. I cannot find a way to convert a wav file to a flac format or directly record to a flac format! Can anyone help?

推荐答案

我知道并定期使用的最佳代码是FFmpeg或libavcodec:http://en.wikipedia.org/wiki/Ffmpeg [ ^ ],

http://ffmpeg.org/ [ ^ ],

http://en.wikipedia.org/wiki/Libavcodec [ ^ ],

http://libav.org/ [ ^ ]。



在这两种情况下,您都可以获得免费的开源实用程序,它几乎可以创建所有内容,包括编码/解码FLAC支持。



现在,如何以编程方式使用它.NET应用程序lication?首先,您可以使用 System.Diagnostics.Process.Start 运行它来使用可用的实用程序:

http://msdn.microsoft.com/en-us/library/system.diagnostics.process.start.aspx [ ^ ]。



如果这还不够好,你可以自己将库包装在.NET程序集中,或找到合适的包装器。请参阅:

http://www.ffmpeg-csharp.com/ [ ^ ],

http://sourceforge.net/projects/sharpffmpeg/ [ ^ ],

http://vbffmpegwrapper.codeplex.com/ [ ^ ]。



毕竟,尝试找一些: http://bit.ly/VpboUJ [ ^ ]。



如果你想工作在你自己的包装但不知道如何,问一个问题,我会给你基本的想法(使用P / Invoke或C ++ / CLI混合模式项目)。



祝你好运,

-SA
The best code I know and use on regular basis is FFmpeg or libavcodec: http://en.wikipedia.org/wiki/Ffmpeg[^],
http://ffmpeg.org/[^],
http://en.wikipedia.org/wiki/Libavcodec[^],
http://libav.org/[^].

In both cases, you can get free open-source utilities which can make nearly everything, including encode/decode FLAC support.

Now, how to use it programmatically in a .NET application? First, you can use the available utility by running it using System.Diagnostics.Process.Start:
http://msdn.microsoft.com/en-us/library/system.diagnostics.process.start.aspx[^].

If this is not good enough, you can wrap the library in a .NET assembly by yourself or find appropriate wrapper. Please see:
http://www.ffmpeg-csharp.com/[^],
http://sourceforge.net/projects/sharpffmpeg/[^],
http://vbffmpegwrapper.codeplex.com/[^].

After all, try to find some more: http://bit.ly/VpboUJ[^].

If you wish to work at such wrapper by yourself but don't know how, ask a question, I'll give you the basic ideas (using P/Invoke or C++/CLI "mixed-mode" project).

Good luck,
—SA


这篇关于记录.flac格式或将wav转换为.flac的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆