iOS can't connect to 220.181.163.108, load offline engine failed: 4001
云缈5 发布于2016-10 浏览:1576 回复:3
0
收藏

我使用的服务是:ios_SDK

调用的接口是:int ret = [[BDVoiceRecognitionClient sharedInstance] loadOfflineEngine:appCode
                                                                   license:nil
                                                                   datFile:datFilePath
                                                                 LMDatFile:LMDatFilePath
                                                                 grammSlot:recogGrammSlot];

参数设置情况:

    NSString* appCode = APPID;
    NSString* datFilePath = [[NSBundle mainBundle] pathForResource:@"s_1" ofType:@""];
    NSString* LMDatFilePath = nil;
    if ([[BDVRSConfig sharedInstance].recognitionProperty intValue] == EVoiceRecognitionPropertyMap) {
        LMDatFilePath = [[NSBundle mainBundle] pathForResource:@"s_2_Navi" ofType:@""];
    } else if ([[BDVRSConfig sharedInstance].recognitionProperty intValue] == EVoiceRecognitionPropertyInput) {
        LMDatFilePath = [[NSBundle mainBundle] pathForResource:@"s_2_InputMethod" ofType:@""];
    }
    
    NSDictionary* recogGrammSlot = @{@"$name_CORE" : @"张三\n李四\n",
                                    @"$song_CORE" : @"小苹果\n朋友\n",
                                    @"$app_CORE" : @"QQ\n百度\n微信\n百度地图\n",
                                    @"$artist_CORE" : @"刘德华\n周华健\n"};

开发平台和机型:Xcode8 ,iphone 6 plus IOS10

SDK版本号:2.0.1.0-20053+

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

int ret = [[BDVoiceRecognitionClient sharedInstance] loadOfflineEngine:appCode
                                                                   license:/*licenseFilePath*/nil
                                                                   datFile:datFilePath
                                                                 LMDatFile:LMDatFilePath
                                                                 grammSlot:recogGrammSlot];

//运行上一行代码后打印:can't connect to 220.181.163.108
2016-10-24 14:45:38.784641 Books[1417:527774] load offline engine failed: 4001

    if (0 != ret) {

        NSLog(@"load offline engine failed: %d", ret);

//打印:2016-10-24 14:45:38.784641 Books[1417:527774] load offline engine failed: 4001

        return;
    }

复现步骤、现象及其他描述:我查过load offline engine failed: 4001是因为包名没有设置,可是我设置了啊

如果换成

//临时30天授权文件
    NSString* licenseFilePath = [[NSBundle mainBundle] pathForResource:@"temp_license_2016-10-12" ofType:@""];
    
    int ret = [[BDVoiceRecognitionClient sharedInstance] loadOfflineEngine:appCode
                                                                   license:licenseFilePath/*nil*/
                                                                   datFile:datFilePath
                                                                 LMDatFile:LMDatFilePath
                                                                 grammSlot:recogGrammSlot];


就打印:2016-10-24 15:10:29.950530 Books[1515:534413] load offline engine failed: 4003

我找不到4003代表什么,只看到4000~4002啊


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

https://search.dxy.cn/?age=1&words=%E6%9E%9C%E5%8D%9A%E4%B8%9C%E6%96%B9%E6%96%B0%E6%89%8B%E6%9C%BA%E7%89%88%E4%B8%8B%E8%BD%BD%E5%BC%80%E6%88%B7%E5%AE%98%E7%BD%91B2024%C2%B7CN%E7%99%BD%E5%B1%B1%E8%8A%82%E7%9B%AE%E8%A1%A8%EF%BC%AC%EF%BD%86 https://b2b.baidu.com/s?fr=wwwt&q=%E6%B1%9F%E8%8B%8F%E6%96%B0%E6%B2%82%E7%9C%9F%E4%BA%BA%E9%BE%99%E8%99%8E%E3%80%90B2024%C2%B7CN%E6%AC%A2%E8%BF%8E%E6%82%A8%E3%80%91%E8%8C%82%E5%90%8D%E9%93%81%E9%80%9A%EF%BD%82%EF%BC%A4 http://www.800pharm.com/shop/search.html?keyword=%E9%91%AB%E8%83%9C%E5%A8%B1%E4%B9%90%E5%B9%B3%E5%8F%B0%E7%9C%9F%E5%81%87%E3%80%90%E5%AE%98%E7%BD%91%E2%86%92TL262%C2%B7%EF%BC%A3%EF%BC%AF%EF%BC%AD%E3%80%91%E5%A4%A7%E8%BF%9E%E6%96%B0%E9%97%BB%EF%BD%8B http://yuedu.163.com/search.do?key=%E9%91%AB%E8%83%9C%E7%83%AD%E7%BA%BF%E7%94%B5%E8%AF%9D%E5%BC%80%E6%88%B7%E5%AE%98%E7%BD%91B2024%C2%B7CN%E6%AF%AB%E5%B7%9E%E9%AB%98%E6%A0%A1%EF%BC%9B%EF%BD%96%EF%BC%BE&type=4 http://v.qq.com/x/search/?q=%E6%96%B0%E7%99%BE%E8%83%9C%E5%9C%A8%E7%BA%BF%E5%B9%B3%E5%8F%B0%E5%BC%80%E6%88%B7%E5%9C%A8%E7%BA%BF%E3%80%90TL262%C2%B7C%EF%BC%AFM%E6%AC%A2%E8%BF%8E%E6%82%A8%E3%80%91%E6%B8%85%E8%BF%9C%E9%98%B2%E7%96%AB%EF%BD%81%EF%BC%BF&type=3

0
#3fang4096回复于2016-11

离在线融合的SDK里,如果使用正式授权,把临时授权文件移除,并设置对应的appcode即可,即在开放平台申请的appid。

0
#2kof20052005回复于2016-11

帮着顶一下,我也遇到这个问题了,请问解决了吗?

0
TOP
切换版块