mirror of
https://github.com/FloatTech/ZeroBot-Plugin.git
synced 2025-12-19 13:59:39 +08:00
fix tts
This commit is contained in:
parent
b8da6f8cfd
commit
19e3688499
@ -174,7 +174,7 @@ func init() { // 插件主体
|
|||||||
}
|
}
|
||||||
rec, err := speaker.Speak(ctx.Event.UserID, func() string { return reply })
|
rec, err := speaker.Speak(ctx.Event.UserID, func() string { return reply })
|
||||||
if err != nil {
|
if err != nil {
|
||||||
ctx.SendChain(message.Text("ERROR: ", err))
|
ctx.SendChain(message.Reply(ctx.Event.MessageID), message.Text(reply))
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
// 发送语音
|
// 发送语音
|
||||||
@ -213,7 +213,7 @@ func init() { // 插件主体
|
|||||||
logrus.Debugln("[tts] got sound mode, speaking...")
|
logrus.Debugln("[tts] got sound mode, speaking...")
|
||||||
rec, err := speaker.Speak(ctx.Event.UserID, func() string { return banner })
|
rec, err := speaker.Speak(ctx.Event.UserID, func() string { return banner })
|
||||||
if err != nil {
|
if err != nil {
|
||||||
ctx.SendChain(message.Text("ERROR: ", err))
|
ctx.SendChain(message.Reply(ctx.Event.MessageID), message.Text("无法发送测试语音,请重试。"))
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
logrus.Debugln("[tts] sending...")
|
logrus.Debugln("[tts] sending...")
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user