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端无法播放,手机端正常 #49

Closed
okashi-ya opened this issue Oct 15, 2023 · 6 comments

Comments

@okashi-ya
Copy link

okashi-ya commented Oct 15, 2023

前提:语音是标准的tencent要求的silk语音类型,语音头已经正确转换为:"\x02#!SILK_V3"的格式

使用gocqhttp直接将silk以"cq=record"的形式发送至群组时是正常可以读取并播放的(电脑和安卓手机均可以正常发送并播放)
使用chrononeko发送时至群组时,电脑端显示为一张图片但无法点开,手机端正常显示为语音且可以正常播放

@ilharp ilharp added the duplicate 问题重复 label Oct 15, 2023
@ilharp
Copy link
Member

ilharp commented Oct 15, 2023

Duplicate of #43

#43 (comment)

你使用的语音是旧版腾讯专属 Silk,现在发送语音需要使用新版专属 Silk。目前只有 Chronocat 的 社区 提供了新版 Silk 的编码器。

@ilharp ilharp closed this as not planned Won't fix, can't repro, duplicate, stale Oct 15, 2023
@okashi-ya
Copy link
Author

okashi-ya commented Oct 15, 2023

Duplicate of #43

#43 (comment)

你使用的语音是旧版腾讯专属 Silk,现在发送语音需要使用新版专属 Silk。目前只有 Chronocat 的 社区 提供了新版 Silk 的编码器。

使用了群里的编码器发送后,仍然是PC上普通QQ(非NTQQ)显示为图片,手机是正常的

PC上使用NTQQ是也正常的

或者是说我们这个框架发的语音,普通PC的QQ是直接听不了的?需要NT架构才可以听?

@ilharp
Copy link
Member

ilharp commented Oct 15, 2023

非常抱歉,我误解了你的问题,你的问题和 #43 并不是相同的问题。

你的问题在于生成的音频文件需要以 .amr 作为后缀。使用其他结尾的后缀发送音频的话 PCQQ 无法识别。重命名一下音频文件就可以了。

再次抱歉。

@ilharp ilharp removed the duplicate 问题重复 label Oct 15, 2023
@okashi-ya
Copy link
Author

okashi-ya commented Oct 15, 2023

非常抱歉,我误解了你的问题,你的问题和 #43 并不是相同的问题。

你的问题在于生成的音频文件需要以 .amr 作为后缀。使用其他结尾的后缀发送音频的话 PCQQ 无法识别。重命名一下音频文件就可以了。

再次抱歉。

可能不是跟改名有关?
因为我的代码是将音频从wav转换为pcm再转换为silk后,直接将silk文件的二进制数据传入Message.voice()内部进行发送的
(使用的是adapter_red)
目前看起来只是PC端普通版本的QQ存在显示为图片的问题
image
代码是这样的
返回的直接是bytes

@ilharp
Copy link
Member

ilharp commented Oct 15, 2023

看起来是 adapter-red 的实现有偏差。adapter-red 应当在上传语音文件的时候,专门在语音文件最后加上 .amr 后缀。由于此前我没有特意说过这件事,所以漏了这里的逻辑也很正常。

你可以带着这个 issue 前往 adapter-red 开一个新的 issue。

@okashi-ya
Copy link
Author

看起来是 adapter-red 的实现有偏差。adapter-red 应当在上传语音文件的时候,专门在语音文件最后加上 .amr 后缀。由于此前我没有特意说过这件事,所以漏了这里的逻辑也很正常。

你可以带着这个 issue 前往 adapter-red 开一个新的 issue。

好的!了解了~
非常感谢您的回答!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants