diff --git a/main.go b/main.go index 93ff5301..169c3400 100644 --- a/main.go +++ b/main.go @@ -394,6 +394,12 @@ For a list of compatible model, check out: https://localai.io/model-compatibilit Usage: "Model name to run the TTS", Required: true, }, + &cli.StringFlag{ + Name: "voice", + Aliases: []string{"v"}, + Usage: "Voice name to run the TTS (optional)", + Required: true, + }, &cli.StringFlag{ Name: "output-file", Aliases: []string{"o"}, @@ -427,7 +433,7 @@ For a list of compatible model, check out: https://localai.io/model-compatibilit defer ml.StopAllGRPC() - filePath, _, err := backend.ModelTTS(backendOption, text, modelOption, ml, opts, config.BackendConfig{}) + filePath, _, err := backend.ModelTTS(backendOption, text, modelOption, ctx.String("voice"), ml, opts, config.BackendConfig{}) if err != nil { return err }