@euirim/microsoft-cognitiveservices-speech-sdk
Version:
Microsoft Cognitive Services Speech SDK for JavaScript
58 lines (56 loc) • 2.16 kB
JavaScript
;
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT license.
Object.defineProperty(exports, "__esModule", { value: true });
var Exports_1 = require("../Exports");
var TranslationStatus_1 = require("../TranslationStatus");
var TranslationPhrase = /** @class */ (function () {
function TranslationPhrase(json) {
this.privTranslationPhrase = JSON.parse(json);
this.privTranslationPhrase.RecognitionStatus = Exports_1.RecognitionStatus[this.privTranslationPhrase.RecognitionStatus];
if (this.privTranslationPhrase.Translation !== undefined) {
this.privTranslationPhrase.Translation.TranslationStatus = TranslationStatus_1.TranslationStatus[this.privTranslationPhrase.Translation.TranslationStatus];
}
}
TranslationPhrase.fromJSON = function (json) {
return new TranslationPhrase(json);
};
Object.defineProperty(TranslationPhrase.prototype, "RecognitionStatus", {
get: function () {
return this.privTranslationPhrase.RecognitionStatus;
},
enumerable: true,
configurable: true
});
Object.defineProperty(TranslationPhrase.prototype, "Offset", {
get: function () {
return this.privTranslationPhrase.Offset;
},
enumerable: true,
configurable: true
});
Object.defineProperty(TranslationPhrase.prototype, "Duration", {
get: function () {
return this.privTranslationPhrase.Duration;
},
enumerable: true,
configurable: true
});
Object.defineProperty(TranslationPhrase.prototype, "Text", {
get: function () {
return this.privTranslationPhrase.Text;
},
enumerable: true,
configurable: true
});
Object.defineProperty(TranslationPhrase.prototype, "Translation", {
get: function () {
return this.privTranslationPhrase.Translation;
},
enumerable: true,
configurable: true
});
return TranslationPhrase;
}());
exports.TranslationPhrase = TranslationPhrase;
//# sourceMappingURL=TranslationPhrase.js.map