使用C#.NET的语音记录(WINMM.DLL) [英] voice record (winmm.dll) using C#.net

查看:155
本文介绍了使用C#.NET的语音记录(WINMM.DLL)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的要求是建立一个实用工具,它可以录制语音(通过MIC)和磁盘上的.wav文件保存为桌面和Web应用程序。对特定的用户,所以我选择了ActiveX技术,因为我没有找到任何其他更好的方法(可能是你知道并能指导我..会更受欢迎)

My requirement was to build an utility which could record voice (through mic) and save on disk .wav files as desktop and web app. for specific users so i chose activeX technology as i didn't find any other better way (may be you know and can guide me.. would be more than welcome)

我用WINMM.DLL(又名媒体控制接口(MCI)),它是工作完全正常,但是,当我在Vista上运行它像特定的计算机,它工作正常,赢Server 2008上,但在Windows 2003和XP它不工作。 。只是工作有哪些需要存在或者是我应该做的,使其在Windows上的其他口味任何工作前提条件..。

I used winmm.dll (aka Media control interface (MCI)) and it is working perfectly fine but on specific computers like when i run it on vista, it works fine and on win server 2008 but on windows 2003 and xp it's not working .. just working is there any prereq.. which needs to be there or what i should do to make it work on other flavors of windows.

我不使用的DirectSound介意some1有一些示例代码建议录制/保存/播放样本:)

I don't mind in using DirectSound if some1 recommends with some sample code to record/save/play sample :)

推荐答案

我会使用DirectShow捕获音频。由于添加了C#标签的问题,我建议使用 DirectShow.NET库。请确保您还下载样本看看在捕获文件夹中的PlayCap和CapWMV样品。您可能还需要签出在CodeProject音频捕获文章

I would use DirectShow to capture the audio. Since you added a C# tag to the question, I recommend using the DirectShow.NET library. Make sure you also download the samples and look at the PlayCap and CapWMV samples in the Capture folder. You may also want to checkout the Audio Capture article at CodeProject.

至于为什么有些OS版本的工作,你有没有证实该音频输入工作与其他软件这些系统?你允许用户选择音频设备或只使用默认音频设备?您是否收到错误消息或只是不音频?每本论坛,确保你换你的文件名在双引号。

As for why some OS versions are working, have you confirmed on those systems that the audio input works with other programs? Are you allowing the user to select an audio device or just using the default audio device? Are you getting an error message or just not audio? Per this forum, make sure you wrap your filename in double quotes.

这篇关于使用C#.NET的语音记录(WINMM.DLL)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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