diff options
| author | Konstantin <const@const.me> | 2023-01-29 16:17:19 +0100 |
|---|---|---|
| committer | Konstantin <const@const.me> | 2023-01-29 16:17:19 +0100 |
| commit | 1be5537b92ffe8502739dfd6d349c9f3e80c9ac7 (patch) | |
| tree | b6a1cc4244c81180fe3bf36780f23e28ef681454 /Examples/MicrophoneCS/MicrophoneCS.cs | |
| parent | 850bf49466c15214fc5c232cad268662df6ad68a (diff) | |
C# microphone example, diarize integration
Diffstat (limited to 'Examples/MicrophoneCS/MicrophoneCS.cs')
| -rw-r--r-- | Examples/MicrophoneCS/MicrophoneCS.cs | 5 |
1 files changed, 4 insertions, 1 deletions
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(); |
