|
@@ -6,9 +6,11 @@ import time
|
|
|
import re
|
|
import re
|
|
|
from wakeonlan import send_magic_packet
|
|
from wakeonlan import send_magic_packet
|
|
|
from ai_pic import story_start, story_start_p2p, story_start_p2p_sese
|
|
from ai_pic import story_start, story_start_p2p, story_start_p2p_sese
|
|
|
-from msg_send_save import send_private_message_word,save_group_message,send_group_message_pic,send_group_message_word,send_group_poke,del_group_message
|
|
|
|
|
|
|
+from msg_send_save import (send_private_message_word,save_group_message,send_group_message_pic,send_group_message_word,
|
|
|
|
|
+ send_group_poke,del_group_message,send_group_vioce)
|
|
|
from chat_model import AI_chat,AI_get_picprompt,AI_lora_getpic_prompt,AI_sendphoto_ornot
|
|
from chat_model import AI_chat,AI_get_picprompt,AI_lora_getpic_prompt,AI_sendphoto_ornot
|
|
|
from special_date import get_week,get_v50,get_holidays
|
|
from special_date import get_week,get_v50,get_holidays
|
|
|
|
|
+from tts import get_free_tts
|
|
|
from config import config_get
|
|
from config import config_get
|
|
|
import random
|
|
import random
|
|
|
import os
|
|
import os
|
|
@@ -88,6 +90,7 @@ def on_command(group_id, user_id,command):
|
|
|
/王石:查询王石效果
|
|
/王石:查询王石效果
|
|
|
/猫猫画画:调用自定义AI绘画功能
|
|
/猫猫画画:调用自定义AI绘画功能
|
|
|
/整点瑟瑟:不用我多说了吧
|
|
/整点瑟瑟:不用我多说了吧
|
|
|
|
|
+/语音合成+角色名称:合成AI语音(测试用,目前支持诺艾尔,芙宁娜,神里绫华,迪卢克
|
|
|
所有命令均需要@猫猫触发"""
|
|
所有命令均需要@猫猫触发"""
|
|
|
send_group_message_word(group_id, home)
|
|
send_group_message_word(group_id, home)
|
|
|
save_group_message(group_id, my_name, home)
|
|
save_group_message(group_id, my_name, home)
|
|
@@ -116,6 +119,25 @@ def on_command(group_id, user_id,command):
|
|
|
message_id = send_group_message_pic(group_id, user_id, story_start("nsfw,"+AI_lora_getpic_prompt(pic_word)))['data']['message_id']
|
|
message_id = send_group_message_pic(group_id, user_id, story_start("nsfw,"+AI_lora_getpic_prompt(pic_word)))['data']['message_id']
|
|
|
time.sleep(8)
|
|
time.sleep(8)
|
|
|
del_group_message(message_id)
|
|
del_group_message(message_id)
|
|
|
|
|
+ elif str(command).startswith("/语音合成"):
|
|
|
|
|
+ send_group_message_word(group_id, "语音合成开始")
|
|
|
|
|
+ if str(command).startswith("/语音合成诺艾尔"):
|
|
|
|
|
+ name = "诺艾尔"
|
|
|
|
|
+ text = str(command)[len("/语音合成诺艾尔"):]
|
|
|
|
|
+ elif str(command).startswith("/语音合成芙宁娜"):
|
|
|
|
|
+ name = "芙宁娜"
|
|
|
|
|
+ text = str(command)[len("/语音合成芙宁娜"):]
|
|
|
|
|
+ elif str(command).startswith("/语音合成神里绫华"):
|
|
|
|
|
+ name = "神里绫华"
|
|
|
|
|
+ text = str(command)[len("/语音合成神里绫华"):]
|
|
|
|
|
+ elif str(command).startswith("/语音合成迪卢克"):
|
|
|
|
|
+ name = "迪卢克"
|
|
|
|
|
+ text = str(command)[len("/语音合成迪卢克"):]
|
|
|
|
|
+ result = get_free_tts(name, text)
|
|
|
|
|
+ if result.startswith("https"):
|
|
|
|
|
+ send_group_vioce(group_id, result)
|
|
|
|
|
+ else:
|
|
|
|
|
+ send_group_message_word(group_id, "语音合成失败!")
|
|
|
|
|
|
|
|
else:
|
|
else:
|
|
|
error = "抱歉没有找到你所输入的命令!如有关于命令的问题请@猫猫输入/菜单进行查询\n示例:\n@猫猫 /菜单"
|
|
error = "抱歉没有找到你所输入的命令!如有关于命令的问题请@猫猫输入/菜单进行查询\n示例:\n@猫猫 /菜单"
|