在POST呼叫中,我正在从邮递员发送.wav文件。我正在使用以下行在Flask上接收该文件
length = request.headers["Content-Length"]
Binaryfile = request.get_data(length)
我的Binaryfile看起来像这样RIFFzuWAVEfmt>} dataVu ??? someRandomData现在,我需要通过python读取此数据并将其发送到
import speech_recognition as sr audioFile = sr.AudioFile(here, need a file-like object created from binary)
io.BytesIO
:io.BytesIO