黑客防线,在攻与防的对立统一中寻求突破!2001年创刊的黑客技术专业刊物!

设为首页
收藏本站
联系我们
网站导航

黑客文章 - 黑客编程 - 浏览 - 语音监控简单代码

语音监控简单代码

黑客 发布日期:2008-5-20 10:06:37 共有 522 人次浏览
其实语音监控比较简单~这里给出简单代码!
program start;

uses
  windows,mmSystem;
procedure MyStartRecordSound();
begin

mciSendString('OPEN NEW TYPE WAVEAUDIO ALIAS mysound', nil, 0, 0);
mciSendString('SET mysound TIME FORMAT MS ' + // set time
'BITSPERSAMPLE 8 ' + // 8 Bit
'CHANNELS 1 ' + // MONO
'SAMPLESPERSEC 8000 ' + // 8 KHz
'BYTESPERSEC 8000', // 8000 Bytes/s
nil, 0, 0);
mciSendString('RECORD mysound', nil, 0, 0)

end;


procedure MyStropRecordSound();
begin
mciSendString('STOP mysound', nil, 0, 0)

end;


procedure MySaveRecordSound();
var
verz: String;
begin
GetDir(0, verz);
mciSendString(PChar('SAVE mysound ' + verz + '/test.wav'), nil, 0, 0);
mciSendString('CLOSE mysound', nil, 0, 0)
end;


begin

MyStartRecordSound;
sleep(5000);
MyStropRecordSound;
MySaveRecordSound;

end.
所属分类: 黑客编程     网摘收藏: Google 雅虎 百度 POCO 365key 和讯 天极