mirror of
https://github.com/AstrBotDevs/AstrBot
synced 2026-07-16 01:40:15 +08:00
feat: 给添加 edge_tts 新增 rate, volume, pitch 参数 (#2625)
* 修复python执行器文件上传qq提示参数错误问题,修改策略为本地url * 给edge_tts 添加3个默认参数,方便通过ui配置
This commit is contained in:
@@ -866,6 +866,9 @@ CONFIG_METADATA_2 = {
|
||||
"provider_type": "text_to_speech",
|
||||
"enable": False,
|
||||
"edge-tts-voice": "zh-CN-XiaoxiaoNeural",
|
||||
"rate": "+0%",
|
||||
"volume": "+0%",
|
||||
"pitch": "+0Hz",
|
||||
"timeout": 20,
|
||||
},
|
||||
"GSV TTS(本地加载)": {
|
||||
|
||||
@@ -463,11 +463,11 @@ class Main(star.Star):
|
||||
yield event.image_result(image_path)
|
||||
elif match.group(1) == "FILE":
|
||||
file_path = os.path.join(workplace_path, match.group(2))
|
||||
logger.debug(f"Sending file: {file_path}")
|
||||
file_s3_url = await self.file_upload(file_path)
|
||||
logger.info(f"文件上传到 AstrBot 云节点: {file_s3_url}")
|
||||
# logger.debug(f"Sending file: {file_path}")
|
||||
# file_s3_url = await self.file_upload(file_path)
|
||||
# logger.info(f"文件上传到 AstrBot 云节点: {file_s3_url}")
|
||||
file_name = os.path.basename(file_path)
|
||||
chain = [File(name=file_name, file=file_s3_url)]
|
||||
chain = [File(name=file_name, file=file_path)]
|
||||
yield event.set_result(MessageEventResult(chain=chain))
|
||||
|
||||
elif "Traceback (most recent call last)" in log or "[Error]: " in log:
|
||||
|
||||
Reference in New Issue
Block a user