mirror of
https://github.com/xzeldon/whisper-api-server.git
synced 2025-07-13 03:04:36 +03:00
Feat/accept cmd args (#2)
* make working dir as executable dir * Add support for cli args
This commit is contained in:
@ -15,7 +15,7 @@ type WhisperState struct {
|
||||
mutex sync.Mutex
|
||||
}
|
||||
|
||||
func InitializeWhisperState(modelPath string) (*WhisperState, error) {
|
||||
func InitializeWhisperState(modelPath string, lang int32) (*WhisperState, error) {
|
||||
lib, err := whisper.New(whisper.LlDebug, whisper.LfUseStandardError, nil)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
@ -41,6 +41,8 @@ func InitializeWhisperState(modelPath string) (*WhisperState, error) {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
params.SetLanguage(lang)
|
||||
|
||||
fmt.Printf("Params CPU Threads : %d\n", params.CpuThreads())
|
||||
|
||||
return &WhisperState{
|
||||
|
Reference in New Issue
Block a user