We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
电脑端:
点击无法播放
手机端却可以正常播放
使用 Base64 传输语音,部分代码:
Base64
def wav_to_amr(input_wav, output_amr): os.system(f"sox {input_wav} -r 8000 -c 1 {output_amr}") with open(output_amr, 'rb') as f: audio = f.read() audio_base64 = base64.b64encode(audio) audio_str = audio_base64.decode('utf-8') return audio_str voice_base64 = wav_to_amr('a.wav', 'b.amr-nb') # {'type': 'Voice', 'base64': voice_base64}
The text was updated successfully, but these errors were encountered:
https://github.com/mamoe/mirai/blob/3a8003057a593601dfe5a6dac3477503e29fc8a7/mirai-core-api/src/commonMain/kotlin/contact/Group.kt#L155-L167
QQ原生的语言格式是 amr 或 silk
可以尝试安装扩展插件 https://github.com/project-mirai/mirai-silk-converter
Sorry, something went wrong.
No branches or pull requests
电脑端:
点击无法播放
手机端却可以正常播放
使用
Base64
传输语音,部分代码:The text was updated successfully, but these errors were encountered: