From 8c4603c73675958efc960fbd4bb599a2909d106a Mon Sep 17 00:00:00 2001 From: Konstantin Date: Mon, 16 Jan 2023 14:52:43 +0100 Subject: Source codes --- WhisperNet/API/sCaptureParams.cs | 37 +++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 WhisperNet/API/sCaptureParams.cs (limited to 'WhisperNet/API/sCaptureParams.cs') diff --git a/WhisperNet/API/sCaptureParams.cs b/WhisperNet/API/sCaptureParams.cs new file mode 100644 index 0000000..7595a69 --- /dev/null +++ b/WhisperNet/API/sCaptureParams.cs @@ -0,0 +1,37 @@ +namespace Whisper +{ + /// Flags for the audio capture + [Flags] + public enum eCaptureFlags: uint + { + /// No special flags + None = 0, + /// When the capture device supports stereo, keep stereo PCM samples in addition to mono + Stereo = 1, + } + + /// Parameters for audio capture + public struct sCaptureParams + { + /// Minimum transcribe duration in seconds + public float minDuration; + /// Maximum transcribe duration in seconds + public float maxDuration; + /// + public float dropStartSilence; + /// + public float pauseDuration; + /// Flags for the audio capture + public eCaptureFlags flags; + + /// Initialize the structure with some reasonable default values + public sCaptureParams() + { + minDuration = 7.0f; // 7 seconds + maxDuration = 11.0f; // 11 seconds + dropStartSilence = 0.25f; // 250 ms + pauseDuration = 0.333f; // 333 ms + flags = eCaptureFlags.None; + } + } +} \ No newline at end of file -- cgit v1.2.3