mirror of
https://github.com/mudler/LocalAI.git
synced 2026-08-02 03:20:12 -04:00
fix: adapt tts CLI
This commit is contained in:
8
main.go
8
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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user