def get_file_content(/Users/mac/Downloads/voice.mp3):
with open("/Users/mac/Downloads/voice.mp3", 'rb') as fp:
return fp.read()
识别本地文件
data = client.asr(get_file_content('voice.mp3'), 'mp3', 16000, {
'dev_pid': 1537,
})
print(data)
def get_file_content(/Users/mac/Downloads/voice.mp3):
^
SyntaxError: invalid syntax
什么原因错了,请问?