【置顶】语音识别REST API问题及答案汇总贴
0半君0 发布于2016-01 浏览:126568 回复:50
0
收藏

语音识别REST API问题及答案汇总贴

收藏
点赞
0
个赞
共50条回复 最后由用户已被禁言回复于2022-04
#31微笑的舒克回复于2017-03

什么时候RESTAPI才支持 自定义设置

0
#30zqr688回复于2017-03

Java demo 运行报以下错误,如何解决,谢谢

javax.net.ssl.SSLException: Server selected improper ciphersuite TLS_ECDHE_RSA_WITH_RC4_128_SHA
at sun.security.ssl.Alerts.getSSLException(Unknown Source)
at sun.security.ssl.SSLSocketImpl.fatal(Unknown Source)
at sun.security.ssl.Handshaker.fatalSE(Unknown Source)
at sun.security.ssl.Handshaker.fatalSE(Unknown Source)
at sun.security.ssl.ClientHandshaker.serverHello(Unknown Source)
at sun.security.ssl.ClientHandshaker.processMessage(Unknown Source)
at sun.security.ssl.Handshaker.processLoop(Unknown Source)
at sun.security.ssl.Handshaker.process_record(Unknown Source)
at sun.security.ssl.SSLSocketImpl.readRecord(Unknown Source)
at sun.security.ssl.SSLSocketImpl.performInitialHandshake(Unknown Source)
at sun.security.ssl.SSLSocketImpl.startHandshake(Unknown Source)
at sun.security.ssl.SSLSocketImpl.startHandshake(Unknown Source)
at sun.net.www.protocol.https.HttpsClient.afterConnect(Unknown Source)
at sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.connect(Unknown Source)
at sun.net.www.protocol.http.HttpURLConnection.getInputStream0(Unknown Source)
at sun.net.www.protocol.http.HttpURLConnection.getInputStream(Unknown Source)
at java.net.HttpURLConnection.getResponseCode(Unknown Source)
at sun.net.www.protocol.https.HttpsURLConnectionImpl.getResponseCode(Unknown Source)
at com.baidu.speech.serviceapi.Sample.printResponse(Sample.java:109)
at com.baidu.speech.serviceapi.Sample.getToken(Sample.java:52)
at com.baidu.speech.serviceapi.Sample.main(Sample.java:34)


0
#29cscshahashine回复于2017-03

cscshahashine:

为什么录的英文可以识别一点,但是说中文识别出来的就是一堆乱码一样的句子  大多是些繁体字 甚至有日语等字??? 识别模式也已经改成zh了,  请问是哪里的问题?

回复cscshahashine:已经找到为什么了,原来是编码的问题

0
#28cscshahashine回复于2017-03

为什么录的英文可以识别一点,但是说中文识别出来的就是一堆乱码一样的句子  大多是些繁体字 甚至有日语等字??? 识别模式也已经改成zh了,  请问是哪里的问题?

0
#27szw389262511回复于2017-03

请问语音识别支持.mp3和.mav格式吗?为什么我测试成功的支支持.pcm格式?

0
#26definesky回复于2017-02

解决了没?  我也遇到了相同的问题,如果解决了求分享

回复Actmy_Alicey:

0
#25啁劫轮回复于2017-02

语音识别REST API在PC上运行都能正常识别,但是发布apk在手机上的返回值是空的(连错误信息都不给返回)!

REST API不是说是全平台的吗?是不是不支持安卓啊?


0
#24wuyxgsgsgsgs回复于2017-02

请问 rest api的调用限制是怎么样的? 

我看返回码里面有  

3304 请求 GPS 过大,超过限额
3305 产品线当前日请求数超过限额

但好像并没有看到 对单个帐号的限制说明?

0
#23fufengjian回复于2017-02

如何不连读

0
#22mijiruxue回复于2017-02

微笑的舒克:

我上传了 语音识别词库设置  的自定义词条,并且勾选了 仅识别上传数据中的用户输入 

的选项,请问为何使用  REST API方式  不能生效我的设置,还是在识别我上传的词条以外的字词,请问这是怎么回事?

如果 REST API 不支持自定义设置的话,有什么办法能够解决这个问题呢?

回复微笑的舒克:同问,难道语音识别词库设置对rest API不生效吗...

0
#21ghostwwl回复于2017-01

为什么不支持mp3格式 为什么只支持单声道?


合成接口返回的是MP3 本来想直接用合成的声音 识别后 对比准确度 大爷的 害的转码 还得转成单声道

0
#20微笑的舒克回复于2016-12

我上传了 语音识别词库设置  的自定义词条,并且勾选了 仅识别上传数据中的用户输入 

的选项,请问为何使用  REST API方式  不能生效我的设置,还是在识别我上传的词条以外的字词,请问这是怎么回事?

如果 REST API 不支持自定义设置的话,有什么办法能够解决这个问题呢?


0
#19子曰007回复于2016-11

行健不息2014:

回复Actmy_Alicey:库的问题,自己重新编译下libcurl.a试试,百度给的demo如果和你电脑位数不同也会出现这种错误。

回复行健不息2014:你好,我也遇到这个问题了,但是百度下载的包里边只有Makefile,make报错

cd ../.. && make  am--refresh
make[1]: 正在进入目录 `/home/ada/audio/linux c/curl'
make[1]: *** 没有规则可以创建目标“am--refresh”。 停止。
make[1]:正在离开目录 `/home/ada/audio/linux c/curl'
make: *** [../../configure] 错误 2

不知道咋回事呢

0
#18行健不息2014回复于2016-11

Actmy_Alicey:

我在编译时出现以下错误,

curl/include/curl/curlrules.h:143:41: error: size of array ‘__curl_rule_01__’ is negative
     [CurlchkszEQ(long, CURL_SIZEOF_LONG)];
                                         ^
curl/include/curl/curlrules.h:153:53: error: size of array ‘__curl_rule_02__’ is negative
     [CurlchkszEQ(curl_off_t, CURL_SIZEOF_CURL_OFF_T)];

是啥问题啊

回复Actmy_Alicey:库的问题,自己重新编译下libcurl.a试试,百度给的demo如果和你电脑位数不同也会出现这种错误。

0
#17沙锅_1号回复于2016-11

VerifyError: err_msg: authentication failed.

每次调用语音合成的时候都会验证不通过

但是语音识别又没问题 这两者是用的API KEY和secret key不同么?

0
#16Actmy_Alicey回复于2016-11

我在编译时出现以下错误,

curl/include/curl/curlrules.h:143:41: error: size of array ‘__curl_rule_01__’ is negative
     [CurlchkszEQ(long, CURL_SIZEOF_LONG)];
                                         ^
curl/include/curl/curlrules.h:153:53: error: size of array ‘__curl_rule_02__’ is negative
     [CurlchkszEQ(curl_off_t, CURL_SIZEOF_CURL_OFF_T)];

是啥问题啊

回复0半君0:

0
#15Actmy_Alicey回复于2016-11

我在编译时出现以下错误,

curl/include/curl/curlrules.h:143:41: error: size of array ‘__curl_rule_01__’ is negative
     [CurlchkszEQ(long, CURL_SIZEOF_LONG)];
                                         ^
curl/include/curl/curlrules.h:153:53: error: size of array ‘__curl_rule_02__’ is negative
     [CurlchkszEQ(curl_off_t, CURL_SIZEOF_CURL_OFF_T)];

是啥问题啊

0
#14asdf5797回复于2016-11

请问,运行java版本Demo测试自己的语音识别结果总是“哼哼”,是什么原因导致的呢?

0
#13xkyxbryant回复于2016-11

水寒319:

问题:

REST API语音识别错误代码:3301,是什么原因?


回答:

主要原因可能有:

1、语音格式不正确。

2、语音质量有问题,模糊不清或者静音。


回复水寒319:

请问使用speex压缩格式的是否可以,需要封装头吗?我使用标准speex压缩的语音请求,放回错误码3301,请帮忙查一下,sn为448726394781478144976;多谢。

0
#12wawawang84回复于2016-10

133*****864:

python写的识别程序,调试通过.


def recognize( filepath, ftype, frate, token, fchannel ):

    fh = open( filepath ,'rb')

    content = fh.read()

    f_len = os.path.getsize( filepath )

    speech = base64.b64encode(content) 

    fh.close()


    # 表示本机的id,使用mac地址标识

    cuid = "40-8D-5C-73-00-78"

    url="http://vop.baidu.com/server_api"

    update = json.dumps({'format':ftype,'rate':frate,'channel':fchannel,'cuid':cuid,'token':token,'speech':speech,'len':f_len})

    r = urllib2.urlopen( url ,update)

    result = json.loads( r.read() )

    err_no = result['err_no']

    if err_no == 0:

        text = result['result'][0]

    else:

        text = err_map( err_no )

        print  "DEBUG, Error:" ,text.encode('cp936')

    return err_no, text


回复133*****864:你好,我也是用python调用百度语音的api,但是一直测试通不过。可以加我QQ咨询一下吗? 
851129496 
谢谢

0
TOP
切换版块