采样率error
深夜0o 发布于2017-05 浏览:1672 回复:1
0
收藏
快速回复

我使用的服务是:语音识别

调用的接口是:REST API

参数设置情况:

String url ="http://vop.baidu.com/server_api?format=amr&rate=8000&channel=1&cuid="+imei+"&token="
       +BDToken+"&speech="+path+"&len="+len+"&lan=zh";

开发平台和机型:android

SDK版本号:23

代码或日志截图(上传截图能帮助您更快解决问题):

05-18 11:50:45.941 4391-4391/com.hyphenate.chatuidemo E/GjChatFragment: 语音识别回调结果:{"err_msg":"param rate error.","err_no":3300,"sn":"964873630641495079445"}

                                                                        

                                                                        [ 05-18 11:50:46.063  2910: 2910 E/         ]

                                                                        process stopped due to unexpected signal 13

复现步骤、现象及其他描述:rate设置成8000和16000都抱这个错,我的语音格式amr

收藏
点赞
0
个赞
共1条回复 最后由用户已被禁言回复于2022-04
#2fujiayi1984回复于2017-05

深夜0o:

我使用的服务是:语音识别

调用的接口是:REST API

参数设置情况:

String url ="http://vop.baidu.com/server_api?format=amr&rate=8000&channel=1&cuid="+imei+"&token="
       +BDToken+"&speech="+path+"&len="+len+"&lan=zh";

开发平台和机型:android

SDK版本号:23

代码或日志截图(上传截图能帮助您更快解决问题):

05-18 11:50:45.941 4391-4391/com.hyphenate.chatuidemo E/GjChatFragment: 语音识别回调结果:{"err_msg":"param rate error.","err_no":3300,"sn":"964873630641495079445"}

                                                                        

                                                                        [ 05-18 11:50:46.063  2910: 2910 E/         ]

                                                                        process stopped due to unexpected signal 13

复现步骤、现象及其他描述:rate设置成8000和16000都抱这个错,我的语音格式amr

回复深夜0o:

语音数据的采样率和压缩格式在 HTTP-HEADER 里的 content-type 表明,例:

  1. Content-Type:audio/amr;rate=8000

。另外您可以测试下rest api的demo,有java版本的。http://speech.baidu.com/docs/asr/57

0
TOP
切换版块