如何保存 Skype 机器人对话的录音

How to save a recording of a Skype bot conversation

提问人:Ruadhr 提问时间:3/25/2023 更新时间:3/25/2023 访问量:17

问:

我有一个烧瓶服务器,用作Skype机器人的端点。当我发送记录与用户对话的请求时,我会得到一串字节作为响应。问题是,当我尝试将此字符串写入文件时,文件已损坏。有人遇到过这个问题吗?

输出:

我得到什么

@app.route("/choose", methods=['POST'])
def choose():
    tri = request.form.to_dict()
    print(tri)
    print(request.form.to_dict()['recordedAudio'].encode())
    with open('test.wav', 'wb') as f:
        f.write(request.form.to_dict()['recordedAudio'].encode('utf-8'))

Python Flask 音频 Skype WMA

评论


答: 暂无答案