php 百度语音转文字识别问题
zhang2297138 发布于2018-01 浏览:2751 回复:3
0
收藏

// 从URL获取文件识别 这是百度语音识别提供的接口
$aipSpeech->asr(null, 'pcm', 16000, array(
'url' => 'http://121.40.195.233/res/16k_test.pcm',
'callback' => 'http://xxx.com/receive',
));

这样拼接的链接地址 百度语音接口好像识别不出来

"http://p2butmxp2.bkt.clouddn.com/".$file_pcm;
经常提示
array:3 [▼
"err_msg" => "speech data error."
"err_no" => 3309
"sn" => "215116585111516013247"
]

收藏
点赞
0
个赞
共3条回复 最后由用户已被禁言回复于2022-04
#4fujiayi1984回复于2018-01

确保http://p2butmxp2.bkt.clouddn.com/56035.pcm 这个音频文件存在

0
#3goJhou回复于2018-01

音频文件满足接口条件吗

0
#2zhang2297138回复于2018-01

php file_get_contents 通过这个函数把拼接起来的链接地址和文件名称放入里面执行然后报错

"file_get_contents(http://p2butmxp2.bkt.clouddn.com/56035.pcm): failed to open stream: HTTP request failed! HTTP/1.1 404 Not Found\r\n"

0
TOP
切换版块