Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
synthesizer.SynthesisCanceled = function (s, e) {
var cancellationDetails = sdk.CancellationDetails.fromResult(e.result);
var str = "(cancel) Reason: " + sdk.CancellationReason[cancellationDetails.reason];
if (cancellationDetails.reason === sdk.CancellationReason.Error) {
str += ": " + e.result.errorDetails;
}
console.log(str);
};