#pragma warning disable CS0649 // Field is never assigned to
// Missing XML comment for publicly visible type or member
// TODO: remove this line and document them.
#pragma warning disable CS1591
using System.Runtime.InteropServices;
namespace Whisper.Internals
{
/// This callback is called on each new segment
[UnmanagedFunctionPointer( CallingConvention.Cdecl )]
delegate int pfnNewSegment( IntPtr ctx, int countNew, IntPtr userData );
/// The callback is called before every encoder run. If it returns S_FALSE, the processing is aborted.
[UnmanagedFunctionPointer( CallingConvention.Cdecl )]
delegate int pfnEncoderBegin( IntPtr ctx, IntPtr userData );
/// Transcribe parameters
public struct sFullParams
{
internal Parameters publicParams;
// The rest of these parameters are not exposed to the user-friendly public API of this DLL
internal IntPtr prompt_tokens;
internal int prompt_n_tokens;
/// This callback is called on each new segment
[MarshalAs( UnmanagedType.FunctionPtr )]
internal pfnNewSegment? newSegmentCallback;
/// Parameter for the above, not needed in C#
internal IntPtr newSegmentCallbackData;
/// The callback is called before every encoder run. If it returns false, the processing is aborted
[MarshalAs( UnmanagedType.FunctionPtr )]
internal pfnEncoderBegin? encoderBeginCallback;
/// Parameter for the above, not needed in C#
internal IntPtr encoderBeginCallbackData;
}
}