Skip to content

Commit b1c51d3

Browse files
committed
Removed ggml log set
1 parent 47c3325 commit b1c51d3

File tree

8 files changed

+0
-31
lines changed

8 files changed

+0
-31
lines changed

Whisper.net/Internals/Native/INativeWhisper.cs

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -76,9 +76,6 @@ internal interface INativeWhisper : IDisposable
7676
[UnmanagedFunctionPointer(CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
7777
public delegate IntPtr whisper_full_get_token_text_from_state(IntPtr context, IntPtr state, int segmentIndex, int tokenIndex);
7878

79-
[UnmanagedFunctionPointer(CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
80-
public delegate void ggml_log_set(IntPtr logCallback, IntPtr user_data);
81-
8279
[UnmanagedFunctionPointer(CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
8380
public delegate IntPtr whisper_print_system_info();
8481

@@ -105,7 +102,5 @@ internal interface INativeWhisper : IDisposable
105102
whisper_ctx_init_openvino_encoder_with_state Whisper_Ctx_Init_Openvino_Encoder_With_State { get; }
106103
whisper_full_get_token_data_from_state Whisper_Full_Get_Token_Data_From_State { get; }
107104
whisper_full_get_token_text_from_state Whisper_Full_Get_Token_Text_From_State { get; }
108-
ggml_log_set Ggml_log_set { get; }
109-
110105
whisper_print_system_info WhisperPrintSystemInfo { get; }
111106
}

Whisper.net/Internals/Native/Implementations/DllImportsNativeLibWhisper.cs

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -79,9 +79,6 @@ internal class DllImportsNativeLibWhisper : INativeWhisper
7979
[DllImport(NativeConstants.LibWhisperLibraryName, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
8080
public static extern IntPtr whisper_full_get_token_text_from_state(IntPtr context, IntPtr state, int segmentIndex, int tokenIndex);
8181

82-
[DllImport(NativeConstants.LibGgmlWhisperLibraryName, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
83-
public static extern void ggml_log_set(IntPtr logCallback, IntPtr user_data);
84-
8582
[DllImport(NativeConstants.LibWhisperLibraryName, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
8683
public static extern IntPtr whisper_print_system_info();
8784

@@ -131,8 +128,6 @@ internal class DllImportsNativeLibWhisper : INativeWhisper
131128

132129
public INativeWhisper.whisper_full_get_token_text_from_state Whisper_Full_Get_Token_Text_From_State => whisper_full_get_token_text_from_state;
133130

134-
public INativeWhisper.ggml_log_set Ggml_log_set => ggml_log_set;
135-
136131
public INativeWhisper.whisper_print_system_info WhisperPrintSystemInfo => whisper_print_system_info;
137132

138133
public void Dispose()

Whisper.net/Internals/Native/Implementations/DllImportsNativeWhisper.cs

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -79,9 +79,6 @@ internal class DllImportsNativeWhisper : INativeWhisper
7979
[DllImport(NativeConstants.WhisperLibraryName, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
8080
public static extern IntPtr whisper_full_get_token_text_from_state(IntPtr context, IntPtr state, int segmentIndex, int tokenIndex);
8181

82-
[DllImport(NativeConstants.GgmlWhisperLibraryName, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
83-
public static extern void ggml_log_set(IntPtr logCallback, IntPtr user_data);
84-
8582
[DllImport(NativeConstants.WhisperLibraryName, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
8683
public static extern IntPtr whisper_print_system_info();
8784

@@ -131,8 +128,6 @@ internal class DllImportsNativeWhisper : INativeWhisper
131128

132129
public INativeWhisper.whisper_full_get_token_text_from_state Whisper_Full_Get_Token_Text_From_State => whisper_full_get_token_text_from_state;
133130

134-
public INativeWhisper.ggml_log_set Ggml_log_set => ggml_log_set;
135-
136131
public INativeWhisper.whisper_print_system_info WhisperPrintSystemInfo => whisper_print_system_info;
137132

138133
public void Dispose()

Whisper.net/Internals/Native/Implementations/LibraryImportInternalWhisper.cs

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -79,9 +79,6 @@ internal partial class LibraryImportInternalWhisper : INativeWhisper
7979
[LibraryImport(NativeConstants.InternalLibraryName, StringMarshalling = StringMarshalling.Utf8)]
8080
public static partial IntPtr whisper_full_get_token_text_from_state(IntPtr context, IntPtr state, int segmentIndex, int tokenIndex);
8181

82-
[LibraryImport(NativeConstants.InternalLibraryName, StringMarshalling = StringMarshalling.Utf8)]
83-
public static partial void ggml_log_set(IntPtr logCallback, IntPtr user_data);
84-
8582
[LibraryImport(NativeConstants.InternalLibraryName, StringMarshalling = StringMarshalling.Utf8)]
8683
public static partial IntPtr whisper_print_system_info();
8784

@@ -131,8 +128,6 @@ internal partial class LibraryImportInternalWhisper : INativeWhisper
131128

132129
public INativeWhisper.whisper_full_get_token_text_from_state Whisper_Full_Get_Token_Text_From_State => whisper_full_get_token_text_from_state;
133130

134-
public INativeWhisper.ggml_log_set Ggml_log_set => ggml_log_set;
135-
136131
public INativeWhisper.whisper_print_system_info WhisperPrintSystemInfo => whisper_print_system_info;
137132

138133
public void Dispose()

Whisper.net/Internals/Native/Implementations/LibraryImportLibWhisper.cs

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -80,9 +80,6 @@ internal partial class LibraryImportLibWhisper : INativeWhisper
8080
[LibraryImport(NativeConstants.LibWhisperLibraryName, StringMarshalling = StringMarshalling.Utf8)]
8181
public static partial IntPtr whisper_full_get_token_text_from_state(IntPtr context, IntPtr state, int segmentIndex, int tokenIndex);
8282

83-
[LibraryImport(NativeConstants.LibGgmlWhisperLibraryName, StringMarshalling = StringMarshalling.Utf8)]
84-
public static partial void ggml_log_set(IntPtr logCallback, IntPtr user_data);
85-
8683
[LibraryImport(NativeConstants.LibWhisperLibraryName, StringMarshalling = StringMarshalling.Utf8)]
8784
public static partial IntPtr whisper_print_system_info();
8885

@@ -132,8 +129,6 @@ internal partial class LibraryImportLibWhisper : INativeWhisper
132129

133130
public INativeWhisper.whisper_full_get_token_text_from_state Whisper_Full_Get_Token_Text_From_State => whisper_full_get_token_text_from_state;
134131

135-
public INativeWhisper.ggml_log_set Ggml_log_set => ggml_log_set;
136-
137132
public INativeWhisper.whisper_print_system_info WhisperPrintSystemInfo => whisper_print_system_info;
138133

139134
public void Dispose()

Whisper.net/Internals/Native/Implementations/NativeConstants.cs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,7 @@ internal static class NativeConstants
66
private const string libPrefix = "lib";
77

88
public const string WhisperLibraryName = "whisper";
9-
public const string GgmlWhisperLibraryName = "ggml-whisper";
109
public const string LibWhisperLibraryName = libPrefix + WhisperLibraryName;
11-
public const string LibGgmlWhisperLibraryName = libPrefix + GgmlWhisperLibraryName;
1210

1311
public const string InternalLibraryName = "__Internal";
1412
}

Whisper.net/Internals/Native/Implementations/NativeLibraryWhisper.cs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,6 @@ public NativeLibraryWhisper(IntPtr whisperLibraryHandle, IntPtr ggmlLibraryHandl
3636
Whisper_Ctx_Init_Openvino_Encoder_With_State = Marshal.GetDelegateForFunctionPointer<whisper_ctx_init_openvino_encoder_with_state>(NativeLibrary.GetExport(whisperLibraryHandle, nameof(whisper_ctx_init_openvino_encoder_with_state)));
3737
Whisper_Full_Get_Token_Data_From_State = Marshal.GetDelegateForFunctionPointer<whisper_full_get_token_data_from_state>(NativeLibrary.GetExport(whisperLibraryHandle, nameof(whisper_full_get_token_data_from_state)));
3838
Whisper_Full_Get_Token_Text_From_State = Marshal.GetDelegateForFunctionPointer<whisper_full_get_token_text_from_state>(NativeLibrary.GetExport(whisperLibraryHandle, nameof(whisper_full_get_token_text_from_state)));
39-
Ggml_log_set = Marshal.GetDelegateForFunctionPointer<ggml_log_set>(NativeLibrary.GetExport(ggmlLibraryHandle, nameof(ggml_log_set)));
4039
WhisperPrintSystemInfo = Marshal.GetDelegateForFunctionPointer<whisper_print_system_info>(NativeLibrary.GetExport(whisperLibraryHandle, nameof(whisper_print_system_info)));
4140

4241
this.whisperLibraryHandle = whisperLibraryHandle;
@@ -89,8 +88,6 @@ public NativeLibraryWhisper(IntPtr whisperLibraryHandle, IntPtr ggmlLibraryHandl
8988

9089
public whisper_full_get_token_text_from_state Whisper_Full_Get_Token_Text_From_State { get; }
9190

92-
public ggml_log_set Ggml_log_set { get; }
93-
9491
public whisper_print_system_info WhisperPrintSystemInfo { get; }
9592

9693
public void Dispose()

Whisper.net/Logger/LogProvider.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,6 @@ internal static void InitializeLogging(INativeWhisper nativeWhisper)
5050
funcPointer = (IntPtr)onLogging;
5151
}
5252
#endif
53-
nativeWhisper.Ggml_log_set(funcPointer, IntPtr.Zero);
5453
nativeWhisper.Whisper_Log_Set(funcPointer, IntPtr.Zero);
5554
}
5655

0 commit comments

Comments
 (0)