vcvoicerec.pxs
来自「Voice Commnucation Components for Delphi」· PXS 代码 · 共 57 行
PXS
57 行
{
vcVoiceRec demo script.
Use with VC 2.5 Pro Scriptor component.
Copyright (c) 2002-2005 Lake of Soft, Ltd
All rights reserved
http://lakeofsoft.com/vc/
}
{===================================================
Voice Recording demo.
SCRIPT INFORMATION:
After Executing the script try to changing the
waveIn.minVolumeLevel property.
Press Execute button to execute the script.
Press Clear button to destroy the components.
====================================================}
// it is a good idea to clear the components list before doing a new job.
clear;
// -- create devices --
waveRiff = TunavclWaveRiff;
waveRiff.isInput = False; // indicate we want to write into WAVe, not read
waveRiff.fileName = 'voiceRec.wav';
waveIn = TunavclWaveInDevice;
waveIn.isFormatProvider = True;
waveIn.pcm_SamplesPerSec = 22050;
waveIn.pcm_NumChannels = 1;
// NOTE: specify initial min volume level here
waveIn.minVolumeLevel = 400;
waveIn.minActiveTime = 200;
// -- link components --
waveIn.consumer = waveRiff;
// -- activate devices --
waveIn.active = true;
// -- EOF --
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?