Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: 发送tencent标准的silk语音时,好友私聊发送正常并可以播放,群组发送后PC端无法播放,手机端正常 #26

Closed
4 tasks done
okashi-ya opened this issue Oct 15, 2023 · 2 comments
Labels
bug Something isn't working

Comments

@okashi-ya
Copy link
Contributor

确认项

  • 问题的标题明确
  • 我翻阅过其他的 issue 并且找不到类似的问题
  • 我已经阅读了相关文档 并仍然认为这是一个 Bug
  • 我已经尝试过在最新的代码中修复这个问题

操作系统

Windows

Python 版本

3.8.16

NoneBot 版本

2.1.1

适配器

0.6.0

协议端

0.0.52

描述问题

chrononeko/bugtracker#49

发送语音时,通过编码器正常编码至silk格式后,发送至群组里会呈现出图片的样式(安卓QQ和NTQQ正常)

复现步骤

1.使用ffmpeg+编码器将wav编码转换至pcm再转换为silk
2.读取silk字节流并发送

期望的结果

可以正常发送语音

截图或日志

PCQQ:
image

Nonebot 配置项

No response

@okashi-ya okashi-ya added the bug Something isn't working label Oct 15, 2023
@okashi-ya
Copy link
Contributor Author

根据chrononeko那面的说法,发送语音需要结尾命名.amr后缀

@ilharp
Copy link

ilharp commented Oct 15, 2023

具体需要修改的代码在这里:

files={f"file_{self.type}": (f"file_{self.type}", data)},

如果是语音的话,后面加一个 .amr 即可。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants