From dacad9a4f6c59e81b7220666706ef57426f8c95e Mon Sep 17 00:00:00 2001 From: xzeldon Date: Sat, 7 Oct 2023 22:20:26 +0300 Subject: [PATCH] add method to set source language --- pkg/whisper/FullParams.go | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/pkg/whisper/FullParams.go b/pkg/whisper/FullParams.go index cb49136..70cc963 100644 --- a/pkg/whisper/FullParams.go +++ b/pkg/whisper/FullParams.go @@ -86,6 +86,16 @@ func (this *FullParams) RemoveFlags(newflag eFullParamsFlags) { this.cStruct.Flags = this.cStruct.Flags ^ newflag } +func (this *FullParams) SetLanguage(language eLanguage) { + if this == nil { + return + } else if this.cStruct == nil { + return + } + + this.cStruct.Language = language +} + /*using pfnNewSegment = HRESULT( __cdecl* )( iContext* ctx, uint32_t n_new, void* user_data ) noexcept;*/ type NewSegmentCallback_Type func(context *IContext, n_new uint32, user_data unsafe.Pointer) EWhisperHWND