mirror of
https://github.com/mudler/LocalAI.git
synced 2025-05-29 06:54:59 +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,
|
Dst: filePath,
|
||||||
Language: &language,
|
Language: &language,
|
||||||
})
|
})
|
||||||
|
if err != nil {
|
||||||
|
return "", nil, err
|
||||||
|
}
|
||||||
|
|
||||||
// return RPC error if any
|
// return RPC error if any
|
||||||
if !res.Success {
|
if !res.Success {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue