Skip to content

Commit

Permalink
detected as string
Browse files Browse the repository at this point in the history
  • Loading branch information
Mac Mini M2 authored and Mac Mini M2 committed Nov 4, 2024
1 parent db04d09 commit 104a828
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions bindings/go/pkg/whisper/context.go
Original file line number Diff line number Diff line change
Expand Up @@ -62,8 +62,8 @@ func (context *context) IsMultilingual() bool {
return context.model.IsMultilingual()
}

func (context *context) GetLangId() int {
return context.model.GetLangId()
func (context *context) GetLangStr() string {
return context.model.GetLangStr()
}


Expand Down
4 changes: 2 additions & 2 deletions bindings/go/pkg/whisper/interface.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ type Model interface {

// Return true if the model is multilingual.
IsMultilingual() bool
GetLangId() int
GetLangStr() string

// Return all languages supported.
Languages() []string
Expand All @@ -37,7 +37,7 @@ type Context interface {
SetLanguage(string) error // Set the language to use for speech recognition, use "auto" for auto detect language.
SetTranslate(bool) // Set translate flag
IsMultilingual() bool // Return true if the model is multilingual.
GetLangId() int
GetLangStr() string
Language() string // Get language

SetOffset(time.Duration) // Set offset
Expand Down
4 changes: 2 additions & 2 deletions bindings/go/pkg/whisper/model.go
Original file line number Diff line number Diff line change
Expand Up @@ -70,8 +70,8 @@ func (model *model) IsMultilingual() bool {
}

// Return detected lang id
func (model *model) GetLangId() int {
return model.ctx.Whisper_full_lang_id()
func (model *model) GetLangStr() string {
return whisper.Whisper_lang_str(model.ctx.Whisper_full_lang_id())
}


Expand Down

0 comments on commit 104a828

Please sign in to comment.