今天在访问百度语音识别的时候出现了下面的错误:
{'err_msg': 'request pv too much', 'err_no': 3305, 'sn': '876137091191590632079'
}
我的核心代码为:
res=client.asr(get_file_content(audio_file), 'wav', 16000, {
'dev_pid': 1536,
})
现在修改为:
res=client.asr(get_file_content(audio_file), 'wav', 16000, {
'dev_pid': 1537,
})
把1536修改为1537就行了。然后就正常了:
eric@eric-HP-Z420-Workstation:~/mnt/moocScrapy$ python3 baidu_speech.py
0%| | 0/101886 [00:00<?, ?it/s]
{'corpus_no': '6831714100692371628', 'err_msg': 'success.', 'err_no': 0, 'result
': ['变小了圆。'], 'sn': '464892567711590632391'}
参考文献
[1].pip安装baidu-aip的方法. https://blog.csdn.net/dally2/article/details/103900438
[2].刚注册语音AIP就显示3305. https://ai.baidu.com/forum/topic/show/958174