RF-Tar-Railt / satori-python

Satori Protocol SDK for Python
MIT License
27 stars 3 forks source link

[Bug]发送Audio.of()构造的音频对象时是1秒的空语音 #11

Open YuelaoOmega opened 1 month ago

YuelaoOmega commented 1 month ago

请确认:

Bug

问题

发送Audio.of()构造的音频对象时是1秒的空语音

如何复现

if MessageRaw == "/test":

with open("file.silk,"rb+") as music:
    mime = mimetypes.guess_type(os.path.abspath(randomfile))[0]
    await account.send(event,str(Audio.of(raw=music.read(),mime=mime)))

预期行为

应该可以发送一个完整的音频

使用环境:

-Python 版本: Python 3.11.4

-SDK 版本: 0.12.0

-使用的 Satori 服务端 (例如 Chronocat): Chronocat

日志/截图

5a41f26b3e652d000168dae059cf69a4 1455641930ec216f84d8c0dc53ca59c7

36551a458d8c122a4659ba8633fe1d1b

与发送MP3文件无异

RF-Tar-Railt commented 1 month ago

据我所知,chronocat发语音的话需要.silk格式的文件

你可以在github上搜索一下 silk-encoder

YuelaoOmega commented 1 month ago

据我所知,chronocat发语音的话需要.silk格式的文件

你可以在github上搜索一下 silk-encoder

好的,谢谢

YuelaoOmega commented 1 month ago

据我所知,chronocat发语音的话需要.silk格式的文件

你可以在github上搜索一下 silk-encoder

已尝试,仍然存在bug

RF-Tar-Railt commented 1 month ago

时长问题是chronocat侧的问题