From f043fbf0c022fc54d2b48ecff5a5088ea90e379c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=BA=90=E6=96=87=E9=9B=A8?= <41315874+fumiama@users.noreply.github.com> Date: Sun, 27 Aug 2023 23:30:26 +0800 Subject: [PATCH] fix: tts speaker --- plugin/ai_reply/ai_tts.go | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/plugin/ai_reply/ai_tts.go b/plugin/ai_reply/ai_tts.go index 38a75374e2..eaa7579e72 100644 --- a/plugin/ai_reply/ai_tts.go +++ b/plugin/ai_reply/ai_tts.go @@ -23,10 +23,10 @@ import ( // 数据结构: [4 bits] [4 bits] [8 bits] // [ttscn模式] [百度模式] [tts模式] -// [tts模式]: 0~255 genshin 256 baidu 257 ttscn +// [tts模式]: 0~200 genshin 201 baidu 202 ttscn const ( - lastgsttsindex = 255 + iota + lastgsttsindex = 200 + iota baiduttsindex ttscnttsindex ) @@ -111,7 +111,7 @@ func (r replymode) getReplyMode(ctx *zero.Ctx) aireply.AIReply { } var ttsins = func() map[string]tts.TTS { - m := make(map[string]tts.TTS, 128) + m := make(map[string]tts.TTS, 512) for _, mode := range append(genshin.SoundList[:], extrattsname...) { m[mode] = nil } @@ -119,8 +119,8 @@ var ttsins = func() map[string]tts.TTS { }() var ttsModes = func() []string { - s := append(genshin.SoundList[:], make([]string, lastgsttsindex-len(genshin.SoundList))...) // 0-255 - s = append(s, extrattsname...) // 256 257 ... + s := append(genshin.SoundList[:], make([]string, lastgsttsindex-len(genshin.SoundList))...) // 0-200 + s = append(s, extrattsname...) // 201 202 ... return s }()