mirror of
https://github.com/mudler/LocalAI.git
synced 2025-05-28 14:35:00 +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
1 changed files with 3 additions and 0 deletions
|
@ -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…
Add table
Add a link
Reference in a new issue