How to use the microsoft-cognitiveservices-speech-sdk.CancellationReason function in microsoft-cognitiveservices-speech-sdk

To help you get started, we’ve selected a few microsoft-cognitiveservices-speech-sdk examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github Azure-Samples / cognitive-services-speech-sdk / samples / js / node / synthesis.js View on Github external
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);
        };
github Azure-Samples / cognitive-services-speech-sdk / samples / js / node / synthesis.js View on Github external
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);
        };