python baidu-aip语音识别错误request pv too much

今天在访问百度语音识别的时候出现了下面的错误:

{'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

  • 1
    点赞
  • 5
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 9
    评论
评论 9
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

农民小飞侠

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值