how to set OutputFormat.simple to OutputFormat.detailed using objective-c in microsoft cognitive speech lib?

212 Views Asked by At

reference|https://learn.microsoft.com/en-us/objectivec/cognitive-services/speech/spxspeechconfiguration

Currently in spxspeechconfiguration objective-c doesn't contain any method like setOutputFormat which allow us to set it OutputFormat.detailed.

I need to get the detailed information, since currently the default of spxspeechconfiguration OutputFormat is OutputFormat.simple.

I saw at Java for android, it has this method reference|https://learn.microsoft.com/en-us/java/api/com.microsoft.cognitiveservices.speech.speechconfig.setoutputformat?view=azure-java-stable#com_microsoft_cognitiveservices_speech_SpeechConfig_setOutputFormat_OutputFormat_

as you can see on the reference for java-android method, it has setOutputFormat(), but objective-c not.

How can I set it up to OutputFormat.detailed using the objective-c? please kindly guide me, thank you.

1

There are 1 best solutions below

0
Yoseph Wijaya On

SPXSpeechConfiguration *speechConfig = [[SPXSpeechConfiguration alloc] initWithSubscription:speechKey region:serviceRegion];

[speechConfig setPropertyTo:@"True" byId:SPXSpeechServiceResponseRequestDetailedResultTrueFalse];

After trial and error, apparently SPXSpeechServiceResponseRequestDetailedResultTrueFalse is already implemented since it returning the detail after set the property to True. maybe documentation should change the method comment that its already implemented with some steps how to set it up, instead of not implemented yet.