diff --git a/bindings/go/params.go b/bindings/go/params.go index 1ddcbeaa..b480ccf8 100644 --- a/bindings/go/params.go +++ b/bindings/go/params.go @@ -19,6 +19,10 @@ func (p *Params) SetTranslate(v bool) { p.translate = toBool(v) } +func (p *Params) SetSplitOnWord(v bool) { + p.split_on_word = toBool(v) +} + func (p *Params) SetNoContext(v bool) { p.no_context = toBool(v) } diff --git a/bindings/go/pkg/whisper/context.go b/bindings/go/pkg/whisper/context.go index 0db27705..6f3c2c74 100644 --- a/bindings/go/pkg/whisper/context.go +++ b/bindings/go/pkg/whisper/context.go @@ -81,6 +81,10 @@ func (context *context) SetSpeedup(v bool) { context.params.SetSpeedup(v) } +func (context *context) SetSplitOnWord(v bool) { + context.params.SetSplitOnWord(v) +} + // Set number of threads to use func (context *context) SetThreads(v uint) { context.params.SetThreads(int(v)) diff --git a/bindings/go/pkg/whisper/interface.go b/bindings/go/pkg/whisper/interface.go index dc9c66df..771961ab 100644 --- a/bindings/go/pkg/whisper/interface.go +++ b/bindings/go/pkg/whisper/interface.go @@ -42,6 +42,7 @@ type Context interface { SetDuration(time.Duration) // Set duration SetThreads(uint) // Set number of threads to use SetSpeedup(bool) // Set speedup flag + SetSplitOnWord(bool) // Set split on word flag SetTokenThreshold(float32) // Set timestamp token probability threshold SetTokenSumThreshold(float32) // Set timestamp token sum probability threshold SetMaxSegmentLength(uint) // Set max segment length in characters