From f0752be4aae31d582f63ab0830c6b01dc4d2b1c7 Mon Sep 17 00:00:00 2001 From: Ettore Di Giacinto Date: Thu, 14 Mar 2024 19:24:50 +0100 Subject: [PATCH] fix: adapt tts CLI --- main.go | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) 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 }