objective-c - 如何在微软认知语音库中使用objective-c将OutputFormat.simple设置为OutputFormat.detailed?
问题描述
参考| https://docs.microsoft.com/en-us/objectivec/cognitive-services/speech/spxspeechconfiguration
目前在spxspeechconfiguration
objective-c中不包含任何setOutputFormat
允许我们设置它的方法OutputFormat.detailed
。
我需要获取详细信息,因为当前 spxspeechconfiguration 的默认值OutputFormat
是OutputFormat.simple
.
我在 Java for android 看到,它有这个方法 参考| https://docs.microsoft.com/en-us/java/api/com.microsoft.cognitiveservices.speech.speechconfig.setoutputformat?view=azure-java-stable#com_microsoft_cognitiveservices_speech_SpeechConfig_setOutputFormat_OutputFormat_
正如您在 java-android 方法的参考资料中看到的那样,它有setOutputFormat()
,但objective-c 没有。
如何将其设置为OutputFormat.detailed
使用objective-c?请指导我,谢谢。
解决方案
SPXSpeechConfiguration *speechConfig = [[SPXSpeechConfiguration alloc] initWithSubscription:speechKey region:serviceRegion];
[speechConfig setPropertyTo:@"True" byId:SPXSpeechServiceResponseRequestDetailedResultTrueFalse];
经过反复试验,显然SPXSpeechServiceResponseRequestDetailedResultTrueFalse
已经实现,因为它在将属性设置为True
. 也许文档应该更改方法注释,its already implemented
通过一些步骤来设置它,而不是not implemented yet
.
推荐阅读
- javascript - 直接打开表单视图窗口而不是日历 Odoo 10 上的摘要窗口
- datadog - 在 Datadog 的仪表板中显示服务的版本
- ruby - 是否有任何真实世界的字体在 CFF 表的顶部字典中指定编码?
- regex - semver 正则表达式比这个更便携或额外覆盖?
- android - Firebase 在父级观察/查询并忽略其中一个子级
- dart - 如何在 Flutter 中移除 AppBar 前导图标周围的额外填充
- python-2.7 - 面对 StaleElementReferenceException:消息:元素不再是有效的问题。请检查是否有出路
- python-3.x - 使用 selenium 在 python3 中执行 javascript 代码时出错
- java - 您可以从 jsp 文件中 <% %> 块中的 servlet 获取会话属性吗?
- windows - 如何在保留其所有配置文件的同时在同级目录中运行可执行文件?