From e1e3ac09a97d602a6ea60ff1928de77de81d99a7 Mon Sep 17 00:00:00 2001 From: Konstantin Date: Sat, 28 Jan 2023 15:18:02 +0100 Subject: DLL API for diarize feature --- WhisperNet/API/eSpeakerChannel.cs | 15 +++++++++++++++ WhisperNet/Internal/iContext.cs | 4 ++++ 2 files changed, 19 insertions(+) create mode 100644 WhisperNet/API/eSpeakerChannel.cs (limited to 'WhisperNet') diff --git a/WhisperNet/API/eSpeakerChannel.cs b/WhisperNet/API/eSpeakerChannel.cs new file mode 100644 index 0000000..edb96e0 --- /dev/null +++ b/WhisperNet/API/eSpeakerChannel.cs @@ -0,0 +1,15 @@ +namespace Whisper +{ + /// Output value for iContext.detectSpeaker method + public enum eSpeakerChannel: byte + { + /// Unable to detect + Unsure = 0, + /// The speech was mostly in the left channel + Left = 1, + /// The speech was mostly in the right channel + Right = 2, + /// The audio only has 1 channel + NoStereoData = 0xFF, + } +} \ No newline at end of file diff --git a/WhisperNet/Internal/iContext.cs b/WhisperNet/Internal/iContext.cs index 6adf8c5..010c139 100644 --- a/WhisperNet/Internal/iContext.cs +++ b/WhisperNet/Internal/iContext.cs @@ -21,6 +21,10 @@ namespace Whisper.Internal [RetValIndex( 1 )] iTranscribeResult getResults( eResultFlags flags ); + /// Try to detect speaker by comparing channels of the stereo PCM data + [RetValIndex( 1 )] + eSpeakerChannel detectSpeaker( [In] ref sTimeInterval interval ); + /// Get the model which was used to create this context [RetValIndex] iModel getModel(); -- cgit v1.2.3