Beispiel #1
0
        public AudioCaptureEntity(IAudioCaptureProvider audioCapture, AudioSource source, AudioEngineCaptureOptions options)
        {
            this.audioCapture = audioCapture;
            this.source       = source;
            this.options      = options;

            this.frameLength = (this.source.CodecSettings.FrameSize / source.CodecSettings.SampleRate) * 1000;

            if (options.Mode == AudioEngineCaptureMode.Activated)
            {
                activation = new VoiceActivation(source.CodecSettings, source.CodecSettings.FrameSize, options.StartVolume, options.ContinuationVolume, options.ContinueThreshold);
                //preprocessor = new SpeexPreprocessor (this.source.FrameSize, this.source.Frequency);
            }
        }
Beispiel #2
0
        public AudioCaptureEntity(IAudioCaptureProvider audioCapture, AudioSource source, AudioEngineCaptureOptions options)
        {
            this.audioCapture = audioCapture;
            this.source = source;
            this.options = options;

            this.frameLength = (this.source.CodecSettings.FrameSize / source.CodecSettings.SampleRate) * 1000;

            if (options.Mode == AudioEngineCaptureMode.Activated)
            {
                activation = new VoiceActivation (source.CodecSettings, source.CodecSettings.FrameSize, options.StartVolume, options.ContinuationVolume, options.ContinueThreshold);
                //preprocessor = new SpeexPreprocessor (this.source.FrameSize, this.source.Frequency);
            }
        }
 private void UpdateActivation()
 {
     IsActivating = false;
     ActivationLevel = 0;
     this.activation = new VoiceActivation (AudioFormat.Mono16bitLPCM, FrameSize, VoiceActivationThreshold, VoiceActivationThreshold / 2, VoiceActivationSilenceTime);
 }