帖子

我用讯飞语音听写遇到了问题

[复制链接]

该用户从未签到

5111 135****6917 发表于 2020-5-22 14:55:34 1#
   self.iFlySpeechRecognizer = [IFlySpeechRecognizer sharedInstance];

    [self.iFlySpeechRecognizer setParameter:@"" forKey:[IFlySpeechConstant PARAMS]];
    [self.iFlySpeechRecognizer setParameter:@"iat" forKey:@"domain"];
    [self.iFlySpeechRecognizer setParameter:@"3000" forKey:[IFlySpeechConstant SPEECH_TIMEOUT]];
    [self.iFlySpeechRecognizer setParameter:@"6000" forKey:[IFlySpeechConstant VAD_EOS]];
    [self.iFlySpeechRecognizer setParameter:@"6000" forKey:[IFlySpeechConstant VAD_BOS]];
    [self.iFlySpeechRecognizer setParameter:@"16000" forKey:[IFlySpeechConstant SAMPLE_RATE]];
    [self.iFlySpeechRecognizer setParameter:@"iat.pcm" forKey:[IFlySpeechConstant ASR_AUDIO_PATH]];

    [self.iFlySpeechRecognizer setParameter:@"zh_cn" forKey:[IFlySpeechConstant LANGUAGE]];
    [self.iFlySpeechRecognizer setParameter:@"mandarin" forKey:[IFlySpeechConstant ACCENT]];
    [self.iFlySpeechRecognizer setParameter:@"1" forKey:@"audio_source"];
    [self.iFlySpeechRecognizer setParameter:@"20000" forKey:[IFlySpeechConstant NET_TIMEOUT]];
    [_iFlySpeechRecognizer setParameter:@"1" forKey:[IFlySpeechConstant ASR_PTT]];

    [self.iFlySpeechRecognizer startListening];
    [self.iFlySpeechRecognizer setDelegate:self];

[color=rgba(255, 255, 255, 0.85)]}

[color=rgba(255, 255, 255, 0.85)]问题是 -[ISRDataHander dataHander:parse:],params={"sn":1,"ls":true,"bg":0,"ed":0,"ws":[{"bg":1,"cw":[{"sc":0.0,"w":"12"}]},{"bg":0,"cw":[{"sc":0.0,"w":""}]}]}
2020-05-22 14:50:02.110261+0800 電波[29275:6667452] [IFLYTEK] -[ISRDataHander dataHander:parse:],resultString={"sn":1,"ls":true,"bg":0,"ed":0,"ws":[{"bg":1,"cw":[{"sc":0.0,"w":"12"}]},{"bg":0,"cw":[{"sc":0.0,"w":""}]}]},isParse=0
2020-05-22 14:50:02.110397+0800 電波[29275:6667317] 999999999999 12



我说话时候 说的是123 123 123  
结果给的是 12  请问有什么问题吗?


回调是这样写的



小七 发表于 2020-5-26 09:51:09
2#
这个代码是是没有问题的,是否是识别的时候吐字不清晰造成的,可提供下日志看下
使用道具 举报 回复