REST API语音识别问题
sp...1@163.com 发布于2015-11 浏览:1538 回复:6
0
收藏

Eclipse环境下,提交任务后,控制台显示错误信息

Exception in thread "main" org.json.JSONException: Expected a ',' or ']' at 390 [character 391 line 1]
    at org.json.JSONTokener.syntaxError(JSONTokener.java:433)
    at org.json.JSONArray.(JSONArray.java:127)
    at org.json.JSONTokener.nextValue(JSONTokener.java:367)
    at org.json.JSONObject.(JSONObject.java:217)
    at org.json.JSONObject.(JSONObject.java:324)
    at com.baidu.speech.serviceapi.Sample.printResponse(Sample.java:114)
    at com.baidu.speech.serviceapi.Sample.method2(Sample.java:94)
    at com.baidu.speech.serviceapi.Sample.main(Sample.java:33)

收藏
点赞
0
个赞
共6条回复 最后由用户已被禁言回复于2022-04
#7Firebank回复于2015-11

哦。。 你要是之前执行过现在不行就不清楚了。你加QQ群问吧,这里反馈要慢很多。

0
#6sp...1@163.com回复于2015-11

执行结果:

 {
    "scope": "public audio_voice_assistant_get wise_adapt lebo_resource_base lightservice_public hetu_basic lightcms_map_poi",
    "session_secret": "f28bbb7ada7961a8bb6460561bad5b86",
    "expires_in": 2592000,
    "refresh_token": "25.b3497225dc6d5c2ed70c10ef8a618df3.315360000.1761817840.282335-7170073",
    "session_key": "9mzdA5uKgM+Ubn2CyOegYkmK/3Dd3tqu6j3yprE0stTD3mmBqnzKN9orbAXLPo82PSsxcPS/hQDdpz7Hlfe+ucMjv+jt",
    "access_token": "24.81cd49ef60716582f0df2bb0682053e3.2592000.1449049840.282335-7170073"
}
{
    "result": [
        "bottom one buckle chute, with possible renewal yet was a little city telecom global supplement the local bank open tubular drum up more new hospitals all your fears with a new life younger going to the bottom billion and will, they realize onion younger grade of modern socialism will, hong kong and on the final eating to tell your kids washingtonian way to the hotel is again building the crucial tell you at treating the product you will sell cotton jacket genuine good arguing with the cultural, good hot food in julian woolf memorial hall julio little amplifier, putting one content on wooden halt villa located in the cargo ships laden quench harden began to eat, ",
        "bottom one buckle chute, with possible renewal yet was a little city telecom global supplement the local bank open tubular drum up more new hospitals all your fears with a new life younger going to the bottom billion and will, they realize onion younger grade of modern socialism will, hong kong and on the final eating to tell your kids washingtonian way to the hotel is again building the crucial tell you at treating the product you will sell cotton jacket genuine good arguing with the cultural, good hot food in julian woolf memorial hall julio little amplifier, putting one content on wooden halt villa located in the cargo ships laden quench hardened potentially, ",
        "bottom one buckle chute, with possible renewal yet was a little city telecom global supplement the local bank open tubular drum up more new hospitals all your fears with a new life younger going to the bottom billion and will, they realize onion younger grade of modern socialism will, hong kong and on the final eating to tell your kids washingtonian way to the hotel is again building the crucial tell you at treating the product you will sell cotton jacket genuine good arguing with the cultural, good hot food in julian woolf memorial hall julio little amplifier, putting one content on wooden halt villa located in the cargo ships laden quench hardened began to eat, ",
        "bottom one buckle chute, with possible renewal yet was a little city telecom global supplement the local bank open tubular drum up more new hospitals all your fears with a new life younger going to the bottom billion and will, they realize onion younger grade of modern socialism will, hong kong and on the final eating to tell your kids washingtonian way to the hotel is again building the crucial tell you at treating the product you will sell cotton jacket genuine good arguing with the cultural, good hot food in julian woolf memorial hall julio little amplifier, putting one content on wooden halt the elongated in the cargo ships laden quench harden began to eat, ",
        "bottom one buckle chute, with possible renewal yet was a little city telecom global supplement the local bank open tubular drum up more new hospitals all your fears with a new life younger going to the bottom billion and will, they realize onion younger grade of modern socialism will, hong kong and on the final eating to tell your kids washingtonian way to the hotel is again building the crucial tell you at treating the product you will sell cotton jacket genuine good arguing with the cultural, good hot food in julian woolf memorial hall with local amplifier, putting one content on wooden halt villa located in the cargo ships laden quench harden began to eat, ",
        "bottom one buckle chute, with possible renewal yet was a little city telecom global supplement the local bank open tubular drum up more new hospitals all your fears with a new life younger going to the bottom billion and will, they realize onion younger grade of modern socialism will, hong kong and on the final eating to tell your kids washingtonian way to the hotel is again building the crucial tell you at treating the product you will sell cotton jacket genuine good arguing with the cultural, good hot food in julian woolf memorial hall with local amplifier, putting one content on wooden halt villa located in the cargo ships laden quench hardened potentially, ",
        "bottom one buckle chute, with possible renewal yet was a little city telecom global supplement the local bank open tubular drum up more new hospitals all your fears with a new life younger going to the bottom billion and will, they realize onion younger grade of modern socialism will, hong kong and on the final eating to tell your kids washingtonian way to the hotel is again building the crucial tell you at treating the product you will sell cotton jacket genuine good arguing with the cultural, good hot food in julian woolf memorial hall with local amplifier, putting one content on wooden halt villa located in the cargo ships laden quench hardened began to eat, ",
        "bottom one buckle chute, with possible renewal yet was a little city telecom global supplement the local bank open tubular drum up more new hospitals all your fears with a new life younger going to the bottom billion and will, they realize onion younger grade of modern socialism will, hong kong and on the final eating to tell your kids washingtonian way to the hotel is again building the crucial tell you at treating the product you will sell cotton jacket genuine good arguing with the cultural, good hot food in julian woolf memorial hall with local amplifier, putting one content on wooden halt the elongated in the cargo ships laden quench harden began to eat, ",
        "bottom one buckle chute, with possible renewal yet was a little city telecom global supplement the local bank open tubular drum up more new hospitals all your fears with a new life younger going to the bottom billion and will, they realize onion younger grade of modern socialism will, hong kong and on the final eating to tell your kids washingtonian way to the hotel is again building the crucial tell you at treating the product you will sell cotton jacket genuine good arguing with the cultural, good hot food in julian woolf memorial hall julio little amplified, putting one content on wooden halt villa located in the cargo ships laden quench harden began to eat, ",
        "bottom one buckle chute, with possible renewal yet was a little city telecom global supplement the local bank open tubular drum up more new hospitals all your fears with a new life younger going to the bottom billion and will, they realize onion younger grade of modern socialism will, hong kong and on the final eating to tell your kids washingtonian way to the hotel is again building the crucial tell you at treating the product you will sell cotton jacket genuine good arguing with the cultural, good hot food in julian woolf memorial hall julio little amplified, putting one content on wooden halt villa located in the cargo ships laden quench hardened potentially, "
    ],
    "err_msg": "success.",
    "sn": "6140962251446457846",
    "err_no": 0,
    "corpus_no": "6212489147754768369"
}
Exception in thread "main" org.json.JSONException: Expected a ',' or ']' at 390 [character 391 line 1]
    at org.json.JSONTokener.syntaxError(JSONTokener.java:433)
    at org.json.JSONArray.(JSONArray.java:127)
    at org.json.JSONTokener.nextValue(JSONTokener.java:367)
    at org.json.JSONObject.(JSONObject.java:217)
    at org.json.JSONObject.(JSONObject.java:324)
    at com.baidu.speech.serviceapi.Sample.printResponse(Sample.java:114)
    at com.baidu.speech.serviceapi.Sample.method2(Sample.java:94)
    at com.baidu.speech.serviceapi.Sample.main(Sample.java:33)

0
#5sp...1@163.com回复于2015-11

是不是我的帐号信息过期了

0
#4sp...1@163.com回复于2015-11

而且之前曾经是执行成功的

0
#3sp...1@163.com回复于2015-11

怎么拼错了,我是直接从百度官方下载的源码执行

0
#2Firebank回复于2015-11

怎么看起来像是你的json拼错了。。

0
TOP
切换版块