SFTranscriptionSegment的时间戳始终为0 [英] SFTranscriptionSegment's timestamp is always 0

查看:67
本文介绍了SFTranscriptionSegment的时间戳始终为0的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

这是有关新的iOS 10语音框架的提问.我使用以下方法获得语音识别结果

This is a questoin regarding new iOS 10 Speech framework. I get the speech recognition result using following method

 recognitionTask =   [speechRecgzr recognitionTaskWithRequest:recognitionRequest resultHandler:^(SFSpeechRecognitionResult * _Nullable result, NSError * _Nullable error) {

    }

但是结果中每个SFTranscriptionSegment的时间戳为0,置信度始终为0

But the timestamp of each SFTranscriptionSegment in result is 0 and also confidence is always 0

这里可能是什么问题?苹果还没有正确实现API吗?

What can be the problem here? Have apple not implemented the API properly yet?

谢谢.

推荐答案

几周后,我发现通过设置此项可以得到时间戳和置信度:

After few weeks I found that by setting this I can get timestamp and confidence:

speechRecgzr.defaultTaskHint = SFSpeechRecognitionTaskHintDictation;

这篇关于SFTranscriptionSegment的时间戳始终为0的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆