From 1be5537b92ffe8502739dfd6d349c9f3e80c9ac7 Mon Sep 17 00:00:00 2001 From: Konstantin Date: Sun, 29 Jan 2023 16:17:19 +0100 Subject: C# microphone example, diarize integration --- Examples/MicrophoneCS/MicrophoneCS.cs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'Examples/MicrophoneCS/MicrophoneCS.cs') diff --git a/Examples/MicrophoneCS/MicrophoneCS.cs b/Examples/MicrophoneCS/MicrophoneCS.cs index c095ee1..8c3845a 100644 --- a/Examples/MicrophoneCS/MicrophoneCS.cs +++ b/Examples/MicrophoneCS/MicrophoneCS.cs @@ -33,7 +33,10 @@ namespace MicrophoneCS if( cla.captureDeviceIndex < 0 || cla.captureDeviceIndex >= devices.Length ) throw new ApplicationException( $"Capture device index is out of range; the valid range is [ 0 .. {devices.Length - 1} ]" ); - using iAudioCapture captureDev = mf.openCaptureDevice( devices[ cla.captureDeviceIndex ] ); + sCaptureParams cp = new sCaptureParams(); + if( cla.diarize ) + cp.flags |= eCaptureFlags.Stereo; + using iAudioCapture captureDev = mf.openCaptureDevice( devices[ cla.captureDeviceIndex ], cp ); using iModel model = Library.loadModel( cla.model ); using Context context = model.createContext(); -- cgit v1.2.3