mirror of
https://github.com/mudler/LocalAI.git
synced 2025-03-22 03:55:35 +00:00
fix(tts): check error before inspecting result (#3415)
Otherwise we panic when a res is nil Signed-off-by: Ettore Di Giacinto <mudler@localai.io>
This commit is contained in:
parent
6a6094a58d
commit
da3bc8077d
@ -78,6 +78,9 @@ func ModelTTS(
|
||||
Dst: filePath,
|
||||
Language: &language,
|
||||
})
|
||||
if err != nil {
|
||||
return "", nil, err
|
||||
}
|
||||
|
||||
// return RPC error if any
|
||||
if !res.Success {
|
||||
|
Loading…
x
Reference in New Issue
Block a user