nonebot / adapter-red

NoneBot2 基于 Red 协议 的 QQNT 适配器
MIT License
124 stars 10 forks source link

[Bug]: 使用MessageSegment.voice无法成功发送语音 #21

Closed okashi-ya closed 1 year ago

okashi-ya commented 1 year ago

确认项

操作系统

Windows

Python 版本

3.8.16

NoneBot 版本

2.1.1

适配器

0.5.2

协议端

0.0.52

描述问题

使用MessageSegment.voice无法发送语音

复现步骤

1.使用MessageSegment.voice发送语音 (语音路径是正确的 image 这里是可以成功读取到语音文件的数据的) 语音格式为wav 之前在gocq上用CQ码发送是正常的

期望的结果

期望可以正确发送语音 日志没有报错 但在NTQQ侧显示发送了一条语音(但点开会提示InitFromFile Fail) 在群聊侧会显示为一张无法打开的图片 image image

截图或日志

10-13 20:21:24 [INFO] nonebot | Event will be handled by Matcher(type='message', module=plugins.t.t, lineno=17) 10-13 20:21:24 [DEBUG] nonebot | Running Matcher(type='message', module=plugins.t.t, lineno=17) 10-13 20:21:24 [DEBUG] nonebot | Running handler Dependent(call=handle) 10-13 20:21:24 [DEBUG] nonebot | Running handler Dependent(call=handle_get_param) 10-13 20:21:24 [DEBUG] nonebot | Handler Dependent(call=handle_getparam) skipped 10-13 20:21:24 [DEBUG] nonebot | Running handler Dependent(call=) 10-13 20:21:24 [DEBUG] nonebot | RedProtocol | Calling API send_message 10-13 20:21:25 [INFO] nonebot | Matcher(type='message', module=plugins.t.t, lineno=17) running complete 10-13 20:21:25 [DEBUG] nonebot | Stop event propagation 10-13 20:21:25 [DEBUG] nonebot | Checking for matchers completed

Nonebot 配置项

No response

RF-Tar-Railt commented 1 year ago

chronocat 的语音发送需要手动将语音文件转为 .silk格式 所以这与适配器无关,你可以前往 https://github.com/chrononeko/bugtracker 提相关问题