fix: adapt tts CLI

This commit is contained in:
Ettore Di Giacinto 2024-03-14 19:24:50 +01:00
parent bafc9effad
commit f0752be4aa

View file

@ -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
}