Hello,
How can i receive recognized result without punctuation ?
E.g. Instead of "What is the weather today ?", i'm expecting "What is the weather today" without question mark.
Thank you.
The "Lexical" field in the detailed recognized text does not contain punctuation.
For speech to text, you can turn on detailed format by speechConfig->SetProperty(PropertyId::SpeechServiceResponse_OutputFormatOption, "detailed") before creating the recognizer.
The Lexical field can be retrieved as follows:
auto result = recognizer->RecognizeOnceAsync().get();
string jsonResult = result->Properties.GetProperty(PropertyId::SpeechServiceResponse_JsonResult);
Here is an example of the jsonResult:

Closing the issue as the question was answered.
I am having same issue in javascript sdk and I am using startContinuousRecognitionAsync function. I have added speechConfig.setProperty("SpeechServiceResponse_OutputFormatOption", "detailed") before creating the recognizer object but it's not returning Lexical field in :
recognizer.recognized = function (s, e) {
console.log('recognized text', e.result.properties.getProperty("SpeechServiceResponse_JsonResult"));
};
Am I missing something ? Thank You.
To set the output format use:
speechConfig.outputFormat = sdk.OutputFormat.Detailed;
The property you found about it is an internal one that isn't used by all recognizer types, the config option should work for all types.
@rhurey Thanks it helped. But we need to enablespeechConfig.enableDictation(); so, this Lexical field is not useful. Is there any way to stop auto punctuation please ? Thank You.
Just to make sure I get the right information...
Do you want automatic punctuation turned off, and explicit punctuation to still be on and rendered?
i.e. if the user spoke the words: "Call my wife period" you'd get "Call my wife."
but if the user spoke "Call my wife" you'd get "Call my wife"
?
@rhurey yes. That's exactly we want. Thanks
@rhurey Is there any way to fix my issue please ?
Add this:
speechConfig.setServiceProperty('punctuation', 'explicit', SpeechSDK.ServicePropertyChannel.UriQueryParameter);
To where you initialize your config object.
Most helpful comment
Add this:
speechConfig.setServiceProperty('punctuation', 'explicit', SpeechSDK.ServicePropertyChannel.UriQueryParameter);
To where you initialize your config object.