Skip to content

Commit

Permalink
fix help
Browse files Browse the repository at this point in the history
  • Loading branch information
fumiama committed Apr 7, 2023
1 parent f1e49dc commit 635eb98
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 21 deletions.
38 changes: 20 additions & 18 deletions plugin/ai_reply/ai_tts.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,25 @@ const (
// extrattsname is the tts other than genshin vits
var extrattsname = []string{"百度", "TTSCN"}

var ttscnspeakers = [...]string{
"晓晓(女 - 年轻人)",
"云扬(男 - 年轻人)",
"晓辰(女 - 年轻人 - 抖音热门)",
"晓涵(女 - 年轻人)",
"晓墨(女 - 年轻人)",
"晓秋(女 - 中年人)",
"晓睿(女 - 老年)",
"晓双(女 - 儿童)",
"晓萱(女 - 年轻人)",
"晓颜(女 - 年轻人)",
"晓悠(女 - 儿童)",
"云希(男 - 年轻人 - 抖音热门)",
"云野(男 - 中年人)",
"晓梦(女 - 年轻人)",
"晓伊(女 - 儿童)",
"晓甄(女 - 年轻人)",
}

const (
defaultttsindexkey = -2905
gsapikeyextragrp = -1
Expand Down Expand Up @@ -224,24 +243,7 @@ func (t *ttsmode) getSoundMode(ctx *zero.Ctx) (tts.TTS, error) {
ins = baidutts.NewBaiduTTS(int(i&0x0f00) >> 8)
case extrattsname[1]:
var err error
ins, err = ttscn.NewTTSCN("中文(普通话,简体)", [...]string{
"晓晓(女 - 年轻人)",
"云扬(男 - 年轻人)",
"晓辰(女 - 年轻人 - 抖音热门)",
"晓涵(女 - 年轻人)",
"晓墨(女 - 年轻人)",
"晓秋(女 - 中年人)",
"晓睿(女 - 老年)",
"晓双(女 - 儿童)",
"晓萱(女 - 年轻人)",
"晓颜(女 - 年轻人)",
"晓悠(女 - 儿童)",
"云希(男 - 年轻人 - 抖音热门)",
"云野(男 - 中年人)",
"晓梦(女 - 年轻人)",
"晓伊(女 - 儿童)",
"晓甄(女 - 年轻人)",
}[int(i&0xf000)>>12], ttscn.KBRates[0])
ins, err = ttscn.NewTTSCN("中文(普通话,简体)", ttscnspeakers[int(i&0xf000)>>12], ttscn.KBRates[0])
if err != nil {
return nil, err
}
Expand Down
7 changes: 4 additions & 3 deletions plugin/ai_reply/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,12 @@ func init() { // 插件主体
DisableOnDefault: true,
Brief: "人工智能语音回复",
Help: "- @Bot 任意文本(任意一句话回复)\n" +
"- 设置语音模式[原神人物/百度/ttscn] 数字(百度/ttscn模式)\n" +
"- 设置默认语音模式[原神人物/百度/ttscn] 数字(百度/ttscn模式)\n" +
"- 设置语音模式[原神人物/百度/TTSCN] 数字(百度/TTSCN说话人)\n" +
"- 设置默认语音模式[原神人物/百度/TTSCN] 数字(百度/TTSCN说话人)\n" +
"- 恢复成默认语音模式\n" +
"- 设置原神语音 api key xxxxxx (key请加开发群获得)\n" +
"当前适用的原神人物含有以下:\n" + list(genshin.SoundList[:], 5),
"当前适用的原神人物含有以下: \n" + list(genshin.SoundList[:], 5) +
"\n当前适用的TTSCN人物含有以下(以数字顺序代表): \n" + list(ttscnspeakers[:], 5),
})

enr := control.Register("aireply", &ctrl.Options[*zero.Ctx]{
Expand Down

0 comments on commit 635eb98

Please sign in to comment.