{"version":3,"sources":["webpack:///webpack/bootstrap 0e2ea1186289b12c3b9d","webpack:///../src/sdk/Exports.ts","webpack:///../src/common/Exports.ts","webpack:///../src/common.speech/Exports.ts","webpack:///../src/common/Error.ts","webpack:///../src/sdk/Contracts.ts","webpack:///../src/common/Guid.ts","webpack:///../src/common.browser/Exports.ts","webpack:///../src/common/PlatformEvent.ts","webpack:///../src/common.speech/TranslationStatus.ts","webpack:///../src/common.speech/IAuthentication.ts","webpack:///../src/common.speech/RecognitionEvents.ts","webpack:///../src/common/ConnectionMessage.ts","webpack:///../src/common/EventSource.ts","webpack:///../src/common/InMemoryStorage.ts","webpack:///../src/common/List.ts","webpack:///../src/common/Promise.ts","webpack:///../src/common/Queue.ts","webpack:///../src/sdk/Audio/AudioInputStream.ts","webpack:///../src/sdk/Audio/AudioStreamFormat.ts","webpack:///../src/common.speech/SpeechConnectionFactory.ts","webpack:///../src/common.browser/WebsocketMessageAdapter.ts","webpack:///./bundleApp.js","webpack:///../microsoft.cognitiveservices.speech.sdk.ts","webpack:///../src/common.browser/ConsoleLoggingListener.ts","webpack:///../src/common/AudioSourceEvents.ts","webpack:///../src/common/ConnectionEvents.ts","webpack:///../src/common/ConnectionOpenResponse.ts","webpack:///../src/common/Events.ts","webpack:///../src/common/IConnection.ts","webpack:///../src/common/RawWebsocketMessage.ts","webpack:///../src/common/RiffPcmEncoder.ts","webpack:///../src/common/Storage.ts","webpack:///../src/common/Stream.ts","webpack:///../src/common.browser/LocalStorage.ts","webpack:///../src/common.browser/MicAudioSource.ts","webpack:///../src/sdk/Audio/AudioConfig.ts","webpack:///../src/sdk/CancellationReason.ts","webpack:///../src/sdk/Audio/PullAudioInputStreamCallback.ts","webpack:///../src/sdk/KeywordRecognitionModel.ts","webpack:///../src/sdk/SessionEventArgs.ts","webpack:///../src/sdk/RecognitionEventArgs.ts","webpack:///../src/sdk/OutputFormat.ts","webpack:///../src/sdk/IntentRecognitionEventArgs.ts","webpack:///../src/sdk/RecognitionResult.ts","webpack:///../src/sdk/SpeechRecognitionResult.ts","webpack:///../src/sdk/IntentRecognitionResult.ts","webpack:///../src/sdk/LanguageUnderstandingModel.ts","webpack:///../src/sdk/SpeechRecognitionEventArgs.ts","webpack:///../src/sdk/SpeechRecognitionCanceledEventArgs.ts","webpack:///../src/sdk/TranslationRecognitionEventArgs.ts","webpack:///../src/sdk/TranslationSynthesisEventArgs.ts","webpack:///../src/sdk/TranslationRecognitionResult.ts","webpack:///../src/sdk/TranslationSynthesisResult.ts","webpack:///../src/sdk/ResultReason.ts","webpack:///../src/sdk/SpeechConfig.ts","webpack:///../src/common.speech/CognitiveSubscriptionKeyAuthentication.ts","webpack:///../src/common.speech/CognitiveTokenAuthentication.ts","webpack:///../src/common.speech/IntentConnectionFactory.ts","webpack:///../src/common.speech/ServiceRecognizerBase.ts","webpack:///../src/common.speech/SpeechConnectionMessage.Internal.ts","webpack:///../src/common.speech/RecognizerConfig.ts","webpack:///../src/common.speech/WebsocketMessageFormatter.ts","webpack:///../src/common.speech/QueryParameterNames.ts","webpack:///../src/common.speech/TranslationConnectionFactory.ts","webpack:///../src/common.speech/EnumTranslation.ts","webpack:///../src/common.speech/ServiceMessages/Enums.ts","webpack:///../src/common.speech/ServiceMessages/TranslationSynthesisEnd.ts","webpack:///../src/common.speech/ServiceMessages/TranslationHypothesis.ts","webpack:///../src/common.speech/ServiceMessages/TranslationPhrase.ts","webpack:///../src/common.speech/TranslationServiceRecognizer.ts","webpack:///../src/common.speech/ServiceMessages/SpeechDetected.ts","webpack:///../src/common.speech/ServiceMessages/SpeechHypothesis.ts","webpack:///../src/common.speech/SpeechServiceRecognizer.ts","webpack:///../src/common.speech/ServiceMessages/DetailedSpeechPhrase.ts","webpack:///../src/common.speech/ServiceMessages/SimpleSpeechPhrase.ts","webpack:///../src/common.speech/AddedLmIntent.ts","webpack:///../src/common.speech/IntentServiceRecognizer.ts","webpack:///../src/common.speech/ServiceMessages/IntentResponse.ts","webpack:///../src/common.speech/RequestSession.ts","webpack:///../src/common.speech/ServiceTelemetryListener.Internal.ts","webpack:///../src/sdk/SpeechTranslationConfig.ts","webpack:///../src/sdk/PropertyCollection.ts","webpack:///../src/sdk/PropertyId.ts","webpack:///../src/sdk/Recognizer.ts","webpack:///../src/sdk/SpeechRecognizer.ts","webpack:///../src/sdk/IntentRecognizer.ts","webpack:///../src/sdk/TranslationRecognizer.ts","webpack:///../src/sdk/Translations.ts","webpack:///../src/sdk/NoMatchReason.ts","webpack:///../src/sdk/NoMatchDetails.ts","webpack:///../src/sdk/TranslationRecognitionCanceledEventArgs.ts","webpack:///../src/sdk/IntentRecognitionCanceledEventArgs.ts","webpack:///../src/sdk/CancellationDetails.ts","webpack:///../src/sdk/CancellationErrorCodes.ts","webpack:///../src/common.browser/FileAudioSource.ts","webpack:///../src/common.browser/OpusRecorder.ts","webpack:///../src/common.browser/PCMRecorder.ts","webpack:///../src/common.browser/SessionStorage.ts","webpack:///../src/common.browser/Timer.ts","webpack:///../src/common.browser/WebsocketConnection.ts"],"names":[],"mappings":";AAAA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;;AAGA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAK;AACL;AACA;;AAEA;AACA;AACA;AACA,mCAA2B,0BAA0B,EAAE;AACvD,yCAAiC,eAAe;AAChD;AACA;AACA;;AAEA;AACA,8DAAsD,+DAA+D;;AAErH;AACA;;AAEA;AACA;;;;;;;;;AC7DA,EAAE;AACF,gDAAgD;AAChD,8EAA8E;AAC9E,EAAE;;AAEF,4CAAkD;AAAzC,+CAAW;AACpB,kDAA8D;AAArD,iEAAiB;AAC1B,iDAAwG;AAA/F,8DAAgB;AAAE,sEAAoB;AAAE,sEAAoB;AACrE,mDAA0D;AAAjD,oEAAkB;AAC3B,6DAAoF;AAA3E,kGAA4B;AACrC,wDAAoE;AAA3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EAAE,CAAC;gBACR,CAAC;YACL,CAAC;QACL,CAAC;QAED,IAAI,CAAC,GAAG,GAAG,GAAG,GAAG,WAAW,CAAC;QAC7B,IAAI,CAAC,EAAE,GAAG,YAAY,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,CAAC,0BAAgB,EAAE,CAAC;QAE3D,IAAI,CAAC,wBAAwB,GAAG,IAAI,iDAAuB,CACvD,IAAI,CAAC,GAAG,EACR,IAAI,CAAC,EAAE,EACP,IAAI,CAAC,gBAAgB,CAAC,CAAC;IAC/B,CAAC;IAcD,sBAAW,mCAAE;aAAb;YACI,MAAM,CAAC,IAAI,CAAC,EAAE,CAAC;QACnB,CAAC;;;OAAA;IAkBD,sBAAW,uCAAM;aAAjB;YACI,MAAM,CAAC,IAAI,CAAC,wBAAwB,CAAC,MAAM,CAAC;QAChD,CAAC;;;OAAA;IACL,0BAAC;AAAD,CAAC;AA9FY,kDAAmB","file":"microsoft.cognitiveservices.speech.sdk.bundle.js","sourcesContent":[" \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, {\n \t\t\t\tconfigurable: false,\n \t\t\t\tenumerable: true,\n \t\t\t\tget: getter\n \t\t\t});\n \t\t}\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 21);\n\n\n\n// WEBPACK FOOTER //\n// webpack/bootstrap 0e2ea1186289b12c3b9d","//\r\n// copyright (c) Microsoft. All rights reserved.\r\n// See https://aka.ms/csspeech/license201809 for the full license information.\r\n//\r\n\r\nexport { AudioConfig } from \"./Audio/AudioConfig\";\r\nexport { AudioStreamFormat } from \"./Audio/AudioStreamFormat\";\r\nexport { AudioInputStream, PullAudioInputStream, PushAudioInputStream } from \"./Audio/AudioInputStream\";\r\nexport { CancellationReason } from \"./CancellationReason\";\r\nexport { PullAudioInputStreamCallback } from \"./Audio/PullAudioInputStreamCallback\";\r\nexport { KeywordRecognitionModel } from \"./KeywordRecognitionModel\";\r\nexport { SessionEventArgs } from \"./SessionEventArgs\";\r\nexport { RecognitionEventArgs } from \"./RecognitionEventArgs\";\r\nexport { OutputFormat } from \"./OutputFormat\";\r\nexport { IntentRecognitionEventArgs } from \"./IntentRecognitionEventArgs\";\r\nexport { RecognitionResult } from \"./RecognitionResult\";\r\nexport { SpeechRecognitionResult } from \"./SpeechRecognitionResult\";\r\nexport { IntentRecognitionResult } from \"./IntentRecognitionResult\";\r\nexport { LanguageUnderstandingModel } from \"./LanguageUnderstandingModel\";\r\nexport { SpeechRecognitionEventArgs } from \"./SpeechRecognitionEventArgs\";\r\nexport { SpeechRecognitionCanceledEventArgs } from \"./SpeechRecognitionCanceledEventArgs\";\r\nexport { TranslationRecognitionEventArgs } from \"./TranslationRecognitionEventArgs\";\r\nexport { TranslationSynthesisEventArgs } from \"./TranslationSynthesisEventArgs\";\r\nexport { TranslationRecognitionResult } from \"./TranslationRecognitionResult\";\r\nexport { TranslationSynthesisResult } from \"./TranslationSynthesisResult\";\r\nexport { ResultReason } from \"./ResultReason\";\r\nexport { SpeechConfig } from \"./SpeechConfig\";\r\nexport { SpeechTranslationConfig } from \"./SpeechTranslationConfig\";\r\nexport { PropertyCollection } from \"./PropertyCollection\";\r\nexport { PropertyId } from \"./PropertyId\";\r\nexport { Recognizer } from \"./Recognizer\";\r\nexport { SpeechRecognizer } from \"./SpeechRecognizer\";\r\nexport { IntentRecognizer } from \"./IntentRecognizer\";\r\nexport { TranslationRecognizer } from \"./TranslationRecognizer\";\r\nexport { Translations } from \"./Translations\";\r\nexport { NoMatchReason } from \"./NoMatchReason\";\r\nexport { NoMatchDetails } from \"./NoMatchDetails\";\r\nexport { TranslationRecognitionCanceledEventArgs } from \"./TranslationRecognitionCanceledEventArgs\";\r\nexport { IntentRecognitionCanceledEventArgs } from \"./IntentRecognitionCanceledEventArgs\";\r\nexport { CancellationDetails } from \"./CancellationDetails\";\r\nexport { CancellationErrorCode } from \"./CancellationErrorCodes\";\r\n\n\n\n// WEBPACK FOOTER //\n// ../src/sdk/Exports.ts","//\r\n// Copyright (c) Microsoft. All rights reserved.\r\n// See https://aka.ms/csspeech/license201809 for the full license information.\r\n//\r\n\r\nexport * from \"./AudioSourceEvents\";\r\nexport * from \"./ConnectionEvents\";\r\nexport * from \"./ConnectionMessage\";\r\nexport * from \"./ConnectionOpenResponse\";\r\nexport * from \"./Error\";\r\nexport * from \"./Events\";\r\nexport * from \"./EventSource\";\r\nexport * from \"./Guid\";\r\nexport * from \"./IAudioSource\";\r\nexport * from \"./IConnection\";\r\nexport * from \"./IDetachable\";\r\nexport * from \"./IDictionary\";\r\nexport * from \"./IDisposable\";\r\nexport * from \"./IEventSource\";\r\nexport * from \"./IKeyValueStorage\";\r\nexport * from \"./InMemoryStorage\";\r\nexport * from \"./ITimer\";\r\nexport * from \"./IWebsocketMessageFormatter\";\r\nexport * from \"./List\";\r\nexport * from \"./PlatformEvent\";\r\nexport * from \"./Promise\";\r\nexport * from \"./Queue\";\r\nexport * from \"./RawWebsocketMessage\";\r\nexport * from \"./RiffPcmEncoder\";\r\nexport * from \"./Storage\";\r\nexport * from \"./Stream\";\r\nexport { TranslationStatus } from \"../common.speech/TranslationStatus\";\r\n\n\n\n// WEBPACK FOOTER //\n// ../src/common/Exports.ts","//\r\n// Copyright (c) Microsoft. All rights reserved.\r\n// See https://aka.ms/csspeech/license201809 for the full license information.\r\n//\r\n\r\n// IMPORTANT - Dont publish internal modules.\r\n\r\nexport * from \"./CognitiveSubscriptionKeyAuthentication\";\r\nexport * from \"./CognitiveTokenAuthentication\";\r\nexport * from \"./IAuthentication\";\r\nexport * from \"./IConnectionFactory\";\r\nexport * from \"./IntentConnectionFactory\";\r\nexport * from \"./RecognitionEvents\";\r\nexport * from \"./ServiceRecognizerBase\";\r\nexport * from \"./RecognizerConfig\";\r\nexport * from \"./SpeechServiceInterfaces\";\r\nexport * from \"./WebsocketMessageFormatter\";\r\nexport * from \"./SpeechConnectionFactory\";\r\nexport * from \"./TranslationConnectionFactory\";\r\nexport * from \"./EnumTranslation\";\r\nexport * from \"./ServiceMessages/Enums\";\r\nexport * from \"./ServiceMessages/TranslationSynthesisEnd\";\r\nexport * from \"./ServiceMessages/TranslationHypothesis\";\r\nexport * from \"./ServiceMessages/TranslationPhrase\";\r\nexport * from \"./TranslationServiceRecognizer\";\r\nexport * from \"./ServiceMessages/SpeechDetected\";\r\nexport * from \"./ServiceMessages/SpeechHypothesis\";\r\nexport * from \"./SpeechServiceRecognizer\";\r\nexport * from \"./ServiceMessages/DetailedSpeechPhrase\";\r\nexport * from \"./ServiceMessages/SimpleSpeechPhrase\";\r\nexport * from \"./AddedLmIntent\";\r\nexport * from \"./IntentServiceRecognizer\";\r\nexport * from \"./ServiceMessages/IntentResponse\";\r\nexport * from \"./RequestSession\";\r\n\r\nexport const OutputFormatPropertyName: string = \"OutputFormat\";\r\nexport const CancellationErrorCodePropertyName: string = \"CancellationErrorCode\";\r\n\n\n\n// WEBPACK FOOTER //\n// ../src/common.speech/Exports.ts","//\r\n// Copyright (c) Microsoft. All rights reserved.\r\n// See https://aka.ms/csspeech/license201809 for the full license information.\r\n//\r\n\r\n/**\r\n * The error that is thrown when an argument passed in is null.\r\n *\r\n * @export\r\n * @class ArgumentNullError\r\n * @extends {Error}\r\n */\r\nexport class ArgumentNullError extends Error {\r\n\r\n /**\r\n * Creates an instance of ArgumentNullError.\r\n *\r\n * @param {string} argumentName - Name of the argument that is null\r\n *\r\n * @memberOf ArgumentNullError\r\n */\r\n public constructor(argumentName: string) {\r\n super(argumentName);\r\n this.name = \"ArgumentNull\";\r\n this.message = argumentName;\r\n }\r\n}\r\n\r\n/**\r\n * The error that is thrown when an invalid operation is performed in the code.\r\n *\r\n * @export\r\n * @class InvalidOperationError\r\n * @extends {Error}\r\n */\r\n// tslint:disable-next-line:max-classes-per-file\r\nexport class InvalidOperationError extends Error {\r\n\r\n /**\r\n * Creates an instance of InvalidOperationError.\r\n *\r\n * @param {string} error - The error\r\n *\r\n * @memberOf InvalidOperationError\r\n */\r\n public constructor(error: string) {\r\n super(error);\r\n this.name = \"InvalidOperation\";\r\n this.message = error;\r\n }\r\n}\r\n\r\n/**\r\n * The error that is thrown when an object is disposed.\r\n *\r\n * @export\r\n * @class ObjectDisposedError\r\n * @extends {Error}\r\n */\r\n// tslint:disable-next-line:max-classes-per-file\r\nexport class ObjectDisposedError extends Error {\r\n\r\n /**\r\n * Creates an instance of ObjectDisposedError.\r\n *\r\n * @param {string} objectName - The object that is disposed\r\n * @param {string} error - The error\r\n *\r\n * @memberOf ObjectDisposedError\r\n */\r\n public constructor(objectName: string, error?: string) {\r\n super(error);\r\n this.name = objectName + \"ObjectDisposed\";\r\n this.message = error;\r\n }\r\n}\r\n\n\n\n// WEBPACK FOOTER //\n// ../src/common/Error.ts","//\r\n// copyright (c) Microsoft. All rights reserved.\r\n// See https://aka.ms/csspeech/license201809 for the full license information.\r\n//\r\n\r\n/**\r\n * @class Contracts\r\n * @private\r\n */\r\nexport class Contracts {\r\n public static throwIfNullOrUndefined(param: any, name: string): void {\r\n if (param === undefined || param === null) {\r\n throw new Error(\"throwIfNullOrUndefined:\" + name);\r\n }\r\n }\r\n\r\n public static throwIfNull(param: any, name: string): void {\r\n if (param === null) {\r\n throw new Error(\"throwIfNull:\" + name);\r\n }\r\n }\r\n\r\n public static throwIfNullOrWhitespace(param: string, name: string): void {\r\n Contracts.throwIfNullOrUndefined(param, name);\r\n\r\n if ((\"\" + param).trim().length < 1) {\r\n throw new Error(\"throwIfNullOrWhitespace:\" + name);\r\n }\r\n }\r\n\r\n public static throwIfDisposed(isDisposed: boolean): void {\r\n if (isDisposed) {\r\n throw new Error(\"the object is already disposed\");\r\n }\r\n }\r\n\r\n public static throwIfArrayEmptyOrWhitespace(array: string[], name: string): void {\r\n Contracts.throwIfNullOrUndefined(array, name);\r\n\r\n if (array.length === 0) {\r\n throw new Error(\"throwIfArrayEmptyOrWhitespace:\" + name);\r\n }\r\n\r\n for (const item of array) {\r\n Contracts.throwIfNullOrWhitespace(item, name);\r\n }\r\n }\r\n\r\n public static throwIfFileDoesNotExist(param: any, name: string): void {\r\n Contracts.throwIfNullOrWhitespace(param, name);\r\n\r\n // TODO check for file existence.\r\n }\r\n}\r\n\n\n\n// WEBPACK FOOTER //\n// ../src/sdk/Contracts.ts","//\r\n// Copyright (c) Microsoft. All rights reserved.\r\n// See https://aka.ms/csspeech/license201809 for the full license information.\r\n//\r\n\r\nconst CreateGuid: () => string = (): string => {\r\n let d = new Date().getTime();\r\n const guid = \"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx\".replace(/[xy]/g, (c: string) => {\r\n const r = (d + Math.random() * 16) % 16 | 0;\r\n d = Math.floor(d / 16);\r\n return (c === \"x\" ? r : (r & 0x3 | 0x8)).toString(16);\r\n });\r\n\r\n return guid;\r\n};\r\n\r\nconst CreateNoDashGuid: () => string = (): string => {\r\n return CreateGuid().replace(new RegExp(\"-\", \"g\"), \"\").toUpperCase();\r\n};\r\n\r\nexport { CreateGuid, CreateNoDashGuid };\r\n\n\n\n// WEBPACK FOOTER //\n// ../src/common/Guid.ts","//\r\n// Copyright (c) Microsoft. All rights reserved.\r\n// See https://aka.ms/csspeech/license201809 for the full license information.\r\n//\r\n\r\nexport * from \"./ConsoleLoggingListener\";\r\nexport * from \"./IRecorder\";\r\nexport * from \"./LocalStorage\";\r\nexport * from \"./MicAudioSource\";\r\nexport * from \"./FileAudioSource\";\r\nexport * from \"./OpusRecorder\";\r\nexport * from \"./PCMRecorder\";\r\nexport * from \"./SessionStorage\";\r\nexport * from \"./Timer\";\r\nexport * from \"./WebsocketConnection\";\r\nexport * from \"./WebsocketMessageAdapter\";\r\n\n\n\n// WEBPACK FOOTER //\n// ../src/common.browser/Exports.ts","//\r\n// Copyright (c) Microsoft. All rights reserved.\r\n// See https://aka.ms/csspeech/license201809 for the full license information.\r\n//\r\nimport { CreateNoDashGuid } from \"./Guid\";\r\nimport { IStringDictionary } from \"./IDictionary\";\r\n\r\nexport enum EventType {\r\n Debug,\r\n Info,\r\n Warning,\r\n Error,\r\n}\r\n\r\nexport class PlatformEvent {\r\n private name: string;\r\n private eventId: string;\r\n private eventTime: string;\r\n private eventType: EventType;\r\n private metadata: IStringDictionary;\r\n\r\n constructor(eventName: string, eventType: EventType) {\r\n this.name = eventName;\r\n this.eventId = CreateNoDashGuid();\r\n this.eventTime = new Date().toISOString();\r\n this.eventType = eventType;\r\n this.metadata = { };\r\n }\r\n\r\n public get Name(): string {\r\n return this.name;\r\n }\r\n\r\n public get EventId(): string {\r\n return this.eventId;\r\n }\r\n\r\n public get EventTime(): string {\r\n return this.eventTime;\r\n }\r\n\r\n public get EventType(): EventType {\r\n return this.eventType;\r\n }\r\n\r\n public get Metadata(): IStringDictionary {\r\n return this.metadata;\r\n }\r\n}\r\n\n\n\n// WEBPACK FOOTER //\n// ../src/common/PlatformEvent.ts","//\r\n// copyright (c) Microsoft. All rights reserved.\r\n// See https://aka.ms/csspeech/license201809 for the full license information.\r\n//\r\n\r\n/**\r\n * Defines translation status.\r\n * @class TranslationStatus\r\n */\r\nexport enum TranslationStatus {\r\n /**\r\n * @member TranslationStatus.Success\r\n */\r\n Success = 0,\r\n\r\n /**\r\n * @member TranslationStatus.Error\r\n */\r\n Error,\r\n}\r\n\n\n\n// WEBPACK FOOTER //\n// ../src/common.speech/TranslationStatus.ts","//\r\n// Copyright (c) Microsoft. All rights reserved.\r\n// See https://aka.ms/csspeech/license201809 for the full license information.\r\n//\r\nimport { Promise } from \"../common/Exports\";\r\n\r\nexport interface IAuthentication {\r\n Fetch(authFetchEventId: string): Promise;\r\n FetchOnExpiry(authFetchEventId: string): Promise;\r\n}\r\n\r\nexport class AuthInfo {\r\n private headerName: string;\r\n private token: string;\r\n\r\n public constructor(headerName: string, token: string) {\r\n this.headerName = headerName;\r\n this.token = token;\r\n }\r\n\r\n public get HeaderName(): string {\r\n return this.headerName;\r\n }\r\n\r\n public get Token(): string {\r\n return this.token;\r\n }\r\n}\r\n\n\n\n// WEBPACK FOOTER //\n// ../src/common.speech/IAuthentication.ts","//\r\n// Copyright (c) Microsoft. All rights reserved.\r\n// See https://aka.ms/csspeech/license201809 for the full license information.\r\n//\r\nimport {\r\n EventType,\r\n PlatformEvent,\r\n} from \"../common/Exports\";\r\n\r\nexport class SpeechRecognitionEvent extends PlatformEvent {\r\n private requestId: string;\r\n private sessionId: string;\r\n\r\n constructor(eventName: string, requestId: string, sessionId: string, eventType: EventType = EventType.Info) {\r\n super(eventName, eventType);\r\n\r\n this.requestId = requestId;\r\n this.sessionId = sessionId;\r\n }\r\n\r\n public get RequestId(): string {\r\n return this.requestId;\r\n }\r\n\r\n public get SessionId(): string {\r\n return this.sessionId;\r\n }\r\n}\r\n\r\n// tslint:disable-next-line:max-classes-per-file\r\nexport class RecognitionTriggeredEvent extends SpeechRecognitionEvent {\r\n private audioSourceId: string;\r\n private audioNodeId: string;\r\n\r\n constructor(requestId: string, sessionId: string, audioSourceId: string, audioNodeId: string) {\r\n super(\"RecognitionTriggeredEvent\", requestId, sessionId);\r\n\r\n this.audioSourceId = audioSourceId;\r\n this.audioNodeId = audioNodeId;\r\n }\r\n\r\n public get AudioSourceId(): string {\r\n return this.audioSourceId;\r\n }\r\n\r\n public get AudioNodeId(): string {\r\n return this.audioNodeId;\r\n }\r\n}\r\n\r\n// tslint:disable-next-line:max-classes-per-file\r\nexport class ListeningStartedEvent extends SpeechRecognitionEvent {\r\n private audioSourceId: string;\r\n private audioNodeId: string;\r\n\r\n constructor(requestId: string, sessionId: string, audioSourceId: string, audioNodeId: string) {\r\n super(\"ListeningStartedEvent\", requestId, sessionId);\r\n this.audioSourceId = audioSourceId;\r\n this.audioNodeId = audioNodeId;\r\n }\r\n\r\n public get AudioSourceId(): string {\r\n return this.audioSourceId;\r\n }\r\n\r\n public get AudioNodeId(): string {\r\n return this.audioNodeId;\r\n }\r\n}\r\n\r\n// tslint:disable-next-line:max-classes-per-file\r\nexport class ConnectingToServiceEvent extends SpeechRecognitionEvent {\r\n private authFetchEventid: string;\r\n\r\n constructor(requestId: string, authFetchEventid: string, sessionId: string) {\r\n super(\"ConnectingToServiceEvent\", requestId, sessionId);\r\n this.authFetchEventid = authFetchEventid;\r\n }\r\n\r\n public get AuthFetchEventid(): string {\r\n return this.authFetchEventid;\r\n }\r\n}\r\n\r\n// tslint:disable-next-line:max-classes-per-file\r\nexport class RecognitionStartedEvent extends SpeechRecognitionEvent {\r\n private audioSourceId: string;\r\n private audioNodeId: string;\r\n private authFetchEventId: string;\r\n\r\n constructor(requestId: string, audioSourceId: string, audioNodeId: string, authFetchEventId: string, sessionId: string) {\r\n super(\"RecognitionStartedEvent\", requestId, sessionId);\r\n\r\n this.audioSourceId = audioSourceId;\r\n this.audioNodeId = audioNodeId;\r\n this.authFetchEventId = authFetchEventId;\r\n }\r\n\r\n public get AudioSourceId(): string {\r\n return this.audioSourceId;\r\n }\r\n\r\n public get AudioNodeId(): string {\r\n return this.audioNodeId;\r\n }\r\n\r\n public get AuthFetchEventId(): string {\r\n return this.authFetchEventId;\r\n }\r\n}\r\n\r\nexport enum RecognitionCompletionStatus {\r\n Success,\r\n AudioSourceError,\r\n AudioSourceTimeout,\r\n AuthTokenFetchError,\r\n AuthTokenFetchTimeout,\r\n UnAuthorized,\r\n ConnectTimeout,\r\n ConnectError,\r\n ClientRecognitionActivityTimeout,\r\n UnknownError,\r\n}\r\n\r\n// tslint:disable-next-line:max-classes-per-file\r\nexport class RecognitionEndedEvent extends SpeechRecognitionEvent {\r\n private audioSourceId: string;\r\n private audioNodeId: string;\r\n private authFetchEventId: string;\r\n private serviceTag: string;\r\n private status: RecognitionCompletionStatus;\r\n private error: string;\r\n\r\n constructor(\r\n requestId: string,\r\n audioSourceId: string,\r\n audioNodeId: string,\r\n authFetchEventId: string,\r\n sessionId: string,\r\n serviceTag: string,\r\n status: RecognitionCompletionStatus,\r\n error: string) {\r\n\r\n super(\"RecognitionEndedEvent\", requestId, sessionId, status === RecognitionCompletionStatus.Success ? EventType.Info : EventType.Error);\r\n\r\n this.audioSourceId = audioSourceId;\r\n this.audioNodeId = audioNodeId;\r\n this.authFetchEventId = authFetchEventId;\r\n this.status = status;\r\n this.error = error;\r\n this.serviceTag = serviceTag;\r\n }\r\n\r\n public get AudioSourceId(): string {\r\n return this.audioSourceId;\r\n }\r\n\r\n public get AudioNodeId(): string {\r\n return this.audioNodeId;\r\n }\r\n\r\n public get AuthFetchEventId(): string {\r\n return this.authFetchEventId;\r\n }\r\n\r\n public get ServiceTag(): string {\r\n return this.serviceTag;\r\n }\r\n\r\n public get Status(): RecognitionCompletionStatus {\r\n return this.status;\r\n }\r\n\r\n public get Error(): string {\r\n return this.error;\r\n }\r\n}\r\n\n\n\n// WEBPACK FOOTER //\n// ../src/common.speech/RecognitionEvents.ts","//\r\n// Copyright (c) Microsoft. All rights reserved.\r\n// See https://aka.ms/csspeech/license201809 for the full license information.\r\n//\r\nimport { InvalidOperationError } from \"./Error\";\r\nimport { CreateNoDashGuid } from \"./Guid\";\r\nimport { IStringDictionary } from \"./IDictionary\";\r\n\r\nexport enum MessageType {\r\n Text,\r\n Binary,\r\n}\r\n\r\nexport class ConnectionMessage {\r\n\r\n private messageType: MessageType;\r\n private headers: IStringDictionary;\r\n private body: any = null;\r\n\r\n private id: string;\r\n\r\n public constructor(\r\n messageType: MessageType,\r\n body: any,\r\n headers?: IStringDictionary,\r\n id?: string) {\r\n\r\n if (messageType === MessageType.Text && body && !(typeof (body) === \"string\")) {\r\n throw new InvalidOperationError(\"Payload must be a string\");\r\n }\r\n\r\n if (messageType === MessageType.Binary && body && !(body instanceof ArrayBuffer)) {\r\n throw new InvalidOperationError(\"Payload must be ArrayBuffer\");\r\n }\r\n\r\n this.messageType = messageType;\r\n this.body = body;\r\n this.headers = headers ? headers : {};\r\n this.id = id ? id : CreateNoDashGuid();\r\n }\r\n\r\n public get MessageType(): MessageType {\r\n return this.messageType;\r\n }\r\n\r\n public get Headers(): any {\r\n return this.headers;\r\n }\r\n\r\n public get Body(): any {\r\n return this.body;\r\n }\r\n\r\n public get TextBody(): string {\r\n if (this.messageType === MessageType.Binary) {\r\n throw new InvalidOperationError(\"Not supported for binary message\");\r\n }\r\n\r\n return this.body as string;\r\n }\r\n\r\n public get BinaryBody(): ArrayBuffer {\r\n if (this.messageType === MessageType.Text) {\r\n throw new InvalidOperationError(\"Not supported for text message\");\r\n }\r\n\r\n return this.body;\r\n }\r\n\r\n public get Id(): string {\r\n return this.id;\r\n }\r\n}\r\n\n\n\n// WEBPACK FOOTER //\n// ../src/common/ConnectionMessage.ts","//\r\n// Copyright (c) Microsoft. All rights reserved.\r\n// See https://aka.ms/csspeech/license201809 for the full license information.\r\n//\r\nimport { ObjectDisposedError } from \"./Error\";\r\nimport { CreateNoDashGuid } from \"./Guid\";\r\nimport { IDetachable } from \"./IDetachable\";\r\nimport { IStringDictionary } from \"./IDictionary\";\r\nimport { IEventListener, IEventSource } from \"./IEventSource\";\r\nimport { PlatformEvent } from \"./PlatformEvent\";\r\n\r\nexport class EventSource implements IEventSource {\r\n private eventListeners: IStringDictionary<(event: TEvent) => void> = {};\r\n private metadata: IStringDictionary;\r\n private isDisposed: boolean = false;\r\n\r\n constructor(metadata?: IStringDictionary) {\r\n this.metadata = metadata;\r\n }\r\n\r\n public OnEvent = (event: TEvent): void => {\r\n if (this.IsDisposed()) {\r\n throw (new ObjectDisposedError(\"EventSource\"));\r\n }\r\n\r\n if (this.Metadata) {\r\n for (const paramName in this.Metadata) {\r\n if (paramName) {\r\n if (event.Metadata) {\r\n if (!event.Metadata[paramName]) {\r\n event.Metadata[paramName] = this.Metadata[paramName];\r\n }\r\n }\r\n }\r\n }\r\n }\r\n\r\n for (const eventId in this.eventListeners) {\r\n if (eventId && this.eventListeners[eventId]) {\r\n this.eventListeners[eventId](event);\r\n }\r\n }\r\n }\r\n\r\n public Attach = (onEventCallback: (event: TEvent) => void): IDetachable => {\r\n const id = CreateNoDashGuid();\r\n this.eventListeners[id] = onEventCallback;\r\n return {\r\n Detach: () => {\r\n delete this.eventListeners[id];\r\n },\r\n };\r\n }\r\n\r\n public AttachListener = (listener: IEventListener): IDetachable => {\r\n return this.Attach(listener.OnEvent);\r\n }\r\n\r\n public IsDisposed = (): boolean => {\r\n return this.isDisposed;\r\n }\r\n\r\n public Dispose = (): void => {\r\n this.eventListeners = null;\r\n this.isDisposed = true;\r\n }\r\n\r\n public get Metadata(): IStringDictionary {\r\n return this.metadata;\r\n }\r\n}\r\n\n\n\n// WEBPACK FOOTER //\n// ../src/common/EventSource.ts","//\r\n// Copyright (c) Microsoft. All rights reserved.\r\n// See https://aka.ms/csspeech/license201809 for the full license information.\r\n//\r\nimport { ArgumentNullError } from \"./Error\";\r\nimport { IStringDictionary } from \"./IDictionary\";\r\nimport { IKeyValueStorage } from \"./IKeyValueStorage\";\r\n\r\nexport class InMemoryStorage implements IKeyValueStorage {\r\n\r\n private store: IStringDictionary = {};\r\n\r\n public Get = (key: string): string => {\r\n if (!key) {\r\n throw new ArgumentNullError(\"key\");\r\n }\r\n\r\n return this.store[key];\r\n }\r\n\r\n public GetOrAdd = (key: string, valueToAdd: string): string => {\r\n if (!key) {\r\n throw new ArgumentNullError(\"key\");\r\n }\r\n\r\n if (this.store[key] === undefined) {\r\n this.store[key] = valueToAdd;\r\n }\r\n\r\n return this.store[key];\r\n }\r\n\r\n public Set = (key: string, value: string): void => {\r\n if (!key) {\r\n throw new ArgumentNullError(\"key\");\r\n }\r\n\r\n this.store[key] = value;\r\n }\r\n\r\n public Remove = (key: string): void => {\r\n if (!key) {\r\n throw new ArgumentNullError(\"key\");\r\n }\r\n\r\n if (this.store[key] !== undefined) {\r\n delete this.store[key];\r\n }\r\n }\r\n}\r\n\n\n\n// WEBPACK FOOTER //\n// ../src/common/InMemoryStorage.ts","//\r\n// Copyright (c) Microsoft. All rights reserved.\r\n// See https://aka.ms/csspeech/license201809 for the full license information.\r\n//\r\nimport { ObjectDisposedError } from \"./Error\";\r\nimport { IDetachable } from \"./IDetachable\";\r\nimport { IStringDictionary } from \"./IDictionary\";\r\nimport { IDisposable } from \"./IDisposable\";\r\n\r\nexport interface IList extends IDisposable {\r\n Get(itemIndex: number): TItem;\r\n First(): TItem;\r\n Last(): TItem;\r\n\r\n Add(item: TItem): void;\r\n InsertAt(index: number, item: TItem): void;\r\n\r\n RemoveFirst(): TItem;\r\n RemoveLast(): TItem;\r\n RemoveAt(index: number): TItem;\r\n Remove(index: number, count: number): TItem[];\r\n Clear(): void;\r\n\r\n Length(): number;\r\n\r\n OnAdded(addedCallback: () => void): IDetachable;\r\n OnRemoved(removedCallback: () => void): IDetachable;\r\n OnDisposed(disposedCallback: () => void): IDetachable;\r\n\r\n Join(seperator?: string): string;\r\n\r\n ToArray(): TItem[];\r\n\r\n Any(callback?: (item: TItem, index: number) => boolean): boolean;\r\n All(callback: (item: TItem) => boolean): boolean;\r\n ForEach(callback: (item: TItem, index: number) => void): void;\r\n Select(callback: (item: TItem, index: number) => T2): List;\r\n Where(callback: (item: TItem, index: number) => boolean): List;\r\n OrderBy(compareFn: (a: TItem, b: TItem) => number): List;\r\n OrderByDesc(compareFn: (a: TItem, b: TItem) => number): List;\r\n Clone(): List;\r\n Concat(list: List): List;\r\n ConcatArray(array: TItem[]): List;\r\n}\r\n\r\nexport class List implements IList {\r\n private list: TItem[];\r\n private subscriptionIdCounter: number = 0;\r\n private addSubscriptions: IStringDictionary<() => void> = {};\r\n private removeSubscriptions: IStringDictionary<() => void> = {};\r\n private disposedSubscriptions: IStringDictionary<() => void> = {};\r\n private disposeReason: string = null;\r\n\r\n public constructor(list?: TItem[]) {\r\n this.list = [];\r\n // copy the list rather than taking as is.\r\n if (list) {\r\n for (const item of list) {\r\n this.list.push(item);\r\n }\r\n }\r\n }\r\n\r\n public Get = (itemIndex: number): TItem => {\r\n this.ThrowIfDisposed();\r\n return this.list[itemIndex];\r\n }\r\n\r\n public First = (): TItem => {\r\n return this.Get(0);\r\n }\r\n\r\n public Last = (): TItem => {\r\n return this.Get(this.Length() - 1);\r\n }\r\n\r\n public Add = (item: TItem): void => {\r\n this.ThrowIfDisposed();\r\n this.InsertAt(this.list.length, item);\r\n }\r\n\r\n public InsertAt = (index: number, item: TItem): void => {\r\n this.ThrowIfDisposed();\r\n if (index === 0) {\r\n this.list.unshift(item);\r\n } else if (index === this.list.length) {\r\n this.list.push(item);\r\n } else {\r\n this.list.splice(index, 0, item);\r\n }\r\n this.TriggerSubscriptions(this.addSubscriptions);\r\n }\r\n\r\n public RemoveFirst = (): TItem => {\r\n this.ThrowIfDisposed();\r\n return this.RemoveAt(0);\r\n }\r\n\r\n public RemoveLast = (): TItem => {\r\n this.ThrowIfDisposed();\r\n return this.RemoveAt(this.Length() - 1);\r\n }\r\n\r\n public RemoveAt = (index: number): TItem => {\r\n this.ThrowIfDisposed();\r\n return this.Remove(index, 1)[0];\r\n }\r\n\r\n public Remove = (index: number, count: number): TItem[] => {\r\n this.ThrowIfDisposed();\r\n const removedElements = this.list.splice(index, count);\r\n this.TriggerSubscriptions(this.removeSubscriptions);\r\n return removedElements;\r\n }\r\n\r\n public Clear = (): void => {\r\n this.ThrowIfDisposed();\r\n this.Remove(0, this.Length());\r\n }\r\n\r\n public Length = (): number => {\r\n this.ThrowIfDisposed();\r\n return this.list.length;\r\n }\r\n\r\n public OnAdded = (addedCallback: () => void): IDetachable => {\r\n this.ThrowIfDisposed();\r\n const subscriptionId = this.subscriptionIdCounter++;\r\n\r\n this.addSubscriptions[subscriptionId] = addedCallback;\r\n\r\n return {\r\n Detach: () => {\r\n delete this.addSubscriptions[subscriptionId];\r\n },\r\n };\r\n }\r\n\r\n public OnRemoved = (removedCallback: () => void): IDetachable => {\r\n this.ThrowIfDisposed();\r\n const subscriptionId = this.subscriptionIdCounter++;\r\n\r\n this.removeSubscriptions[subscriptionId] = removedCallback;\r\n\r\n return {\r\n Detach: () => {\r\n delete this.removeSubscriptions[subscriptionId];\r\n },\r\n };\r\n }\r\n\r\n public OnDisposed = (disposedCallback: () => void): IDetachable => {\r\n this.ThrowIfDisposed();\r\n const subscriptionId = this.subscriptionIdCounter++;\r\n\r\n this.disposedSubscriptions[subscriptionId] = disposedCallback;\r\n\r\n return {\r\n Detach: () => {\r\n delete this.disposedSubscriptions[subscriptionId];\r\n },\r\n };\r\n }\r\n\r\n public Join = (seperator?: string): string => {\r\n this.ThrowIfDisposed();\r\n return this.list.join(seperator);\r\n }\r\n\r\n public ToArray = (): TItem[] => {\r\n const cloneCopy = Array();\r\n this.list.forEach((val: TItem) => {\r\n cloneCopy.push(val);\r\n });\r\n return cloneCopy;\r\n }\r\n\r\n public Any = (callback?: (item: TItem, index: number) => boolean): boolean => {\r\n this.ThrowIfDisposed();\r\n if (callback) {\r\n return this.Where(callback).Length() > 0;\r\n } else {\r\n return this.Length() > 0;\r\n }\r\n }\r\n\r\n public All = (callback: (item: TItem) => boolean): boolean => {\r\n this.ThrowIfDisposed();\r\n return this.Where(callback).Length() === this.Length();\r\n }\r\n\r\n public ForEach = (callback: (item: TItem, index: number) => void): void => {\r\n this.ThrowIfDisposed();\r\n for (let i = 0; i < this.Length(); i++) {\r\n callback(this.list[i], i);\r\n }\r\n }\r\n\r\n public Select = (callback: (item: TItem, index: number) => T2): List => {\r\n this.ThrowIfDisposed();\r\n const selectList: T2[] = [];\r\n for (let i = 0; i < this.list.length; i++) {\r\n selectList.push(callback(this.list[i], i));\r\n }\r\n\r\n return new List(selectList);\r\n }\r\n\r\n public Where = (callback: (item: TItem, index: number) => boolean): List => {\r\n this.ThrowIfDisposed();\r\n const filteredList = new List();\r\n for (let i = 0; i < this.list.length; i++) {\r\n if (callback(this.list[i], i)) {\r\n filteredList.Add(this.list[i]);\r\n }\r\n }\r\n return filteredList;\r\n }\r\n\r\n public OrderBy = (compareFn: (a: TItem, b: TItem) => number): List => {\r\n this.ThrowIfDisposed();\r\n const clonedArray = this.ToArray();\r\n const orderedArray = clonedArray.sort(compareFn);\r\n return new List(orderedArray);\r\n }\r\n\r\n public OrderByDesc = (compareFn: (a: TItem, b: TItem) => number): List => {\r\n this.ThrowIfDisposed();\r\n return this.OrderBy((a: TItem, b: TItem) => compareFn(b, a));\r\n }\r\n\r\n public Clone = (): List => {\r\n this.ThrowIfDisposed();\r\n return new List(this.ToArray());\r\n }\r\n\r\n public Concat = (list: List): List => {\r\n this.ThrowIfDisposed();\r\n return new List(this.list.concat(list.ToArray()));\r\n }\r\n\r\n public ConcatArray = (array: TItem[]): List => {\r\n this.ThrowIfDisposed();\r\n return new List(this.list.concat(array));\r\n }\r\n\r\n public IsDisposed = (): boolean => {\r\n return this.list == null;\r\n }\r\n\r\n public Dispose = (reason?: string): void => {\r\n if (!this.IsDisposed()) {\r\n this.disposeReason = reason;\r\n this.list = null;\r\n this.addSubscriptions = null;\r\n this.removeSubscriptions = null;\r\n this.TriggerSubscriptions(this.disposedSubscriptions);\r\n }\r\n }\r\n\r\n private ThrowIfDisposed = (): void => {\r\n if (this.IsDisposed()) {\r\n throw new ObjectDisposedError(\"List\", this.disposeReason);\r\n }\r\n }\r\n\r\n private TriggerSubscriptions = (subscriptions: IStringDictionary<() => void>): void => {\r\n if (subscriptions) {\r\n for (const subscriptionId in subscriptions) {\r\n if (subscriptionId) {\r\n subscriptions[subscriptionId]();\r\n }\r\n }\r\n }\r\n }\r\n}\r\n\n\n\n// WEBPACK FOOTER //\n// ../src/common/List.ts","//\r\n// Copyright (c) Microsoft. All rights reserved.\r\n// See https://aka.ms/csspeech/license201809 for the full license information.\r\n//\r\nimport { ArgumentNullError } from \"./Error\";\r\n\r\nexport enum PromiseState {\r\n None,\r\n Resolved,\r\n Rejected,\r\n}\r\n\r\nexport interface IPromise {\r\n Result(): PromiseResult;\r\n\r\n ContinueWith(\r\n continuationCallback: (promiseResult: PromiseResult) => TContinuationResult): IPromise;\r\n\r\n ContinueWithPromise(\r\n continuationCallback: (promiseResult: PromiseResult) => IPromise): IPromise;\r\n\r\n OnSuccessContinueWith(\r\n continuationCallback: (result: T) => TContinuationResult): IPromise;\r\n\r\n OnSuccessContinueWithPromise(\r\n continuationCallback: (result: T) => IPromise): IPromise;\r\n\r\n On(successCallback: (result: T) => void, errorCallback: (error: string) => void): IPromise;\r\n\r\n Finally(callback: () => void): IPromise;\r\n}\r\n\r\nexport interface IDeferred {\r\n State(): PromiseState;\r\n\r\n Promise(): IPromise;\r\n\r\n Resolve(result: T): IDeferred;\r\n\r\n Reject(error: string): IDeferred;\r\n}\r\n\r\nexport class PromiseResult {\r\n protected isCompleted: boolean;\r\n protected isError: boolean;\r\n protected error: string;\r\n protected result: T;\r\n\r\n public constructor(promiseResultEventSource: PromiseResultEventSource) {\r\n promiseResultEventSource.On((result: T) => {\r\n if (!this.isCompleted) {\r\n this.isCompleted = true;\r\n this.isError = false;\r\n this.result = result;\r\n }\r\n }, (error: string) => {\r\n if (!this.isCompleted) {\r\n this.isCompleted = true;\r\n this.isError = true;\r\n this.error = error;\r\n }\r\n });\r\n }\r\n\r\n public get IsCompleted(): boolean {\r\n return this.isCompleted;\r\n }\r\n\r\n public get IsError(): boolean {\r\n return this.isError;\r\n }\r\n\r\n public get Error(): string {\r\n return this.error;\r\n }\r\n\r\n public get Result(): T {\r\n return this.result;\r\n }\r\n\r\n public ThrowIfError = (): void => {\r\n if (this.IsError) {\r\n throw this.Error;\r\n }\r\n }\r\n}\r\n\r\n// tslint:disable-next-line:max-classes-per-file\r\nexport class PromiseResultEventSource {\r\n\r\n private onSetResult: (result: T) => void;\r\n private onSetError: (error: string) => void;\r\n\r\n public SetResult = (result: T): void => {\r\n this.onSetResult(result);\r\n }\r\n\r\n public SetError = (error: string): void => {\r\n this.onSetError(error);\r\n }\r\n\r\n public On = (onSetResult: (result: T) => void, onSetError: (error: string) => void): void => {\r\n this.onSetResult = onSetResult;\r\n this.onSetError = onSetError;\r\n }\r\n}\r\n\r\n// tslint:disable-next-line:max-classes-per-file\r\nexport class PromiseHelper {\r\n public static WhenAll = (promises: Array>): Promise => {\r\n if (!promises || promises.length === 0) {\r\n throw new ArgumentNullError(\"promises\");\r\n }\r\n\r\n const deferred = new Deferred();\r\n const errors: string[] = [];\r\n let completedPromises: number = 0;\r\n\r\n const checkForCompletion = () => {\r\n completedPromises++;\r\n if (completedPromises === promises.length) {\r\n if (errors.length === 0) {\r\n deferred.Resolve(true);\r\n } else {\r\n deferred.Reject(errors.join(\", \"));\r\n }\r\n }\r\n };\r\n\r\n for (const promise of promises) {\r\n promise.On((r: any) => {\r\n checkForCompletion();\r\n }, (e: string) => {\r\n errors.push(e);\r\n checkForCompletion();\r\n });\r\n }\r\n\r\n return deferred.Promise();\r\n }\r\n\r\n public static FromResult = (result: TResult): Promise => {\r\n const deferred = new Deferred();\r\n deferred.Resolve(result);\r\n return deferred.Promise();\r\n }\r\n\r\n public static FromError = (error: string): Promise => {\r\n const deferred = new Deferred();\r\n deferred.Reject(error);\r\n return deferred.Promise();\r\n }\r\n}\r\n\r\n// TODO: replace with ES6 promises\r\n// tslint:disable-next-line:max-classes-per-file\r\nexport class Promise implements IPromise {\r\n\r\n private sink: Sink;\r\n\r\n public constructor(sink: Sink) {\r\n this.sink = sink;\r\n }\r\n\r\n public Result = (): PromiseResult => {\r\n return this.sink.Result;\r\n }\r\n\r\n public ContinueWith = (\r\n continuationCallback: (promiseResult: PromiseResult) => TContinuationResult): Promise => {\r\n\r\n if (!continuationCallback) {\r\n throw new ArgumentNullError(\"continuationCallback\");\r\n }\r\n\r\n const continuationDeferral = new Deferred();\r\n\r\n this.sink.on(\r\n (r: T) => {\r\n try {\r\n const continuationResult: TContinuationResult = continuationCallback(this.sink.Result);\r\n continuationDeferral.Resolve(continuationResult);\r\n } catch (e) {\r\n continuationDeferral.Reject(e);\r\n }\r\n },\r\n (error: string) => {\r\n try {\r\n const continuationResult: TContinuationResult = continuationCallback(this.sink.Result);\r\n continuationDeferral.Resolve(continuationResult);\r\n } catch (e) {\r\n continuationDeferral.Reject(`'Error handler for error ${error} threw error ${e}'`);\r\n }\r\n },\r\n );\r\n\r\n return continuationDeferral.Promise();\r\n }\r\n\r\n public OnSuccessContinueWith = (\r\n continuationCallback: (result: T) => TContinuationResult): Promise => {\r\n\r\n if (!continuationCallback) {\r\n throw new ArgumentNullError(\"continuationCallback\");\r\n }\r\n\r\n const continuationDeferral = new Deferred();\r\n\r\n this.sink.on(\r\n (r: T) => {\r\n try {\r\n const continuationResult: TContinuationResult = continuationCallback(r);\r\n continuationDeferral.Resolve(continuationResult);\r\n } catch (e) {\r\n continuationDeferral.Reject(e);\r\n }\r\n },\r\n (error: string) => {\r\n continuationDeferral.Reject(error);\r\n },\r\n );\r\n\r\n return continuationDeferral.Promise();\r\n }\r\n\r\n public ContinueWithPromise = (\r\n continuationCallback: (promiseResult: PromiseResult) => Promise): Promise => {\r\n\r\n if (!continuationCallback) {\r\n throw new ArgumentNullError(\"continuationCallback\");\r\n }\r\n\r\n const continuationDeferral = new Deferred();\r\n\r\n this.sink.on(\r\n (r: T) => {\r\n try {\r\n const continuationPromise: Promise = continuationCallback(this.sink.Result);\r\n if (!continuationPromise) {\r\n throw new Error(\"'Continuation callback did not return promise'\");\r\n }\r\n continuationPromise.On((continuationResult: TContinuationResult) => {\r\n continuationDeferral.Resolve(continuationResult);\r\n }, (e: string) => {\r\n continuationDeferral.Reject(e);\r\n });\r\n } catch (e) {\r\n continuationDeferral.Reject(e);\r\n }\r\n },\r\n (error: string) => {\r\n try {\r\n const continuationPromise: Promise = continuationCallback(this.sink.Result);\r\n if (!continuationPromise) {\r\n throw new Error(\"Continuation callback did not return promise\");\r\n }\r\n continuationPromise.On((continuationResult: TContinuationResult) => {\r\n continuationDeferral.Resolve(continuationResult);\r\n }, (e: string) => {\r\n continuationDeferral.Reject(e);\r\n });\r\n } catch (e) {\r\n continuationDeferral.Reject(`'Error handler for error ${error} threw error ${e}'`);\r\n }\r\n },\r\n );\r\n\r\n return continuationDeferral.Promise();\r\n }\r\n\r\n public OnSuccessContinueWithPromise = (\r\n continuationCallback: (result: T) => Promise): Promise => {\r\n\r\n if (!continuationCallback) {\r\n throw new ArgumentNullError(\"continuationCallback\");\r\n }\r\n\r\n const continuationDeferral = new Deferred();\r\n\r\n this.sink.on(\r\n (r: T) => {\r\n try {\r\n const continuationPromise: Promise = continuationCallback(r);\r\n if (!continuationPromise) {\r\n throw new Error(\"Continuation callback did not return promise\");\r\n }\r\n continuationPromise.On((continuationResult: TContinuationResult) => {\r\n continuationDeferral.Resolve(continuationResult);\r\n }, (e: string) => {\r\n continuationDeferral.Reject(e);\r\n });\r\n } catch (e) {\r\n continuationDeferral.Reject(e);\r\n }\r\n },\r\n (error: string) => {\r\n continuationDeferral.Reject(error);\r\n },\r\n );\r\n\r\n return continuationDeferral.Promise();\r\n }\r\n\r\n public On = (\r\n successCallback: (result: T) => void,\r\n errorCallback: (error: string) => void): Promise => {\r\n if (!successCallback) {\r\n throw new ArgumentNullError(\"successCallback\");\r\n }\r\n\r\n if (!errorCallback) {\r\n throw new ArgumentNullError(\"errorCallback\");\r\n }\r\n\r\n this.sink.on(successCallback, errorCallback);\r\n return this;\r\n }\r\n\r\n public Finally = (callback: () => void): Promise => {\r\n if (!callback) {\r\n throw new ArgumentNullError(\"callback\");\r\n }\r\n\r\n const callbackWrapper = (_: any) => {\r\n callback();\r\n };\r\n\r\n return this.On(callbackWrapper, callbackWrapper);\r\n }\r\n}\r\n\r\n// tslint:disable-next-line:max-classes-per-file\r\nexport class Deferred implements IDeferred {\r\n\r\n private promise: Promise;\r\n private sink: Sink;\r\n\r\n public constructor() {\r\n this.sink = new Sink();\r\n this.promise = new Promise(this.sink);\r\n }\r\n\r\n public State = (): PromiseState => {\r\n return this.sink.State;\r\n }\r\n\r\n public Promise = (): Promise => {\r\n return this.promise;\r\n }\r\n\r\n public Resolve = (result: T): Deferred => {\r\n this.sink.Resolve(result);\r\n return this;\r\n }\r\n\r\n public Reject = (error: string): Deferred => {\r\n this.sink.Reject(error);\r\n return this;\r\n }\r\n}\r\n\r\n// tslint:disable-next-line:max-classes-per-file\r\nexport class Sink {\r\n\r\n private state: PromiseState = PromiseState.None;\r\n private promiseResult: PromiseResult = null;\r\n private promiseResultEvents: PromiseResultEventSource = null;\r\n\r\n private successHandlers: Array<((result: T) => void)> = [];\r\n private errorHandlers: Array<(e: string) => void> = [];\r\n\r\n public constructor() {\r\n this.promiseResultEvents = new PromiseResultEventSource();\r\n this.promiseResult = new PromiseResult(this.promiseResultEvents);\r\n }\r\n\r\n public get State(): PromiseState {\r\n return this.state;\r\n }\r\n\r\n public get Result(): PromiseResult {\r\n return this.promiseResult;\r\n }\r\n\r\n public Resolve = (result: T): void => {\r\n if (this.state !== PromiseState.None) {\r\n throw new Error(\"'Cannot resolve a completed promise'\");\r\n }\r\n\r\n this.state = PromiseState.Resolved;\r\n this.promiseResultEvents.SetResult(result);\r\n\r\n for (let i = 0; i < this.successHandlers.length; i++) {\r\n this.ExecuteSuccessCallback(result, this.successHandlers[i], this.errorHandlers[i]);\r\n }\r\n\r\n this.DetachHandlers();\r\n }\r\n\r\n public Reject = (error: string): void => {\r\n if (this.state !== PromiseState.None) {\r\n throw new Error(\"'Cannot reject a completed promise'\");\r\n }\r\n\r\n this.state = PromiseState.Rejected;\r\n this.promiseResultEvents.SetError(error);\r\n\r\n for (const errorHandler of this.errorHandlers) {\r\n this.ExecuteErrorCallback(error, errorHandler);\r\n }\r\n\r\n this.DetachHandlers();\r\n }\r\n\r\n public on = (\r\n successCallback: (result: T) => void,\r\n errorCallback: (error: string) => void): void => {\r\n\r\n if (successCallback == null) {\r\n successCallback = (r: T) => { return; };\r\n }\r\n\r\n if (this.state === PromiseState.None) {\r\n this.successHandlers.push(successCallback);\r\n this.errorHandlers.push(errorCallback);\r\n } else {\r\n if (this.state === PromiseState.Resolved) {\r\n this.ExecuteSuccessCallback(this.promiseResult.Result, successCallback, errorCallback);\r\n } else if (this.state === PromiseState.Rejected) {\r\n this.ExecuteErrorCallback(this.promiseResult.Error, errorCallback);\r\n }\r\n\r\n this.DetachHandlers();\r\n }\r\n }\r\n\r\n private ExecuteSuccessCallback = (result: T, successCallback: (result: T) => void, errorCallback: (error: string) => void): void => {\r\n try {\r\n successCallback(result);\r\n } catch (e) {\r\n this.ExecuteErrorCallback(`'Unhandled callback error: ${e}'`, errorCallback);\r\n }\r\n }\r\n\r\n private ExecuteErrorCallback = (error: string, errorCallback: (error: string) => void): void => {\r\n if (errorCallback) {\r\n try {\r\n errorCallback(error);\r\n } catch (e) {\r\n throw new Error(`'Unhandled callback error: ${e}. InnerError: ${error}'`);\r\n }\r\n } else {\r\n throw new Error(`'Unhandled error: ${error}'`);\r\n }\r\n }\r\n\r\n private DetachHandlers = (): void => {\r\n this.errorHandlers = [];\r\n this.successHandlers = [];\r\n }\r\n}\r\n\n\n\n// WEBPACK FOOTER //\n// ../src/common/Promise.ts","//\r\n// Copyright (c) Microsoft. All rights reserved.\r\n// See https://aka.ms/csspeech/license201809 for the full license information.\r\n//\r\nimport { InvalidOperationError, ObjectDisposedError } from \"./Error\";\r\nimport { IDetachable } from \"./IDetachable\";\r\nimport { IDisposable } from \"./IDisposable\";\r\nimport { List } from \"./List\";\r\nimport { Deferred, Promise, PromiseHelper } from \"./Promise\";\r\n\r\nexport interface IQueue extends IDisposable {\r\n Enqueue(item: TItem): void;\r\n EnqueueFromPromise(promise: Promise): void;\r\n Dequeue(): Promise;\r\n Peek(): Promise;\r\n Length(): number;\r\n}\r\n\r\nenum SubscriberType {\r\n Dequeue,\r\n Peek,\r\n}\r\n\r\nexport class Queue implements IQueue {\r\n private promiseStore: List> = new List>();\r\n private list: List;\r\n private detachables: IDetachable[];\r\n private subscribers: List<{ type: SubscriberType, deferral: Deferred }>;\r\n private isDrainInProgress: boolean = false;\r\n private isDisposing: boolean = false;\r\n private disposeReason: string = null;\r\n\r\n public constructor(list?: List) {\r\n this.list = list ? list : new List();\r\n this.detachables = [];\r\n this.subscribers = new List<{ type: SubscriberType, deferral: Deferred }>();\r\n this.detachables.push(this.list.OnAdded(this.Drain));\r\n }\r\n\r\n public Enqueue = (item: TItem): void => {\r\n this.ThrowIfDispose();\r\n this.EnqueueFromPromise(PromiseHelper.FromResult(item));\r\n }\r\n\r\n public EnqueueFromPromise = (promise: Promise): void => {\r\n this.ThrowIfDispose();\r\n this.promiseStore.Add(promise);\r\n promise.Finally(() => {\r\n while (this.promiseStore.Length() > 0) {\r\n if (!this.promiseStore.First().Result().IsCompleted) {\r\n break;\r\n } else {\r\n const p = this.promiseStore.RemoveFirst();\r\n if (!p.Result().IsError) {\r\n this.list.Add(p.Result().Result);\r\n } else {\r\n // TODO: Log as warning.\r\n }\r\n }\r\n }\r\n });\r\n }\r\n\r\n public Dequeue = (): Promise => {\r\n this.ThrowIfDispose();\r\n const deferredSubscriber = new Deferred();\r\n\r\n if (this.subscribers) {\r\n this.subscribers.Add({ deferral: deferredSubscriber, type: SubscriberType.Dequeue });\r\n this.Drain();\r\n }\r\n\r\n return deferredSubscriber.Promise();\r\n }\r\n\r\n public Peek = (): Promise => {\r\n this.ThrowIfDispose();\r\n const deferredSubscriber = new Deferred();\r\n\r\n const subs = this.subscribers;\r\n if (subs) {\r\n this.subscribers.Add({ deferral: deferredSubscriber, type: SubscriberType.Peek });\r\n this.Drain();\r\n }\r\n\r\n return deferredSubscriber.Promise();\r\n }\r\n\r\n public Length = (): number => {\r\n this.ThrowIfDispose();\r\n return this.list.Length();\r\n }\r\n\r\n public IsDisposed = (): boolean => {\r\n return this.subscribers == null;\r\n }\r\n\r\n public DrainAndDispose = (pendingItemProcessor: (pendingItemInQueue: TItem) => void, reason?: string): Promise => {\r\n if (!this.IsDisposed() && !this.isDisposing) {\r\n this.disposeReason = reason;\r\n this.isDisposing = true;\r\n\r\n const subs = this.subscribers;\r\n if (subs) {\r\n while (subs.Length() > 0) {\r\n const subscriber = subs.RemoveFirst();\r\n // TODO: this needs work (Resolve(null) instead?).\r\n subscriber.deferral.Resolve(undefined);\r\n // subscriber.deferral.Reject(\"Disposed\");\r\n }\r\n\r\n // note: this block assumes cooperative multitasking, i.e.,\r\n // between the if-statement and the assignment there are no\r\n // thread switches.\r\n // Reason is that between the initial const = this.; and this\r\n // point there is the derral.Resolve() operation that might have\r\n // caused recursive calls to the Queue, especially, calling\r\n // Dispose() on the queue alredy (which would reset the var\r\n // here to null!).\r\n // That should generally hold true for javascript...\r\n if (this.subscribers === subs) {\r\n this.subscribers = subs;\r\n }\r\n }\r\n\r\n for (const detachable of this.detachables) {\r\n detachable.Detach();\r\n }\r\n\r\n if (this.promiseStore.Length() > 0 && pendingItemProcessor) {\r\n return PromiseHelper\r\n .WhenAll(this.promiseStore.ToArray())\r\n .ContinueWith(() => {\r\n this.subscribers = null;\r\n this.list.ForEach((item: TItem, index: number): void => {\r\n pendingItemProcessor(item);\r\n });\r\n this.list = null;\r\n return true;\r\n });\r\n } else {\r\n this.subscribers = null;\r\n this.list = null;\r\n }\r\n }\r\n\r\n return PromiseHelper.FromResult(true);\r\n }\r\n\r\n public Dispose = (reason?: string): void => {\r\n this.DrainAndDispose(null, reason);\r\n }\r\n\r\n private Drain = (): void => {\r\n if (!this.isDrainInProgress && !this.isDisposing) {\r\n this.isDrainInProgress = true;\r\n\r\n const subs = this.subscribers;\r\n const lists = this.list;\r\n if (subs && lists) {\r\n while (lists.Length() > 0 && subs.Length() > 0 && !this.isDisposing) {\r\n const subscriber = subs.RemoveFirst();\r\n if (subscriber.type === SubscriberType.Peek) {\r\n subscriber.deferral.Resolve(lists.First());\r\n } else {\r\n const dequeuedItem = lists.RemoveFirst();\r\n subscriber.deferral.Resolve(dequeuedItem);\r\n }\r\n }\r\n\r\n // note: this block assumes cooperative multitasking, i.e.,\r\n // between the if-statement and the assignment there are no\r\n // thread switches.\r\n // Reason is that between the initial const = this.; and this\r\n // point there is the derral.Resolve() operation that might have\r\n // caused recursive calls to the Queue, especially, calling\r\n // Dispose() on the queue alredy (which would reset the var\r\n // here to null!).\r\n // That should generally hold true for javascript...\r\n if (this.subscribers === subs) {\r\n this.subscribers = subs;\r\n }\r\n\r\n // note: this block assumes cooperative multitasking, i.e.,\r\n // between the if-statement and the assignment there are no\r\n // thread switches.\r\n // Reason is that between the initial const = this.; and this\r\n // point there is the derral.Resolve() operation that might have\r\n // caused recursive calls to the Queue, especially, calling\r\n // Dispose() on the queue alredy (which would reset the var\r\n // here to null!).\r\n // That should generally hold true for javascript...\r\n if (this.list === lists) {\r\n this.list = lists;\r\n }\r\n }\r\n\r\n this.isDrainInProgress = false;\r\n }\r\n }\r\n\r\n private ThrowIfDispose = (): void => {\r\n if (this.IsDisposed()) {\r\n if (this.disposeReason) {\r\n throw new InvalidOperationError(this.disposeReason);\r\n }\r\n\r\n throw new ObjectDisposedError(\"Queue\");\r\n } else if (this.isDisposing) {\r\n throw new InvalidOperationError(\"Queue disposing\");\r\n }\r\n }\r\n}\r\n\n\n\n// WEBPACK FOOTER //\n// ../src/common/Queue.ts","//\r\n// Copyright (c) Microsoft. All rights reserved.\r\n// See https://aka.ms/csspeech/license201809 for the full license information.\r\n//\r\n\r\nimport { CreateNoDashGuid } from \"../../../src/common/Guid\";\r\nimport {\r\n AudioSourceEvent,\r\n AudioSourceInitializingEvent,\r\n AudioSourceReadyEvent,\r\n AudioStreamNodeAttachedEvent,\r\n AudioStreamNodeAttachingEvent,\r\n AudioStreamNodeDetachedEvent,\r\n Events,\r\n EventSource,\r\n IAudioSource,\r\n IAudioStreamNode,\r\n IStreamChunk,\r\n Promise,\r\n PromiseHelper,\r\n Stream,\r\n StreamReader,\r\n} from \"../../common/Exports\";\r\nimport { AudioStreamFormat, PullAudioInputStreamCallback } from \"../Exports\";\r\nimport { AudioStreamFormatImpl } from \"./AudioStreamFormat\";\r\n\r\nconst bufferSize: number = 4096;\r\n\r\n/**\r\n * Represents audio input stream used for custom audio input configurations.\r\n * @class AudioInputStream\r\n */\r\nexport abstract class AudioInputStream {\r\n\r\n /**\r\n * Creates and initializes an instance.\r\n * @constructor\r\n */\r\n protected constructor() { }\r\n\r\n /**\r\n * Creates a memory backed PushAudioInputStream with the specified audio format.\r\n * @member AudioInputStream.createPushStream\r\n * @function\r\n * @public\r\n * @param {AudioStreamFormat} format - The audio data format in which audio will be written to the push audio stream's write() method (currently only support 16 kHz 16bit mono PCM).\r\n * @returns {PushAudioInputStream} The audio input stream being created.\r\n */\r\n public static createPushStream(format?: AudioStreamFormat): PushAudioInputStream {\r\n return PushAudioInputStream.create(format);\r\n }\r\n\r\n /**\r\n * Creates a PullAudioInputStream that delegates to the specified callback interface for read() and close() methods.\r\n * @member AudioInputStream.createPullStream\r\n * @function\r\n * @public\r\n * @param {PullAudioInputStreamCallback} callback - The custom audio input object, derived from PullAudioInputStreamCallback\r\n * @param {AudioStreamFormat} format - The audio data format in which audio will be returned from the callback's read() method (currently only support 16 kHz 16bit mono PCM).\r\n * @returns {PullAudioInputStream} The audio input stream being created.\r\n */\r\n public static createPullStream(callback: PullAudioInputStreamCallback, format?: AudioStreamFormat): PullAudioInputStream {\r\n return PullAudioInputStream.create(callback, format);\r\n // throw new Error(\"Oops\");\r\n }\r\n\r\n /**\r\n * Explicitly frees any external resource attached to the object\r\n * @member AudioInputStream.prototype.close\r\n * @function\r\n * @public\r\n */\r\n public abstract close(): void;\r\n}\r\n\r\n/**\r\n * Represents memory backed push audio input stream used for custom audio input configurations.\r\n * @class PushAudioInputStream\r\n */\r\n// tslint:disable-next-line:max-classes-per-file\r\nexport abstract class PushAudioInputStream extends AudioInputStream {\r\n\r\n /**\r\n * Creates a memory backed PushAudioInputStream with the specified audio format.\r\n * @member PushAudioInputStream.create\r\n * @function\r\n * @public\r\n * @param {AudioStreamFormat} format - The audio data format in which audio will be written to the push audio stream's write() method (currently only support 16 kHz 16bit mono PCM).\r\n * @returns {PushAudioInputStream} The push audio input stream being created.\r\n */\r\n public static create(format?: AudioStreamFormat): PushAudioInputStream {\r\n return new PushAudioInputStreamImpl(format);\r\n }\r\n\r\n /**\r\n * Writes the audio data specified by making an internal copy of the data.\r\n * @member PushAudioInputStream.prototype.write\r\n * @function\r\n * @public\r\n * @param {ArrayBuffer} dataBuffer - The audio buffer of which this function will make a copy.\r\n */\r\n public abstract write(dataBuffer: ArrayBuffer): void;\r\n\r\n /**\r\n * Closes the stream.\r\n * @member PushAudioInputStream.prototype.close\r\n * @function\r\n * @public\r\n */\r\n public abstract close(): void;\r\n}\r\n\r\n/**\r\n * Represents memory backed push audio input stream used for custom audio input configurations.\r\n * @private\r\n * @class PushAudioInputStreamImpl\r\n */\r\n// tslint:disable-next-line:max-classes-per-file\r\nexport class PushAudioInputStreamImpl extends PushAudioInputStream implements IAudioSource {\r\n\r\n private format: AudioStreamFormat;\r\n private id: string;\r\n private events: EventSource;\r\n private stream: Stream = new Stream();\r\n\r\n /**\r\n * Creates and initalizes an instance with the given values.\r\n * @constructor\r\n * @param {AudioStreamFormat} format - The audio stream format.\r\n */\r\n public constructor(format?: AudioStreamFormat) {\r\n super();\r\n if (format === undefined) {\r\n this.format = AudioStreamFormatImpl.getDefaultInputFormat();\r\n } else {\r\n this.format = format;\r\n }\r\n this.events = new EventSource();\r\n this.id = CreateNoDashGuid();\r\n }\r\n\r\n /**\r\n * Format information for the audio\r\n */\r\n public get Format(): AudioStreamFormat {\r\n return this.format;\r\n }\r\n\r\n /**\r\n * Writes the audio data specified by making an internal copy of the data.\r\n * @member PushAudioInputStreamImpl.prototype.write\r\n * @function\r\n * @public\r\n * @param {ArrayBuffer} dataBuffer - The audio buffer of which this function will make a copy.\r\n */\r\n public write(dataBuffer: ArrayBuffer): void {\r\n // Break the data up into smaller chunks if needed.\r\n let i: number;\r\n for (i = bufferSize - 1; i < dataBuffer.byteLength; i += bufferSize) {\r\n this.stream.Write(dataBuffer.slice(i - (bufferSize - 1), i + 1));\r\n }\r\n\r\n if ((i - (bufferSize - 1)) !== dataBuffer.byteLength) {\r\n this.stream.Write(dataBuffer.slice(i - (bufferSize - 1), dataBuffer.byteLength));\r\n }\r\n }\r\n\r\n /**\r\n * Closes the stream.\r\n * @member PushAudioInputStreamImpl.prototype.close\r\n * @function\r\n * @public\r\n */\r\n public close(): void {\r\n this.stream.Close();\r\n }\r\n\r\n public Id(): string {\r\n return this.id;\r\n }\r\n\r\n public TurnOn(): Promise {\r\n this.OnEvent(new AudioSourceInitializingEvent(this.id)); // no stream id\r\n this.OnEvent(new AudioSourceReadyEvent(this.id));\r\n return PromiseHelper.FromResult(true);\r\n }\r\n\r\n public Attach(audioNodeId: string): Promise {\r\n this.OnEvent(new AudioStreamNodeAttachingEvent(this.id, audioNodeId));\r\n\r\n return this.TurnOn()\r\n .OnSuccessContinueWith>((_: boolean) => {\r\n // For now we support a single parallel reader of the pushed stream.\r\n // So we can simiply hand the stream to the recognizer and let it recognize.\r\n\r\n return this.stream.GetReader();\r\n })\r\n .OnSuccessContinueWith((streamReader: StreamReader) => {\r\n this.OnEvent(new AudioStreamNodeAttachedEvent(this.id, audioNodeId));\r\n\r\n return {\r\n Detach: () => {\r\n streamReader.Close();\r\n this.OnEvent(new AudioStreamNodeDetachedEvent(this.id, audioNodeId));\r\n this.TurnOff();\r\n },\r\n Id: () => {\r\n return audioNodeId;\r\n },\r\n Read: () => {\r\n return streamReader.Read();\r\n },\r\n };\r\n });\r\n }\r\n\r\n public Detach(audioNodeId: string): void {\r\n this.OnEvent(new AudioStreamNodeDetachedEvent(this.id, audioNodeId));\r\n }\r\n\r\n public TurnOff(): Promise {\r\n return PromiseHelper.FromResult(false);\r\n }\r\n\r\n public get Events(): EventSource {\r\n return this.events;\r\n }\r\n\r\n private OnEvent = (event: AudioSourceEvent): void => {\r\n this.events.OnEvent(event);\r\n Events.Instance.OnEvent(event);\r\n }\r\n}\r\n\r\n/*\r\n * Represents audio input stream used for custom audio input configurations.\r\n * @class PullAudioInputStream\r\n */\r\n// tslint:disable-next-line:max-classes-per-file\r\nexport abstract class PullAudioInputStream extends AudioInputStream {\r\n /**\r\n * Creates and initializes and instance.\r\n * @constructor\r\n */\r\n protected constructor() { super(); }\r\n\r\n /**\r\n * Creates a PullAudioInputStream that delegates to the specified callback interface for read() and close() methods, using the default format (16 kHz 16bit mono PCM).\r\n * @member PullAudioInputStream.create\r\n * @function\r\n * @public\r\n * @param {PullAudioInputStreamCallback} callback - The custom audio input object, derived from PullAudioInputStreamCustomCallback\r\n * @param {AudioStreamFormat} format - The audio data format in which audio will be returned from the callback's read() method (currently only support 16 kHz 16bit mono PCM).\r\n * @returns {PullAudioInputStream} The push audio input stream being created.\r\n */\r\n public static create(callback: PullAudioInputStreamCallback, format?: AudioStreamFormat): PullAudioInputStream {\r\n return new PullAudioInputStreamImpl(callback, format);\r\n }\r\n\r\n /**\r\n * Explicitly frees any external resource attached to the object\r\n * @member PullAudioInputStream.prototype.close\r\n * @function\r\n * @public\r\n */\r\n public abstract close(): void;\r\n\r\n}\r\n\r\n/**\r\n * Represents audio input stream used for custom audio input configurations.\r\n * @private\r\n * @class PullAudioInputStreamImpl\r\n */\r\n// tslint:disable-next-line:max-classes-per-file\r\nexport class PullAudioInputStreamImpl extends PullAudioInputStream implements IAudioSource {\r\n\r\n private callback: PullAudioInputStreamCallback;\r\n private format: AudioStreamFormat;\r\n private id: string;\r\n private events: EventSource;\r\n private isClosed: boolean;\r\n\r\n /**\r\n * Creates a PullAudioInputStream that delegates to the specified callback interface for read() and close() methods, using the default format (16 kHz 16bit mono PCM).\r\n * @constructor\r\n * @param {PullAudioInputStreamCallback} callback - The custom audio input object, derived from PullAudioInputStreamCustomCallback\r\n * @param {AudioStreamFormat} format - The audio data format in which audio will be returned from the callback's read() method (currently only support 16 kHz 16bit mono PCM).\r\n */\r\n public constructor(callback: PullAudioInputStreamCallback, format?: AudioStreamFormat) {\r\n super();\r\n if (undefined === format) {\r\n this.format = AudioStreamFormat.getDefaultInputFormat();\r\n } else {\r\n this.format = format;\r\n }\r\n this.events = new EventSource();\r\n this.id = CreateNoDashGuid();\r\n this.callback = callback;\r\n this.isClosed = false;\r\n }\r\n\r\n /**\r\n * Format information for the audio\r\n */\r\n public get Format(): AudioStreamFormat {\r\n return this.format;\r\n }\r\n\r\n /**\r\n * Closes the stream.\r\n * @member PullAudioInputStreamImpl.prototype.close\r\n * @function\r\n * @public\r\n */\r\n public close(): void {\r\n this.isClosed = true;\r\n this.callback.close();\r\n }\r\n\r\n public Id(): string {\r\n return this.id;\r\n }\r\n\r\n public TurnOn(): Promise {\r\n this.OnEvent(new AudioSourceInitializingEvent(this.id)); // no stream id\r\n this.OnEvent(new AudioSourceReadyEvent(this.id));\r\n return PromiseHelper.FromResult(true);\r\n }\r\n\r\n public Attach(audioNodeId: string): Promise {\r\n this.OnEvent(new AudioStreamNodeAttachingEvent(this.id, audioNodeId));\r\n\r\n return this.TurnOn()\r\n .OnSuccessContinueWith((result: boolean) => {\r\n this.OnEvent(new AudioStreamNodeAttachedEvent(this.id, audioNodeId));\r\n\r\n return {\r\n Detach: () => {\r\n this.callback.close();\r\n this.OnEvent(new AudioStreamNodeDetachedEvent(this.id, audioNodeId));\r\n this.TurnOff();\r\n },\r\n Id: () => {\r\n return audioNodeId;\r\n },\r\n Read: (): Promise> => {\r\n const readBuff: ArrayBuffer = new ArrayBuffer(bufferSize);\r\n const pulledBytes: number = this.callback.read(readBuff);\r\n\r\n return PromiseHelper.FromResult>({\r\n Buffer: readBuff.slice(0, pulledBytes),\r\n IsEnd: this.isClosed,\r\n });\r\n },\r\n };\r\n });\r\n\r\n }\r\n\r\n public Detach(audioNodeId: string): void {\r\n this.OnEvent(new AudioStreamNodeDetachedEvent(this.id, audioNodeId));\r\n }\r\n\r\n public TurnOff(): Promise {\r\n return PromiseHelper.FromResult(false);\r\n }\r\n\r\n public get Events(): EventSource {\r\n return this.events;\r\n }\r\n\r\n private OnEvent = (event: AudioSourceEvent): void => {\r\n this.events.OnEvent(event);\r\n Events.Instance.OnEvent(event);\r\n }\r\n}\r\n\n\n\n// WEBPACK FOOTER //\n// ../src/sdk/Audio/AudioInputStream.ts","//\r\n// Copyright (c) Microsoft. All rights reserved.\r\n// See https://aka.ms/csspeech/license201809 for the full license information.\r\n//\r\n\r\n/**\r\n * Represents audio stream format used for custom audio input configurations.\r\n * @class AudioStreamFormat\r\n */\r\nexport abstract class AudioStreamFormat {\r\n /**\r\n * Creates an audio stream format object representing the default audio stream format (16KHz 16bit mono PCM).\r\n * @member AudioStreamFormat.getDefaultInputFormat\r\n * @function\r\n * @public\r\n * @returns {AudioStreamFormat} The audio stream format being created.\r\n */\r\n public static getDefaultInputFormat(): AudioStreamFormat {\r\n return AudioStreamFormatImpl.getDefaultInputFormat();\r\n }\r\n\r\n /**\r\n * Creates an audio stream format object with the specified pcm waveformat characteristics.\r\n * @member AudioStreamFormat.getWaveFormatPCM\r\n * @function\r\n * @public\r\n * @param {number} samplesPerSecond - Sample rate, in samples per second (Hertz).\r\n * @param {number} bitsPerSample - Bits per sample, typically 16.\r\n * @param {number} channels - Number of channels in the waveform-audio data. Monaural data uses one channel and stereo data uses two channels.\r\n * @returns {AudioStreamFormat} The audio stream format being created.\r\n */\r\n public static getWaveFormatPCM(samplesPerSecond: number, bitsPerSample: number, channels: number): AudioStreamFormat {\r\n return new AudioStreamFormatImpl(samplesPerSecond, bitsPerSample, channels);\r\n }\r\n\r\n /**\r\n * Explicitly frees any external resource attached to the object\r\n * @member AudioStreamFormat.prototype.close\r\n * @function\r\n * @public\r\n */\r\n public abstract close(): void;\r\n}\r\n\r\n/**\r\n * @private\r\n * @class AudioStreamFormatImpl\r\n */\r\n// tslint:disable-next-line:max-classes-per-file\r\nexport class AudioStreamFormatImpl extends AudioStreamFormat {\r\n /**\r\n * Creates an instance with the given values.\r\n * @constructor\r\n * @param {number} samplesPerSec - Samples per second.\r\n * @param {number} bitsPerSample - Bits per sample.\r\n * @param {number} channels - Number of channels.\r\n */\r\n public constructor(samplesPerSec: number = 16000, bitsPerSample: number = 16, channels: number = 1) {\r\n super();\r\n this.formatTag = 1;\r\n this.bitsPerSample = bitsPerSample;\r\n this.samplesPerSec = samplesPerSec;\r\n this.channels = channels;\r\n this.avgBytesPerSec = this.samplesPerSec * this.channels * (this.bitsPerSample / 8);\r\n this.blockAlign = this.channels * Math.max(this.bitsPerSample, 8);\r\n }\r\n\r\n /**\r\n * Retrieves the default input format.\r\n * @member AudioStreamFormatImpl.getDefaultInputFormat\r\n * @function\r\n * @public\r\n * @returns {AudioStreamFormatImpl} The default input format.\r\n */\r\n public static getDefaultInputFormat(): AudioStreamFormatImpl {\r\n return new AudioStreamFormatImpl();\r\n }\r\n\r\n /**\r\n * Closes the configuration object.\r\n * @member AudioStreamFormatImpl.prototype.close\r\n * @function\r\n * @public\r\n */\r\n public close(): void { return; }\r\n\r\n /**\r\n * The format of the audio, valid values: 1 (PCM)\r\n * @member AudioStreamFormatImpl.prototype.formatTag\r\n * @function\r\n * @public\r\n */\r\n public formatTag: number;\r\n\r\n /**\r\n * The number of channels, valid values: 1 (Mono).\r\n * @member AudioStreamFormatImpl.prototype.channels\r\n * @function\r\n * @public\r\n */\r\n public channels: number;\r\n\r\n /**\r\n * The sample rate, valid values: 16000.\r\n * @member AudioStreamFormatImpl.prototype.samplesPerSec\r\n * @function\r\n * @public\r\n */\r\n public samplesPerSec: number;\r\n\r\n /**\r\n * The bits per sample, valid values: 16\r\n * @member AudioStreamFormatImpl.prototype.b\r\n * @function\r\n * @public\r\n */\r\n public bitsPerSample: number;\r\n\r\n /**\r\n * Average bytes per second, usually calculated as nSamplesPerSec * nChannels * ceil(wBitsPerSample, 8).\r\n * @member AudioStreamFormatImpl.prototype.avgBytesPerSec\r\n * @function\r\n * @public\r\n */\r\n public avgBytesPerSec: number;\r\n\r\n /**\r\n * The size of a single frame, valid values: nChannels * ceil(wBitsPerSample, 8).\r\n * @member AudioStreamFormatImpl.prototype.blockAlign\r\n * @function\r\n * @public\r\n */\r\n public blockAlign: number;\r\n}\r\n\n\n\n// WEBPACK FOOTER //\n// ../src/sdk/Audio/AudioStreamFormat.ts","//\r\n// Copyright (c) Microsoft. All rights reserved.\r\n// See https://aka.ms/csspeech/license201809 for the full license information.\r\n//\r\nimport { WebsocketConnection } from \"../common.browser/Exports\";\r\nimport { OutputFormatPropertyName } from \"../common.speech/Exports\";\r\nimport {\r\n IConnection,\r\n IStringDictionary,\r\n Storage,\r\n} from \"../common/Exports\";\r\nimport { OutputFormat, PropertyId } from \"../sdk/Exports\";\r\nimport {\r\n AuthInfo,\r\n IConnectionFactory,\r\n RecognitionMode,\r\n RecognizerConfig,\r\n WebsocketMessageFormatter,\r\n} from \"./Exports\";\r\nimport { QueryParameterNames } from \"./QueryParameterNames\";\r\n\r\nexport class SpeechConnectionFactory implements IConnectionFactory {\r\n\r\n public Create = (\r\n config: RecognizerConfig,\r\n authInfo: AuthInfo,\r\n connectionId?: string): IConnection => {\r\n\r\n let endpoint: string = config.parameters.getProperty(PropertyId.SpeechServiceConnection_Endpoint, undefined);\r\n\r\n const queryParams: IStringDictionary = {};\r\n\r\n const endpointId: string = config.parameters.getProperty(PropertyId.SpeechServiceConnection_EndpointId, undefined);\r\n const language: string = config.parameters.getProperty(PropertyId.SpeechServiceConnection_RecoLanguage, undefined);\r\n\r\n if (endpointId) {\r\n if (!endpoint || endpoint.search(QueryParameterNames.DeploymentIdParamName) === -1) {\r\n queryParams[QueryParameterNames.DeploymentIdParamName] = endpointId;\r\n }\r\n } else if (language) {\r\n if (!endpoint || endpoint.search(QueryParameterNames.LanguageParamName) === -1) {\r\n queryParams[QueryParameterNames.LanguageParamName] = language;\r\n }\r\n }\r\n\r\n if (!endpoint || endpoint.search(QueryParameterNames.FormatParamName) === -1) {\r\n queryParams[QueryParameterNames.FormatParamName] = config.parameters.getProperty(OutputFormatPropertyName, OutputFormat[OutputFormat.Simple]).toLowerCase();\r\n }\r\n\r\n if (this.IsDebugModeEnabled) {\r\n queryParams[QueryParameterNames.TestHooksParamName] = \"1\";\r\n }\r\n\r\n if (!endpoint) {\r\n const region: string = config.parameters.getProperty(PropertyId.SpeechServiceConnection_Region, undefined);\r\n\r\n switch (config.RecognitionMode) {\r\n case RecognitionMode.Conversation:\r\n endpoint = this.Host(region) + this.ConversationRelativeUri;\r\n break;\r\n case RecognitionMode.Dictation:\r\n endpoint = this.Host(region) + this.DictationRelativeUri;\r\n break;\r\n default:\r\n endpoint = this.Host(region) + this.InteractiveRelativeUri; // default is interactive\r\n break;\r\n }\r\n }\r\n\r\n const headers: IStringDictionary = {};\r\n headers[authInfo.HeaderName] = authInfo.Token;\r\n headers[QueryParameterNames.ConnectionIdHeader] = connectionId;\r\n\r\n return new WebsocketConnection(endpoint, queryParams, headers, new WebsocketMessageFormatter(), connectionId);\r\n }\r\n\r\n private Host(region: string): string {\r\n return Storage.Local.GetOrAdd(\"Host\", \"wss://\" + region + \".stt.speech.microsoft.com\");\r\n }\r\n\r\n private get InteractiveRelativeUri(): string {\r\n return Storage.Local.GetOrAdd(\"InteractiveRelativeUri\", \"/speech/recognition/interactive/cognitiveservices/v1\");\r\n }\r\n\r\n private get ConversationRelativeUri(): string {\r\n return Storage.Local.GetOrAdd(\"ConversationRelativeUri\", \"/speech/recognition/conversation/cognitiveservices/v1\");\r\n }\r\n\r\n private get DictationRelativeUri(): string {\r\n return Storage.Local.GetOrAdd(\"DictationRelativeUri\", \"/speech/recognition/dictation/cognitiveservices/v1\");\r\n }\r\n\r\n private get IsDebugModeEnabled(): boolean {\r\n const value = Storage.Local.GetOrAdd(\"IsDebugModeEnabled\", \"false\");\r\n return value.toLowerCase() === \"true\";\r\n }\r\n}\r\n\n\n\n// WEBPACK FOOTER //\n// ../src/common.speech/SpeechConnectionFactory.ts","//\r\n// Copyright (c) Microsoft. All rights reserved.\r\n// See https://aka.ms/csspeech/license201809 for the full license information.\r\n//\r\nimport {\r\n ArgumentNullError,\r\n ConnectionClosedEvent,\r\n ConnectionEstablishedEvent,\r\n ConnectionEstablishErrorEvent,\r\n ConnectionEvent,\r\n ConnectionMessage,\r\n ConnectionMessageReceivedEvent,\r\n ConnectionMessageSentEvent,\r\n ConnectionOpenResponse,\r\n ConnectionStartEvent,\r\n ConnectionState,\r\n Deferred,\r\n Events,\r\n EventSource,\r\n IWebsocketMessageFormatter,\r\n MessageType,\r\n PlatformEvent,\r\n Promise,\r\n PromiseHelper,\r\n Queue,\r\n RawWebsocketMessage,\r\n} from \"../common/Exports\";\r\n\r\ninterface ISendItem {\r\n Message: ConnectionMessage;\r\n RawWebsocketMessage: RawWebsocketMessage;\r\n SendStatusDeferral: Deferred;\r\n}\r\n\r\nexport class WebsocketMessageAdapter {\r\n\r\n private connectionState: ConnectionState;\r\n private messageFormatter: IWebsocketMessageFormatter;\r\n private websocketClient: WebSocket;\r\n\r\n private sendMessageQueue: Queue;\r\n private receivingMessageQueue: Queue;\r\n private connectionEstablishDeferral: Deferred;\r\n private disconnectDeferral: Deferred;\r\n private connectionEvents: EventSource;\r\n private connectionId: string;\r\n private uri: string;\r\n\r\n public constructor(\r\n uri: string,\r\n connectionId: string,\r\n messageFormatter: IWebsocketMessageFormatter) {\r\n\r\n if (!uri) {\r\n throw new ArgumentNullError(\"uri\");\r\n }\r\n\r\n if (!messageFormatter) {\r\n throw new ArgumentNullError(\"messageFormatter\");\r\n }\r\n\r\n this.connectionEvents = new EventSource();\r\n this.connectionId = connectionId;\r\n this.messageFormatter = messageFormatter;\r\n this.connectionState = ConnectionState.None;\r\n this.uri = uri;\r\n }\r\n\r\n public get State(): ConnectionState {\r\n return this.connectionState;\r\n }\r\n\r\n public Open = (): Promise => {\r\n if (this.connectionState === ConnectionState.Disconnected) {\r\n return PromiseHelper.FromError(`Cannot open a connection that is in ${this.connectionState} state`);\r\n }\r\n\r\n if (this.connectionEstablishDeferral) {\r\n return this.connectionEstablishDeferral.Promise();\r\n }\r\n\r\n this.connectionEstablishDeferral = new Deferred();\r\n this.connectionState = ConnectionState.Connecting;\r\n\r\n try {\r\n this.websocketClient = new WebSocket(this.uri);\r\n this.websocketClient.binaryType = \"arraybuffer\";\r\n this.receivingMessageQueue = new Queue();\r\n this.disconnectDeferral = new Deferred();\r\n this.sendMessageQueue = new Queue();\r\n this.ProcessSendQueue();\r\n } catch (error) {\r\n this.connectionEstablishDeferral.Resolve(new ConnectionOpenResponse(500, error));\r\n return this.connectionEstablishDeferral.Promise();\r\n }\r\n\r\n this.OnEvent(new ConnectionStartEvent(this.connectionId, this.uri));\r\n\r\n this.websocketClient.onopen = (e: Event) => {\r\n this.connectionState = ConnectionState.Connected;\r\n this.OnEvent(new ConnectionEstablishedEvent(this.connectionId));\r\n this.connectionEstablishDeferral.Resolve(new ConnectionOpenResponse(200, \"\"));\r\n };\r\n\r\n this.websocketClient.onerror = (e: Event) => {\r\n // TODO: Understand what this is error is. Will we still get onClose ?\r\n if (this.connectionState !== ConnectionState.Connecting) {\r\n // TODO: Is this required ?\r\n // this.OnEvent(new ConnectionErrorEvent(errorMsg, connectionId));\r\n }\r\n };\r\n\r\n this.websocketClient.onclose = (e: CloseEvent) => {\r\n if (this.connectionState === ConnectionState.Connecting) {\r\n this.connectionState = ConnectionState.Disconnected;\r\n // this.OnEvent(new ConnectionEstablishErrorEvent(this.connectionId, e.code, e.reason));\r\n this.connectionEstablishDeferral.Resolve(new ConnectionOpenResponse(e.code, e.reason));\r\n } else {\r\n this.OnEvent(new ConnectionClosedEvent(this.connectionId, e.code, e.reason));\r\n }\r\n\r\n this.OnClose(e.code, e.reason);\r\n };\r\n\r\n this.websocketClient.onmessage = (e: MessageEvent) => {\r\n const networkReceivedTime = new Date().toISOString();\r\n if (this.connectionState === ConnectionState.Connected) {\r\n const deferred = new Deferred();\r\n // let id = ++this.idCounter;\r\n this.receivingMessageQueue.EnqueueFromPromise(deferred.Promise());\r\n if (e.data instanceof ArrayBuffer) {\r\n const rawMessage = new RawWebsocketMessage(MessageType.Binary, e.data);\r\n this.messageFormatter\r\n .ToConnectionMessage(rawMessage)\r\n .On((connectionMessage: ConnectionMessage) => {\r\n this.OnEvent(new ConnectionMessageReceivedEvent(this.connectionId, networkReceivedTime, connectionMessage));\r\n deferred.Resolve(connectionMessage);\r\n }, (error: string) => {\r\n // TODO: Events for these ?\r\n deferred.Reject(`Invalid binary message format. Error: ${error}`);\r\n });\r\n } else {\r\n const rawMessage = new RawWebsocketMessage(MessageType.Text, e.data);\r\n this.messageFormatter\r\n .ToConnectionMessage(rawMessage)\r\n .On((connectionMessage: ConnectionMessage) => {\r\n this.OnEvent(new ConnectionMessageReceivedEvent(this.connectionId, networkReceivedTime, connectionMessage));\r\n deferred.Resolve(connectionMessage);\r\n }, (error: string) => {\r\n // TODO: Events for these ?\r\n deferred.Reject(`Invalid text message format. Error: ${error}`);\r\n });\r\n }\r\n }\r\n };\r\n\r\n return this.connectionEstablishDeferral.Promise();\r\n }\r\n\r\n public Send = (message: ConnectionMessage): Promise => {\r\n if (this.connectionState !== ConnectionState.Connected) {\r\n return PromiseHelper.FromError(`Cannot send on connection that is in ${this.connectionState} state`);\r\n }\r\n\r\n const messageSendStatusDeferral = new Deferred();\r\n const messageSendDeferral = new Deferred();\r\n\r\n this.sendMessageQueue.EnqueueFromPromise(messageSendDeferral.Promise());\r\n\r\n this.messageFormatter\r\n .FromConnectionMessage(message)\r\n .On((rawMessage: RawWebsocketMessage) => {\r\n messageSendDeferral.Resolve({\r\n Message: message,\r\n RawWebsocketMessage: rawMessage,\r\n SendStatusDeferral: messageSendStatusDeferral,\r\n });\r\n }, (error: string) => {\r\n messageSendDeferral.Reject(`Error formatting the message. ${error}`);\r\n });\r\n\r\n return messageSendStatusDeferral.Promise();\r\n }\r\n\r\n public Read = (): Promise => {\r\n if (this.connectionState !== ConnectionState.Connected) {\r\n return PromiseHelper.FromError(`Cannot read on connection that is in ${this.connectionState} state`);\r\n }\r\n\r\n return this.receivingMessageQueue.Dequeue();\r\n }\r\n\r\n public Close = (reason?: string): Promise => {\r\n if (this.websocketClient) {\r\n if (this.connectionState !== ConnectionState.Disconnected) {\r\n this.websocketClient.close(1000, reason ? reason : \"Normal closure by client\");\r\n }\r\n } else {\r\n const deferral = new Deferred();\r\n deferral.Resolve(true);\r\n return deferral.Promise();\r\n }\r\n\r\n return this.disconnectDeferral.Promise();\r\n }\r\n\r\n public get Events(): EventSource {\r\n return this.connectionEvents;\r\n }\r\n\r\n private SendRawMessage = (sendItem: ISendItem): Promise => {\r\n try {\r\n // indicates we are draining the queue and it came with no message;\r\n if (!sendItem) {\r\n return PromiseHelper.FromResult(true);\r\n }\r\n\r\n this.OnEvent(new ConnectionMessageSentEvent(this.connectionId, new Date().toISOString(), sendItem.Message));\r\n this.websocketClient.send(sendItem.RawWebsocketMessage.Payload);\r\n return PromiseHelper.FromResult(true);\r\n } catch (e) {\r\n return PromiseHelper.FromError(`websocket send error: ${e}`);\r\n }\r\n }\r\n\r\n private OnClose = (code: number, reason: string): void => {\r\n const closeReason = `Connection closed. ${code}: ${reason}`;\r\n this.connectionState = ConnectionState.Disconnected;\r\n this.disconnectDeferral.Resolve(true);\r\n this.receivingMessageQueue.Dispose(reason);\r\n this.receivingMessageQueue.DrainAndDispose((pendingReceiveItem: ConnectionMessage) => {\r\n // TODO: Events for these ?\r\n // Logger.Instance.OnEvent(new LoggingEvent(LogType.Warning, null, `Failed to process received message. Reason: ${closeReason}, Message: ${JSON.stringify(pendingReceiveItem)}`));\r\n }, closeReason);\r\n\r\n this.sendMessageQueue.DrainAndDispose((pendingSendItem: ISendItem) => {\r\n pendingSendItem.SendStatusDeferral.Reject(closeReason);\r\n }, closeReason);\r\n }\r\n\r\n private ProcessSendQueue = (): void => {\r\n this.sendMessageQueue\r\n .Dequeue()\r\n .On((sendItem: ISendItem) => {\r\n // indicates we are draining the queue and it came with no message;\r\n if (!sendItem) {\r\n return;\r\n }\r\n\r\n this.SendRawMessage(sendItem)\r\n .On((result: boolean) => {\r\n sendItem.SendStatusDeferral.Resolve(result);\r\n this.ProcessSendQueue();\r\n }, (sendError: string) => {\r\n sendItem.SendStatusDeferral.Reject(sendError);\r\n this.ProcessSendQueue();\r\n });\r\n }, (error: string) => {\r\n // do nothing\r\n });\r\n }\r\n\r\n private OnEvent = (event: ConnectionEvent): void => {\r\n this.connectionEvents.OnEvent(event);\r\n Events.Instance.OnEvent(event);\r\n }\r\n}\r\n\n\n\n// WEBPACK FOOTER //\n// ../src/common.browser/WebsocketMessageAdapter.ts","window.SpeechSDK = require('./distrib/microsoft.cognitiveservices.speech.sdk.js');\r\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./bundleApp.js\n// module id = 21\n// module chunks = 0","import { ConsoleLoggingListener, LocalStorage, SessionStorage } from \"./src/common.browser/Exports\";\r\nimport { Events, Storage } from \"./src/common/Exports\";\r\n\r\n// Common.Storage.SetLocalStorage(new Common.Browser.LocalStorage());\r\n// Common.Storage.SetSessionStorage(new Common.Browser.SessionStorage());\r\nEvents.Instance.AttachListener(new ConsoleLoggingListener());\r\n\r\n// Speech SDK API\r\nexport * from \"./src/sdk/Exports\";\r\n\n\n\n// WEBPACK FOOTER //\n// ../microsoft.cognitiveservices.speech.sdk.ts","//\r\n// Copyright (c) Microsoft. All rights reserved.\r\n// See https://aka.ms/csspeech/license201809 for the full license information.\r\n//\r\nimport { EventType, IEventListener, PlatformEvent } from \"../common/Exports\";\r\n\r\nexport class ConsoleLoggingListener implements IEventListener {\r\n private logLevelFilter: EventType;\r\n\r\n public constructor(logLevelFilter: EventType = EventType.Warning) {\r\n this.logLevelFilter = logLevelFilter;\r\n }\r\n\r\n public OnEvent = (event: PlatformEvent): void => {\r\n if (event.EventType >= this.logLevelFilter) {\r\n const log = this.ToString(event);\r\n\r\n switch (event.EventType) {\r\n case EventType.Debug:\r\n // tslint:disable-next-line:no-console\r\n console.debug(log);\r\n break;\r\n case EventType.Info:\r\n // tslint:disable-next-line:no-console\r\n console.info(log);\r\n break;\r\n case EventType.Warning:\r\n // tslint:disable-next-line:no-console\r\n console.warn(log);\r\n break;\r\n case EventType.Error:\r\n // tslint:disable-next-line:no-console\r\n console.error(log);\r\n break;\r\n default:\r\n // tslint:disable-next-line:no-console\r\n console.log(log);\r\n break;\r\n }\r\n }\r\n }\r\n\r\n private ToString = (event: any): string => {\r\n const logFragments = [\r\n `${event.EventTime}`,\r\n `${event.Name}`,\r\n ];\r\n\r\n for (const prop in event) {\r\n if (prop && event.hasOwnProperty(prop) && prop !== \"eventTime\" && prop !== \"eventType\" && prop !== \"eventId\" && prop !== \"name\" && prop !== \"constructor\") {\r\n const value = event[prop];\r\n let valueToLog = \"\";\r\n if (value !== undefined && value !== null) {\r\n if (typeof (value) === \"number\" || typeof (value) === \"string\") {\r\n valueToLog = value.toString();\r\n } else {\r\n valueToLog = JSON.stringify(value);\r\n }\r\n }\r\n\r\n logFragments.push(`${prop}: ${valueToLog}`);\r\n }\r\n\r\n }\r\n\r\n return logFragments.join(\" | \");\r\n }\r\n}\r\n\n\n\n// WEBPACK FOOTER //\n// ../src/common.browser/ConsoleLoggingListener.ts","//\r\n// Copyright (c) Microsoft. All rights reserved.\r\n// See https://aka.ms/csspeech/license201809 for the full license information.\r\n//\r\nimport { EventType, PlatformEvent } from \"./PlatformEvent\";\r\n\r\nexport class AudioSourceEvent extends PlatformEvent {\r\n private audioSourceId: string;\r\n\r\n constructor(eventName: string, audioSourceId: string, eventType: EventType = EventType.Info) {\r\n super(eventName, eventType);\r\n this.audioSourceId = audioSourceId;\r\n }\r\n\r\n public get AudioSourceId(): string {\r\n return this.audioSourceId;\r\n }\r\n}\r\n\r\n// tslint:disable-next-line:max-classes-per-file\r\nexport class AudioSourceInitializingEvent extends AudioSourceEvent {\r\n constructor(audioSourceId: string) {\r\n super(\"AudioSourceInitializingEvent\", audioSourceId);\r\n }\r\n}\r\n\r\n// tslint:disable-next-line:max-classes-per-file\r\nexport class AudioSourceReadyEvent extends AudioSourceEvent {\r\n constructor(audioSourceId: string) {\r\n super(\"AudioSourceReadyEvent\", audioSourceId);\r\n }\r\n}\r\n\r\n// tslint:disable-next-line:max-classes-per-file\r\nexport class AudioSourceOffEvent extends AudioSourceEvent {\r\n constructor(audioSourceId: string) {\r\n super(\"AudioSourceOffEvent\", audioSourceId);\r\n }\r\n}\r\n\r\n// tslint:disable-next-line:max-classes-per-file\r\nexport class AudioSourceErrorEvent extends AudioSourceEvent {\r\n private error: string;\r\n constructor(audioSourceId: string, error: string) {\r\n super(\"AudioSourceErrorEvent\", audioSourceId, EventType.Error);\r\n this.error = error;\r\n }\r\n\r\n public get Error(): string {\r\n return this.error;\r\n }\r\n}\r\n\r\n// tslint:disable-next-line:max-classes-per-file\r\nexport class AudioStreamNodeEvent extends AudioSourceEvent {\r\n private audioNodeId: string;\r\n\r\n constructor(eventName: string, audioSourceId: string, audioNodeId: string) {\r\n super(eventName, audioSourceId);\r\n this.audioNodeId = audioNodeId;\r\n }\r\n\r\n public get AudioNodeId(): string {\r\n return this.audioNodeId;\r\n }\r\n}\r\n\r\n// tslint:disable-next-line:max-classes-per-file\r\nexport class AudioStreamNodeAttachingEvent extends AudioStreamNodeEvent {\r\n constructor(audioSourceId: string, audioNodeId: string) {\r\n super(\"AudioStreamNodeAttachingEvent\", audioSourceId, audioNodeId);\r\n }\r\n}\r\n\r\n// tslint:disable-next-line:max-classes-per-file\r\nexport class AudioStreamNodeAttachedEvent extends AudioStreamNodeEvent {\r\n constructor(audioSourceId: string, audioNodeId: string) {\r\n super(\"AudioStreamNodeAttachedEvent\", audioSourceId, audioNodeId);\r\n }\r\n}\r\n\r\n// tslint:disable-next-line:max-classes-per-file\r\nexport class AudioStreamNodeDetachedEvent extends AudioStreamNodeEvent {\r\n constructor(audioSourceId: string, audioNodeId: string) {\r\n super(\"AudioStreamNodeDetachedEvent\", audioSourceId, audioNodeId);\r\n }\r\n}\r\n\r\n// tslint:disable-next-line:max-classes-per-file\r\nexport class AudioStreamNodeErrorEvent extends AudioStreamNodeEvent {\r\n private error: string;\r\n\r\n constructor(audioSourceId: string, audioNodeId: string, error: string) {\r\n super(\"AudioStreamNodeErrorEvent\", audioSourceId, audioNodeId);\r\n this.error = error;\r\n }\r\n\r\n public get Error(): string {\r\n return this.error;\r\n }\r\n}\r\n\n\n\n// WEBPACK FOOTER //\n// ../src/common/AudioSourceEvents.ts","//\r\n// Copyright (c) Microsoft. All rights reserved.\r\n// See https://aka.ms/csspeech/license201809 for the full license information.\r\n//\r\nimport { ConnectionMessage } from \"./ConnectionMessage\";\r\nimport { IStringDictionary } from \"./IDictionary\";\r\nimport { EventType, PlatformEvent } from \"./PlatformEvent\";\r\n\r\nexport class ConnectionEvent extends PlatformEvent {\r\n private connectionId: string;\r\n\r\n constructor(eventName: string, connectionId: string, eventType: EventType = EventType.Info) {\r\n super(eventName, eventType);\r\n this.connectionId = connectionId;\r\n }\r\n\r\n public get ConnectionId(): string {\r\n return this.connectionId;\r\n }\r\n}\r\n\r\n// tslint:disable-next-line:max-classes-per-file\r\nexport class ConnectionStartEvent extends ConnectionEvent {\r\n private uri: string;\r\n private headers: IStringDictionary;\r\n\r\n constructor(connectionId: string, uri: string, headers?: IStringDictionary) {\r\n super(\"ConnectionStartEvent\", connectionId);\r\n this.uri = uri;\r\n this.headers = headers;\r\n }\r\n\r\n public get Uri(): string {\r\n return this.uri;\r\n }\r\n\r\n public get Headers(): IStringDictionary {\r\n return this.headers;\r\n }\r\n}\r\n\r\n// tslint:disable-next-line:max-classes-per-file\r\nexport class ConnectionEstablishedEvent extends ConnectionEvent {\r\n constructor(connectionId: string, metadata?: IStringDictionary) {\r\n super(\"ConnectionEstablishedEvent\", connectionId);\r\n }\r\n}\r\n\r\n// tslint:disable-next-line:max-classes-per-file\r\nexport class ConnectionClosedEvent extends ConnectionEvent {\r\n private reason: string;\r\n private statusCode: number;\r\n\r\n constructor(connectionId: string, statusCode: number, reason: string) {\r\n super(\"ConnectionClosedEvent\", connectionId, EventType.Debug);\r\n this.reason = reason;\r\n this.statusCode = statusCode;\r\n }\r\n\r\n public get Reason(): string {\r\n return this.reason;\r\n }\r\n\r\n public get StatusCode(): number {\r\n return this.statusCode;\r\n }\r\n}\r\n\r\n// tslint:disable-next-line:max-classes-per-file\r\nexport class ConnectionEstablishErrorEvent extends ConnectionEvent {\r\n private statusCode: number;\r\n private reason: string;\r\n\r\n constructor(connectionId: string, statuscode: number, reason: string) {\r\n super(\"ConnectionEstablishErrorEvent\", connectionId, EventType.Error);\r\n this.statusCode = statuscode;\r\n this.reason = reason;\r\n }\r\n\r\n public get Reason(): string {\r\n return this.reason;\r\n }\r\n\r\n public get StatusCode(): number {\r\n return this.statusCode;\r\n }\r\n}\r\n\r\n// tslint:disable-next-line:max-classes-per-file\r\nexport class ConnectionMessageReceivedEvent extends ConnectionEvent {\r\n private networkReceivedTime: string;\r\n private message: ConnectionMessage;\r\n\r\n constructor(connectionId: string, networkReceivedTimeISO: string, message: ConnectionMessage) {\r\n super(\"ConnectionMessageReceivedEvent\", connectionId);\r\n this.networkReceivedTime = networkReceivedTimeISO;\r\n this.message = message;\r\n }\r\n\r\n public get NetworkReceivedTime(): string {\r\n return this.networkReceivedTime;\r\n }\r\n\r\n public get Message(): ConnectionMessage {\r\n return this.message;\r\n }\r\n}\r\n\r\n// tslint:disable-next-line:max-classes-per-file\r\nexport class ConnectionMessageSentEvent extends ConnectionEvent {\r\n private networkSentTime: string;\r\n private message: ConnectionMessage;\r\n\r\n constructor(connectionId: string, networkSentTimeISO: string, message: ConnectionMessage) {\r\n super(\"ConnectionMessageSentEvent\", connectionId);\r\n this.networkSentTime = networkSentTimeISO;\r\n this.message = message;\r\n }\r\n\r\n public get NetworkSentTime(): string {\r\n return this.networkSentTime;\r\n }\r\n\r\n public get Message(): ConnectionMessage {\r\n return this.message;\r\n }\r\n}\r\n\n\n\n// WEBPACK FOOTER //\n// ../src/common/ConnectionEvents.ts","//\r\n// Copyright (c) Microsoft. All rights reserved.\r\n// See https://aka.ms/csspeech/license201809 for the full license information.\r\n//\r\n\r\nexport class ConnectionOpenResponse {\r\n private statusCode: number;\r\n private reason: string;\r\n\r\n constructor(statusCode: number, reason: string) {\r\n this.statusCode = statusCode;\r\n this.reason = reason;\r\n }\r\n\r\n public get StatusCode(): number {\r\n return this.statusCode;\r\n }\r\n\r\n public get Reason(): string {\r\n return this.reason;\r\n }\r\n}\r\n\n\n\n// WEBPACK FOOTER //\n// ../src/common/ConnectionOpenResponse.ts","//\r\n// Copyright (c) Microsoft. All rights reserved.\r\n// See https://aka.ms/csspeech/license201809 for the full license information.\r\n//\r\nimport { ArgumentNullError } from \"./Error\";\r\nimport { EventSource } from \"./EventSource\";\r\nimport { IEventSource } from \"./IEventSource\";\r\nimport { PlatformEvent } from \"./PlatformEvent\";\r\n\r\nexport class Events {\r\n private static instance: IEventSource = new EventSource();\r\n\r\n public static SetEventSource = (eventSource: IEventSource): void => {\r\n if (!eventSource) {\r\n throw new ArgumentNullError(\"eventSource\");\r\n }\r\n\r\n Events.instance = eventSource;\r\n }\r\n\r\n public static get Instance(): IEventSource {\r\n return Events.instance;\r\n }\r\n}\r\n\n\n\n// WEBPACK FOOTER //\n// ../src/common/Events.ts","//\r\n// Copyright (c) Microsoft. All rights reserved.\r\n// See https://aka.ms/csspeech/license201809 for the full license information.\r\n//\r\nimport { ConnectionEvent } from \"./ConnectionEvents\";\r\nimport { ConnectionMessage } from \"./ConnectionMessage\";\r\nimport { ConnectionOpenResponse } from \"./ConnectionOpenResponse\";\r\nimport { EventSource } from \"./EventSource\";\r\nimport { IDisposable } from \"./IDisposable\";\r\nimport { Promise } from \"./Promise\";\r\n\r\nexport enum ConnectionState {\r\n None,\r\n Connected,\r\n Connecting,\r\n Disconnected,\r\n}\r\n\r\nexport interface IConnection extends IDisposable {\r\n Id: string;\r\n State(): ConnectionState;\r\n Open(): Promise;\r\n Send(message: ConnectionMessage): Promise;\r\n Read(): Promise;\r\n Events: EventSource;\r\n}\r\n\n\n\n// WEBPACK FOOTER //\n// ../src/common/IConnection.ts","//\r\n// Copyright (c) Microsoft. All rights reserved.\r\n// See https://aka.ms/csspeech/license201809 for the full license information.\r\n//\r\nimport { MessageType } from \"./ConnectionMessage\";\r\nimport { ArgumentNullError, InvalidOperationError } from \"./Error\";\r\nimport { CreateNoDashGuid } from \"./Guid\";\r\n\r\nexport class RawWebsocketMessage {\r\n\r\n private messageType: MessageType;\r\n private payload: any = null;\r\n private id: string;\r\n\r\n public constructor(messageType: MessageType, payload: any, id?: string) {\r\n if (!payload) {\r\n throw new ArgumentNullError(\"payload\");\r\n }\r\n\r\n if (messageType === MessageType.Binary && !(payload instanceof ArrayBuffer)) {\r\n throw new InvalidOperationError(\"Payload must be ArrayBuffer\");\r\n }\r\n\r\n if (messageType === MessageType.Text && !(typeof (payload) === \"string\")) {\r\n throw new InvalidOperationError(\"Payload must be a string\");\r\n }\r\n\r\n this.messageType = messageType;\r\n this.payload = payload;\r\n this.id = id ? id : CreateNoDashGuid();\r\n }\r\n\r\n public get MessageType(): MessageType {\r\n return this.messageType;\r\n }\r\n\r\n public get Payload(): any {\r\n return this.payload;\r\n }\r\n\r\n public get TextContent(): string {\r\n if (this.messageType === MessageType.Binary) {\r\n throw new InvalidOperationError(\"Not supported for binary message\");\r\n }\r\n\r\n return this.payload as string;\r\n }\r\n\r\n public get BinaryContent(): ArrayBuffer {\r\n if (this.messageType === MessageType.Text) {\r\n throw new InvalidOperationError(\"Not supported for text message\");\r\n }\r\n\r\n return this.payload;\r\n }\r\n\r\n public get Id(): string {\r\n return this.id;\r\n }\r\n}\r\n\n\n\n// WEBPACK FOOTER //\n// ../src/common/RawWebsocketMessage.ts","//\r\n// Copyright (c) Microsoft. All rights reserved.\r\n// See https://aka.ms/csspeech/license201809 for the full license information.\r\n//\r\n\r\nexport class RiffPcmEncoder {\r\n\r\n private actualSampleRate: number;\r\n private desiredSampleRate: number;\r\n private channelCount: number = 1;\r\n\r\n public constructor(actualSampleRate: number, desiredSampleRate: number) {\r\n this.actualSampleRate = actualSampleRate;\r\n this.desiredSampleRate = desiredSampleRate;\r\n }\r\n\r\n public Encode = (\r\n needHeader: boolean,\r\n actualAudioFrame: Float32Array): ArrayBuffer => {\r\n\r\n const audioFrame = this.DownSampleAudioFrame(actualAudioFrame, this.actualSampleRate, this.desiredSampleRate);\r\n\r\n if (!audioFrame) {\r\n return null;\r\n }\r\n\r\n const audioLength = audioFrame.length * 2;\r\n\r\n if (!needHeader) {\r\n const buffer = new ArrayBuffer(audioLength);\r\n const view = new DataView(buffer);\r\n this.FloatTo16BitPCM(view, 0, audioFrame);\r\n\r\n return buffer;\r\n }\r\n\r\n const buffer = new ArrayBuffer(44 + audioLength);\r\n\r\n const bitsPerSample = 16;\r\n const bytesPerSample = bitsPerSample / 8;\r\n // We dont know ahead of time about the length of audio to stream. So set to 0.\r\n const fileLength = 0;\r\n\r\n // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/DataView\r\n const view = new DataView(buffer);\r\n\r\n /* RIFF identifier */\r\n this.SetString(view, 0, \"RIFF\");\r\n /* file length */\r\n view.setUint32(4, fileLength, true);\r\n /* RIFF type & Format */\r\n this.SetString(view, 8, \"WAVEfmt \");\r\n /* format chunk length */\r\n view.setUint32(16, 16, true);\r\n /* sample format (raw) */\r\n view.setUint16(20, 1, true);\r\n /* channel count */\r\n view.setUint16(22, this.channelCount, true);\r\n /* sample rate */\r\n view.setUint32(24, this.desiredSampleRate, true);\r\n /* byte rate (sample rate * block align) */\r\n view.setUint32(28, this.desiredSampleRate * this.channelCount * bytesPerSample, true);\r\n /* block align (channel count * bytes per sample) */\r\n view.setUint16(32, this.channelCount * bytesPerSample, true);\r\n /* bits per sample */\r\n view.setUint16(34, bitsPerSample, true);\r\n /* data chunk identifier */\r\n this.SetString(view, 36, \"data\");\r\n /* data chunk length */\r\n view.setUint32(40, fileLength, true);\r\n\r\n this.FloatTo16BitPCM(view, 44, audioFrame);\r\n\r\n return buffer;\r\n }\r\n\r\n private SetString = (view: DataView, offset: number, str: string): void => {\r\n for (let i = 0; i < str.length; i++) {\r\n view.setUint8(offset + i, str.charCodeAt(i));\r\n }\r\n }\r\n\r\n private FloatTo16BitPCM = (view: DataView, offset: number, input: Float32Array): void => {\r\n for (let i = 0; i < input.length; i++ , offset += 2) {\r\n const s = Math.max(-1, Math.min(1, input[i]));\r\n view.setInt16(offset, s < 0 ? s * 0x8000 : s * 0x7FFF, true);\r\n }\r\n }\r\n\r\n private DownSampleAudioFrame = (\r\n srcFrame: Float32Array,\r\n srcRate: number,\r\n dstRate: number): Float32Array => {\r\n\r\n if (dstRate === srcRate || dstRate > srcRate) {\r\n return srcFrame;\r\n }\r\n\r\n const ratio = srcRate / dstRate;\r\n const dstLength = Math.round(srcFrame.length / ratio);\r\n const dstFrame = new Float32Array(dstLength);\r\n let srcOffset = 0;\r\n let dstOffset = 0;\r\n while (dstOffset < dstLength) {\r\n const nextSrcOffset = Math.round((dstOffset + 1) * ratio);\r\n let accum = 0;\r\n let count = 0;\r\n while (srcOffset < nextSrcOffset && srcOffset < srcFrame.length) {\r\n accum += srcFrame[srcOffset++];\r\n count++;\r\n }\r\n dstFrame[dstOffset++] = accum / count;\r\n }\r\n\r\n return dstFrame;\r\n }\r\n}\r\n\n\n\n// WEBPACK FOOTER //\n// ../src/common/RiffPcmEncoder.ts","//\r\n// Copyright (c) Microsoft. All rights reserved.\r\n// See https://aka.ms/csspeech/license201809 for the full license information.\r\n//\r\nimport { ArgumentNullError } from \"./Error\";\r\nimport { IKeyValueStorage } from \"./IKeyValueStorage\";\r\nimport { InMemoryStorage } from \"./InMemoryStorage\";\r\n\r\nexport class Storage {\r\n private static sessionStorage: IKeyValueStorage = new InMemoryStorage();\r\n private static localStorage: IKeyValueStorage = new InMemoryStorage();\r\n\r\n public static SetSessionStorage = (sessionStorage: IKeyValueStorage): void => {\r\n if (!sessionStorage) {\r\n throw new ArgumentNullError(\"sessionStorage\");\r\n }\r\n\r\n Storage.sessionStorage = sessionStorage;\r\n }\r\n\r\n public static SetLocalStorage = (localStorage: IKeyValueStorage): void => {\r\n if (!localStorage) {\r\n throw new ArgumentNullError(\"localStorage\");\r\n }\r\n\r\n Storage.localStorage = localStorage;\r\n }\r\n\r\n public static get Session(): IKeyValueStorage {\r\n return Storage.sessionStorage;\r\n }\r\n\r\n public static get Local(): IKeyValueStorage {\r\n return Storage.localStorage;\r\n }\r\n}\r\n\n\n\n// WEBPACK FOOTER //\n// ../src/common/Storage.ts","//\r\n// Copyright (c) Microsoft. All rights reserved.\r\n// See https://aka.ms/csspeech/license201809 for the full license information.\r\n//\r\nimport { InvalidOperationError } from \"./Error\";\r\nimport { CreateNoDashGuid } from \"./Guid\";\r\nimport { IStringDictionary } from \"./IDictionary\";\r\nimport { Promise } from \"./Promise\";\r\nimport { Queue } from \"./Queue\";\r\nimport { IStreamChunk } from \"./Stream\";\r\n\r\nexport interface IStreamChunk {\r\n IsEnd: boolean;\r\n Buffer: TBuffer;\r\n}\r\n\r\nexport class Stream {\r\n private id: string;\r\n private readerIdCounter: number = 1;\r\n private streambuffer: Array>;\r\n private isEnded: boolean = false;\r\n private readerQueues: IStringDictionary>>;\r\n\r\n public constructor(streamId?: string) {\r\n this.id = streamId ? streamId : CreateNoDashGuid();\r\n this.streambuffer = [];\r\n this.readerQueues = {};\r\n }\r\n\r\n public get IsClosed(): boolean {\r\n return this.isEnded;\r\n }\r\n\r\n public get Id(): string {\r\n return this.id;\r\n }\r\n\r\n public Write = (buffer: TBuffer): void => {\r\n this.ThrowIfClosed();\r\n this.WriteStreamChunk({\r\n Buffer: buffer,\r\n IsEnd: false,\r\n });\r\n }\r\n\r\n public GetReader = (): StreamReader => {\r\n const readerId = this.readerIdCounter;\r\n this.readerIdCounter++;\r\n const readerQueue = new Queue>();\r\n const currentLength = this.streambuffer.length;\r\n this.readerQueues[readerId] = readerQueue;\r\n for (let i = 0; i < currentLength; i++) {\r\n readerQueue.Enqueue(this.streambuffer[i]);\r\n }\r\n return new StreamReader(\r\n this.id,\r\n readerQueue,\r\n () => {\r\n delete this.readerQueues[readerId];\r\n });\r\n }\r\n\r\n public Close = (): void => {\r\n if (!this.isEnded) {\r\n this.WriteStreamChunk({\r\n Buffer: null,\r\n IsEnd: true,\r\n });\r\n this.isEnded = true;\r\n }\r\n }\r\n\r\n private WriteStreamChunk = (streamChunk: IStreamChunk): void => {\r\n this.ThrowIfClosed();\r\n this.streambuffer.push(streamChunk);\r\n for (const readerId in this.readerQueues) {\r\n if (!this.readerQueues[readerId].IsDisposed()) {\r\n try {\r\n this.readerQueues[readerId].Enqueue(streamChunk);\r\n } catch (e) {\r\n // Do nothing\r\n }\r\n }\r\n }\r\n }\r\n\r\n private ThrowIfClosed = (): void => {\r\n if (this.isEnded) {\r\n throw new InvalidOperationError(\"Stream closed\");\r\n }\r\n }\r\n}\r\n\r\n// tslint:disable-next-line:max-classes-per-file\r\nexport class StreamReader {\r\n private readerQueue: Queue>;\r\n private onClose: () => void;\r\n private isClosed: boolean = false;\r\n private streamId: string;\r\n\r\n public constructor(streamId: string, readerQueue: Queue>, onClose: () => void) {\r\n this.readerQueue = readerQueue;\r\n this.onClose = onClose;\r\n this.streamId = streamId;\r\n }\r\n\r\n public get IsClosed(): boolean {\r\n return this.isClosed;\r\n }\r\n\r\n public get StreamId(): string {\r\n return this.streamId;\r\n }\r\n\r\n public Read = (): Promise> => {\r\n if (this.IsClosed) {\r\n throw new InvalidOperationError(\"StreamReader closed\");\r\n }\r\n\r\n return this.readerQueue\r\n .Dequeue()\r\n .OnSuccessContinueWith((streamChunk: IStreamChunk) => {\r\n if (streamChunk.IsEnd) {\r\n this.readerQueue.Dispose(\"End of stream reached\");\r\n }\r\n\r\n return streamChunk;\r\n });\r\n }\r\n\r\n public Close = (): void => {\r\n if (!this.isClosed) {\r\n this.isClosed = true;\r\n this.readerQueue.Dispose(\"StreamReader closed\");\r\n this.onClose();\r\n }\r\n }\r\n}\r\n\n\n\n// WEBPACK FOOTER //\n// ../src/common/Stream.ts","//\r\n// Copyright (c) Microsoft. All rights reserved.\r\n// See https://aka.ms/csspeech/license201809 for the full license information.\r\n//\r\nimport { ArgumentNullError, IKeyValueStorage } from \"../common/Exports\";\r\n\r\nexport class LocalStorage implements IKeyValueStorage {\r\n\r\n public Get = (key: string): string => {\r\n if (!key) {\r\n throw new ArgumentNullError(\"key\");\r\n }\r\n\r\n return localStorage.getItem(key);\r\n }\r\n\r\n public GetOrAdd = (key: string, valueToAdd: string): string => {\r\n if (!key) {\r\n throw new ArgumentNullError(\"key\");\r\n }\r\n\r\n const value = localStorage.getItem(key);\r\n if (value === null || value === undefined) {\r\n localStorage.setItem(key, valueToAdd);\r\n }\r\n\r\n return localStorage.getItem(key);\r\n }\r\n\r\n public Set = (key: string, value: string): void => {\r\n if (!key) {\r\n throw new ArgumentNullError(\"key\");\r\n }\r\n\r\n localStorage.setItem(key, value);\r\n }\r\n\r\n public Remove = (key: string): void => {\r\n if (!key) {\r\n throw new ArgumentNullError(\"key\");\r\n }\r\n\r\n localStorage.removeItem(key);\r\n }\r\n}\r\n\n\n\n// WEBPACK FOOTER //\n// ../src/common.browser/LocalStorage.ts","//\r\n// Copyright (c) Microsoft. All rights reserved.\r\n// See https://aka.ms/csspeech/license201809 for the full license information.\r\n//\r\nimport { AudioStreamFormatImpl } from \"../../src/sdk/Audio/AudioStreamFormat\";\r\nimport { AudioStreamFormat } from \"../../src/sdk/Exports\";\r\nimport {\r\n AudioSourceErrorEvent,\r\n AudioSourceEvent,\r\n AudioSourceInitializingEvent,\r\n AudioSourceOffEvent,\r\n AudioSourceReadyEvent,\r\n AudioStreamNodeAttachedEvent,\r\n AudioStreamNodeAttachingEvent,\r\n AudioStreamNodeDetachedEvent,\r\n AudioStreamNodeErrorEvent,\r\n CreateNoDashGuid,\r\n Deferred,\r\n Events,\r\n EventSource,\r\n IAudioSource,\r\n IAudioStreamNode,\r\n IStringDictionary,\r\n PlatformEvent,\r\n Promise,\r\n PromiseHelper,\r\n Stream,\r\n StreamReader,\r\n} from \"../common/Exports\";\r\nimport { IRecorder } from \"./IRecorder\";\r\n\r\n// Extending the default definition with browser specific definitions for backward compatibility\r\ninterface INavigatorUserMedia extends NavigatorUserMedia {\r\n webkitGetUserMedia?: (constraints: MediaStreamConstraints, successCallback: NavigatorUserMediaSuccessCallback, errorCallback: NavigatorUserMediaErrorCallback) => void;\r\n mozGetUserMedia?: (constraints: MediaStreamConstraints, successCallback: NavigatorUserMediaSuccessCallback, errorCallback: NavigatorUserMediaErrorCallback) => void;\r\n msGetUserMedia?: (constraints: MediaStreamConstraints, successCallback: NavigatorUserMediaSuccessCallback, errorCallback: NavigatorUserMediaErrorCallback) => void;\r\n}\r\n\r\nexport class MicAudioSource implements IAudioSource {\r\n\r\n private static readonly AUDIOFORMAT: AudioStreamFormatImpl = AudioStreamFormat.getDefaultInputFormat() as AudioStreamFormatImpl;\r\n\r\n private streams: IStringDictionary> = {};\r\n\r\n private id: string;\r\n\r\n private events: EventSource;\r\n\r\n private initializeDeferral: Deferred;\r\n\r\n private recorder: IRecorder;\r\n\r\n private mediaStream: MediaStream;\r\n\r\n private context: AudioContext;\r\n\r\n public constructor(recorder: IRecorder, audioSourceId?: string) {\r\n this.id = audioSourceId ? audioSourceId : CreateNoDashGuid();\r\n this.events = new EventSource();\r\n this.recorder = recorder;\r\n }\r\n\r\n public get Format(): AudioStreamFormat {\r\n return MicAudioSource.AUDIOFORMAT;\r\n }\r\n\r\n public TurnOn = (): Promise => {\r\n if (this.initializeDeferral) {\r\n return this.initializeDeferral.Promise();\r\n }\r\n\r\n this.initializeDeferral = new Deferred();\r\n\r\n this.CreateAudioContext();\r\n\r\n const nav = window.navigator as INavigatorUserMedia;\r\n\r\n let getUserMedia = (\r\n nav.getUserMedia ||\r\n nav.webkitGetUserMedia ||\r\n nav.mozGetUserMedia ||\r\n nav.msGetUserMedia\r\n );\r\n\r\n if (!!nav.mediaDevices) {\r\n getUserMedia = (constraints: MediaStreamConstraints, successCallback: NavigatorUserMediaSuccessCallback, errorCallback: NavigatorUserMediaErrorCallback): void => {\r\n nav.mediaDevices\r\n .getUserMedia(constraints)\r\n .then(successCallback)\r\n .catch(errorCallback);\r\n };\r\n }\r\n\r\n if (!getUserMedia) {\r\n const errorMsg = \"Browser does not support getUserMedia.\";\r\n this.initializeDeferral.Reject(errorMsg);\r\n this.OnEvent(new AudioSourceErrorEvent(errorMsg, \"\")); // mic initialized error - no streamid at this point\r\n } else {\r\n const next = () => {\r\n this.OnEvent(new AudioSourceInitializingEvent(this.id)); // no stream id\r\n getUserMedia(\r\n { audio: true, video: false },\r\n (mediaStream: MediaStream) => {\r\n this.mediaStream = mediaStream;\r\n this.OnEvent(new AudioSourceReadyEvent(this.id));\r\n this.initializeDeferral.Resolve(true);\r\n }, (error: MediaStreamError) => {\r\n const errorMsg = `Error occurred during microphone initialization: ${error}`;\r\n const tmp = this.initializeDeferral;\r\n // HACK: this should be handled through onError callbacks of all promises up the stack.\r\n // Unfortunately, the current implementation does not provide an easy way to reject promises\r\n // without a lot of code replication.\r\n // TODO: fix promise implementation, allow for a graceful reject chaining.\r\n this.initializeDeferral = null;\r\n tmp.Reject(errorMsg); // this will bubble up through the whole chain of promises,\r\n // with each new level adding extra \"Unhandled callback error\" prefix to the error message.\r\n // The following line is not guaranteed to be executed.\r\n this.OnEvent(new AudioSourceErrorEvent(this.id, errorMsg));\r\n });\r\n };\r\n\r\n if (this.context.state === \"suspended\") {\r\n // NOTE: On iOS, the Web Audio API requires sounds to be triggered from an explicit user action.\r\n // https://github.com/WebAudio/web-audio-api/issues/790\r\n this.context.resume().then(next, (reason: any) => {\r\n this.initializeDeferral.Reject(`Failed to initialize audio context: ${reason}`);\r\n });\r\n } else {\r\n next();\r\n }\r\n }\r\n\r\n return this.initializeDeferral.Promise();\r\n }\r\n\r\n public Id = (): string => {\r\n return this.id;\r\n }\r\n\r\n public Attach = (audioNodeId: string): Promise => {\r\n this.OnEvent(new AudioStreamNodeAttachingEvent(this.id, audioNodeId));\r\n\r\n return this.Listen(audioNodeId).OnSuccessContinueWith(\r\n (streamReader: StreamReader) => {\r\n this.OnEvent(new AudioStreamNodeAttachedEvent(this.id, audioNodeId));\r\n return {\r\n Detach: () => {\r\n streamReader.Close();\r\n delete this.streams[audioNodeId];\r\n this.OnEvent(new AudioStreamNodeDetachedEvent(this.id, audioNodeId));\r\n this.TurnOff();\r\n },\r\n Id: () => {\r\n return audioNodeId;\r\n },\r\n Read: () => {\r\n return streamReader.Read();\r\n },\r\n };\r\n });\r\n }\r\n\r\n public Detach = (audioNodeId: string): void => {\r\n if (audioNodeId && this.streams[audioNodeId]) {\r\n this.streams[audioNodeId].Close();\r\n delete this.streams[audioNodeId];\r\n this.OnEvent(new AudioStreamNodeDetachedEvent(this.id, audioNodeId));\r\n }\r\n }\r\n\r\n public TurnOff = (): Promise => {\r\n for (const streamId in this.streams) {\r\n if (streamId) {\r\n const stream = this.streams[streamId];\r\n if (stream) {\r\n stream.Close();\r\n }\r\n }\r\n }\r\n\r\n this.OnEvent(new AudioSourceOffEvent(this.id)); // no stream now\r\n this.initializeDeferral = null;\r\n\r\n this.DestroyAudioContext();\r\n\r\n return PromiseHelper.FromResult(true);\r\n }\r\n\r\n public get Events(): EventSource {\r\n return this.events;\r\n }\r\n\r\n private Listen = (audioNodeId: string): Promise> => {\r\n return this.TurnOn()\r\n .OnSuccessContinueWith>((_: boolean) => {\r\n const stream = new Stream(audioNodeId);\r\n this.streams[audioNodeId] = stream;\r\n\r\n try {\r\n this.recorder.Record(this.context, this.mediaStream, stream);\r\n } catch (error) {\r\n this.OnEvent(new AudioStreamNodeErrorEvent(this.id, audioNodeId, error));\r\n throw error;\r\n }\r\n\r\n return stream.GetReader();\r\n });\r\n }\r\n\r\n private OnEvent = (event: AudioSourceEvent): void => {\r\n this.events.OnEvent(event);\r\n Events.Instance.OnEvent(event);\r\n }\r\n\r\n private CreateAudioContext = (): void => {\r\n if (!!this.context) {\r\n return;\r\n }\r\n\r\n // https://developer.mozilla.org/en-US/docs/Web/API/AudioContext\r\n const AudioContext = ((window as any).AudioContext)\r\n || ((window as any).webkitAudioContext)\r\n || false;\r\n\r\n if (!AudioContext) {\r\n throw new Error(\"Browser does not support Web Audio API (AudioContext is not available).\");\r\n }\r\n\r\n this.context = new AudioContext();\r\n }\r\n\r\n private DestroyAudioContext = (): void => {\r\n if (!this.context) {\r\n return;\r\n }\r\n\r\n this.recorder.ReleaseMediaResources(this.context);\r\n\r\n if (\"close\" in this.context) {\r\n this.context.close();\r\n this.context = null;\r\n } else if (this.context.state === \"running\") {\r\n // Suspend actually takes a callback, but analogous to the\r\n // resume method, it'll be only fired if suspend is called\r\n // in a direct response to a user action. The later is not always\r\n // the case, as TurnOff is also called, when we receive an\r\n // end-of-speech message from the service. So, doing a best effort\r\n // fire-and-forget here.\r\n this.context.suspend();\r\n }\r\n }\r\n}\r\n\n\n\n// WEBPACK FOOTER //\n// ../src/common.browser/MicAudioSource.ts","//\r\n// Copyright (c) Microsoft. All rights reserved.\r\n// See https://aka.ms/csspeech/license201809 for the full license information.\r\n//\r\n\r\nimport { AudioStreamFormat } from \"../../../src/sdk/Exports\";\r\nimport { FileAudioSource, MicAudioSource, PcmRecorder } from \"../../common.browser/Exports\";\r\nimport { AudioSourceEvent, EventSource, IAudioSource, IAudioStreamNode, Promise } from \"../../common/exports\";\r\nimport { AudioInputStream, PullAudioInputStreamCallback } from \"../Exports\";\r\nimport { PullAudioInputStreamImpl, PushAudioInputStreamImpl } from \"./AudioInputStream\";\r\n\r\n/**\r\n * Represents audio input configuration used for specifying what type of input to use (microphone, file, stream).\r\n * @class AudioConfig\r\n */\r\nexport abstract class AudioConfig {\r\n /**\r\n * Creates an AudioConfig object representing the default microphone on the system.\r\n * @member AudioConfig.fromDefaultMicrophoneInput\r\n * @function\r\n * @public\r\n * @returns {AudioConfig} The audio input configuration being created.\r\n */\r\n public static fromDefaultMicrophoneInput(): AudioConfig {\r\n const pcmRecorder = new PcmRecorder();\r\n return new AudioConfigImpl(new MicAudioSource(pcmRecorder));\r\n }\r\n\r\n /**\r\n * Creates an AudioConfig object representing the specified file.\r\n * @member AudioConfig.fromWavFileInput\r\n * @function\r\n * @public\r\n * @param {File} fileName - Specifies the audio input file. Currently, only WAV / PCM with 16-bit samples, 16 kHz sample rate, and a single channel (Mono) is supported.\r\n * @returns {AudioConfig} The audio input configuration being created.\r\n */\r\n public static fromWavFileInput(file: File): AudioConfig {\r\n return new AudioConfigImpl(new FileAudioSource(file));\r\n }\r\n\r\n /**\r\n * Creates an AudioConfig object representing the specified stream.\r\n * @member AudioConfig.fromStreamInput\r\n * @function\r\n * @public\r\n * @param {AudioInputStream | PullAudioInputStreamCallback} audioStream - Specifies the custom audio input stream. Currently, only WAV / PCM with 16-bit samples, 16 kHz sample rate, and a single channel (Mono) is supported.\r\n * @returns {AudioConfig} The audio input configuration being created.\r\n */\r\n public static fromStreamInput(audioStream: AudioInputStream | PullAudioInputStreamCallback): AudioConfig {\r\n if (audioStream instanceof PullAudioInputStreamCallback) {\r\n return new AudioConfigImpl(new PullAudioInputStreamImpl(audioStream as PullAudioInputStreamCallback));\r\n }\r\n\r\n if (audioStream instanceof AudioInputStream) {\r\n return new AudioConfigImpl(audioStream as PushAudioInputStreamImpl);\r\n }\r\n\r\n throw new Error(\"Not Supported Type\");\r\n }\r\n\r\n /**\r\n * Explicitly frees any external resource attached to the object\r\n * @member AudioConfig.prototype.close\r\n * @function\r\n * @public\r\n */\r\n public abstract close(): void;\r\n}\r\n\r\n/**\r\n * Represents audio input stream used for custom audio input configurations.\r\n * @private\r\n * @class AudioConfigImpl\r\n */\r\n// tslint:disable-next-line:max-classes-per-file\r\nexport class AudioConfigImpl extends AudioConfig implements IAudioSource {\r\n private source: IAudioSource;\r\n\r\n /**\r\n * Creates and initializes an instance of this class.\r\n * @constructor\r\n * @param {IAudioSource} source - An audio source.\r\n */\r\n public constructor(source: IAudioSource) {\r\n super();\r\n this.source = source;\r\n }\r\n\r\n /**\r\n * Format information for the audio\r\n */\r\n public get Format(): AudioStreamFormat {\r\n return this.source.Format;\r\n }\r\n\r\n /**\r\n * @member AudioConfigImpl.prototype.close\r\n * @function\r\n * @public\r\n */\r\n public close(): void {\r\n this.source.TurnOff();\r\n }\r\n\r\n /**\r\n * @member AudioConfigImpl.prototype.Id\r\n * @function\r\n * @public\r\n */\r\n public Id(): string {\r\n return this.source.Id();\r\n }\r\n\r\n /**\r\n * @member AudioConfigImpl.prototype.TurnOn\r\n * @function\r\n * @public\r\n * @returns {Promise} A promise.\r\n */\r\n public TurnOn(): Promise {\r\n return this.source.TurnOn();\r\n }\r\n\r\n /**\r\n * @member AudioConfigImpl.prototype.Attach\r\n * @function\r\n * @public\r\n * @param {string} audioNodeId - The audio node id.\r\n * @returns {Promise} A promise.\r\n */\r\n public Attach(audioNodeId: string): Promise {\r\n return this.source.Attach(audioNodeId);\r\n }\r\n\r\n /**\r\n * @member AudioConfigImpl.prototype.Detach\r\n * @function\r\n * @public\r\n * @param {string} audioNodeId - The audio node id.\r\n */\r\n public Detach(audioNodeId: string): void {\r\n return this.Detach(audioNodeId);\r\n }\r\n\r\n /**\r\n * @member AudioConfigImpl.prototype.TurnOff\r\n * @function\r\n * @public\r\n * @returns {Promise} A promise.\r\n */\r\n public TurnOff(): Promise {\r\n return this.source.TurnOff();\r\n }\r\n\r\n /**\r\n * @member AudioConfigImpl.prototype.Events\r\n * @function\r\n * @public\r\n * @returns {EventSource} An event source for audio events.\r\n */\r\n public get Events(): EventSource {\r\n return this.source.Events;\r\n }\r\n}\r\n\n\n\n// WEBPACK FOOTER //\n// ../src/sdk/Audio/AudioConfig.ts","//\r\n// Copyright (c) Microsoft. All rights reserved.\r\n// See https://aka.ms/csspeech/license201809 for the full license information.\r\n//\r\n\r\n/**\r\n * Defines the possible reasons a recognition result might be canceled.\r\n * @class CancellationReason\r\n */\r\nexport enum CancellationReason {\r\n /**\r\n * Indicates that an error occurred during speech recognition. Use getErrorDetails() contains detailed error response.\r\n * @member CancellationReason.Error\r\n */\r\n Error,\r\n\r\n /**\r\n * Indicates that the end of the audio stream was reached.\r\n * @member CancellationReason.EndOfStream\r\n */\r\n EndOfStream,\r\n}\r\n\n\n\n// WEBPACK FOOTER //\n// ../src/sdk/CancellationReason.ts","//\r\n// Copyright (c) Microsoft. All rights reserved.\r\n// See https://aka.ms/csspeech/license201809 for the full license information.\r\n//\r\n\r\n /**\r\n * An abstract base class that defines callback methods (read() and close()) for custom audio input streams).\r\n * @class PullAudioInputStreamCallback\r\n */\r\nexport abstract class PullAudioInputStreamCallback {\r\n\r\n /**\r\n * Reads data from audio input stream into the data buffer. The maximal number of bytes to be read is determined by the size of dataBuffer.\r\n * @member PullAudioInputStreamCallback.prototype.read\r\n * @function\r\n * @public\r\n * @param {ArrayBuffer} dataBuffer - The byte array to store the read data.\r\n * @returns {number} the number of bytes have been read.\r\n */\r\n public abstract read(dataBuffer: ArrayBuffer): number;\r\n\r\n /**\r\n * Closes the audio input stream.\r\n * @member PullAudioInputStreamCallback.prototype.close\r\n * @function\r\n * @public\r\n */\r\n public abstract close(): void;\r\n}\r\n\n\n\n// WEBPACK FOOTER //\n// ../src/sdk/Audio/PullAudioInputStreamCallback.ts","import { Contracts } from \"./Contracts\";\r\n\r\n//\r\n// copyright (c) Microsoft. All rights reserved.\r\n// See https://aka.ms/csspeech/license201809 for the full license information.\r\n//\r\n\r\n/**\r\n * Represents a keyword recognition model for recognizing when\r\n * the user says a keyword to initiate further speech recognition.\r\n * @class KeywordRecognitionModel\r\n */\r\nexport class KeywordRecognitionModel {\r\n private disposed: boolean = false;\r\n\r\n /**\r\n * Create and initializes a new instance.\r\n * @constructor\r\n */\r\n private constructor() {\r\n }\r\n\r\n /**\r\n * Creates a keyword recognition model using the specified filename.\r\n * @member KeywordRecognitionModel.fromFile\r\n * @function\r\n * @public\r\n * @param {string} fileName - A string that represents file name for the keyword recognition model.\r\n * Note, the file can point to a zip file in which case the model will be extracted from the zip.\r\n * @returns {KeywordRecognitionModel} The keyword recognition model being created.\r\n */\r\n public static fromFile(fileName: string): KeywordRecognitionModel {\r\n Contracts.throwIfFileDoesNotExist(fileName, \"fileName\");\r\n\r\n throw new Error(\"Not yet implemented.\");\r\n }\r\n\r\n /**\r\n * Creates a keyword recognition model using the specified filename.\r\n * @member KeywordRecognitionModel.fromStream\r\n * @function\r\n * @public\r\n * @param {string} file - A File that represents file for the keyword recognition model.\r\n * Note, the file can point to a zip file in which case the model will be extracted from the zip.\r\n * @returns {KeywordRecognitionModel} The keyword recognition model being created.\r\n */\r\n public static fromStream(file: File): KeywordRecognitionModel {\r\n Contracts.throwIfNull(file, \"file\");\r\n\r\n throw new Error(\"Not yet implemented.\");\r\n }\r\n\r\n /**\r\n * Dispose of associated resources.\r\n * @member KeywordRecognitionModel.prototype.close\r\n * @function\r\n * @public\r\n */\r\n public close(): void {\r\n if (this.disposed) {\r\n return;\r\n }\r\n\r\n this.disposed = true;\r\n }\r\n}\r\n\n\n\n// WEBPACK FOOTER //\n// ../src/sdk/KeywordRecognitionModel.ts","//\r\n// copyright (c) Microsoft. All rights reserved.\r\n// See https://aka.ms/csspeech/license201809 for the full license information.\r\n//\r\n\r\n/**\r\n * Defines content for session events like SessionStarted/Stopped, SoundStarted/Stopped.\r\n * @class SessionEventArgs\r\n */\r\nexport class SessionEventArgs {\r\n private privSessionId: string;\r\n\r\n /**\r\n * Creates and initializes an instance of this class.\r\n * @constructor\r\n * @param {string} sessionId - The session id.\r\n */\r\n public constructor(sessionId: string) {\r\n this.privSessionId = sessionId;\r\n }\r\n\r\n /**\r\n * Represents the session identifier.\r\n * @member SessionEventArgs.prototype.sessionId\r\n * @function\r\n * @public\r\n * @returns {string} Represents the session identifier.\r\n */\r\n public get sessionId(): string {\r\n return this.privSessionId;\r\n }\r\n}\r\n\n\n\n// WEBPACK FOOTER //\n// ../src/sdk/SessionEventArgs.ts","//\r\n// copyright (c) Microsoft. All rights reserved.\r\n// See https://aka.ms/csspeech/license201809 for the full license information.\r\n//\r\n\r\nimport { SessionEventArgs } from \"./Exports\";\r\n\r\n/**\r\n * Defines payload for session events like Speech Start/End Detected\r\n * @class\r\n */\r\nexport class RecognitionEventArgs extends SessionEventArgs {\r\n private privOffset: number;\r\n\r\n /**\r\n * Creates and initializes an instance of this class.\r\n * @constructor\r\n * @param {number} offset - The offset.\r\n * @param {string} sessionId - The session id.\r\n */\r\n public constructor(offset: number, sessionId?: string) {\r\n super(sessionId);\r\n\r\n this.privOffset = offset;\r\n }\r\n\r\n /**\r\n * Represents the message offset\r\n * @member RecognitionEventArgs.prototype.offset\r\n * @function\r\n * @public\r\n */\r\n public get offset(): number {\r\n return this.privOffset;\r\n }\r\n}\r\n\n\n\n// WEBPACK FOOTER //\n// ../src/sdk/RecognitionEventArgs.ts","//\r\n// copyright (c) Microsoft. All rights reserved.\r\n// See https://aka.ms/csspeech/license201809 for the full license information.\r\n//\r\n\r\n/**\r\n * Define Speech Recognizer output formats.\r\n * @class OutputFormat\r\n */\r\nexport enum OutputFormat {\r\n /**\r\n * @member OutputFormat.Simple\r\n */\r\n Simple = 0,\r\n\r\n /**\r\n * @member OutputFormat.Detailed\r\n */\r\n Detailed,\r\n}\r\n\n\n\n// WEBPACK FOOTER //\n// ../src/sdk/OutputFormat.ts","//\r\n// copyright (c) Microsoft. All rights reserved.\r\n// See https://aka.ms/csspeech/license201809 for the full license information.\r\n//\r\nimport {\r\n IntentRecognitionResult,\r\n RecognitionEventArgs,\r\n} from \"./Exports\";\r\n\r\n/**\r\n * Intent recognition result event arguments.\r\n * @class\r\n */\r\nexport class IntentRecognitionEventArgs extends RecognitionEventArgs {\r\n private privResult: IntentRecognitionResult;\r\n\r\n /**\r\n * Creates and initializes an instance of this class.\r\n * @constructor\r\n * @param result - The result of the intent recognition.\r\n * @param offset - The offset.\r\n * @param sessionId - The session id.\r\n */\r\n public constructor(result: IntentRecognitionResult, offset?: number, sessionId?: string) {\r\n super(offset, sessionId);\r\n\r\n this.privResult = result;\r\n }\r\n\r\n /**\r\n * Represents the intent recognition result.\r\n * @member IntentRecognitionEventArgs.prototype.result\r\n * @function\r\n * @public\r\n * @returns {IntentRecognitionResult} Represents the intent recognition result.\r\n */\r\n public get result(): IntentRecognitionResult {\r\n return this.privResult;\r\n }\r\n}\r\n\n\n\n// WEBPACK FOOTER //\n// ../src/sdk/IntentRecognitionEventArgs.ts","//\r\n// copyright (c) Microsoft. All rights reserved.\r\n// See https://aka.ms/csspeech/license201809 for the full license information.\r\n//\r\nimport { PropertyCollection, ResultReason } from \"./Exports\";\r\n\r\n/**\r\n * Defines result of speech recognition.\r\n * @class RecognitionResult\r\n */\r\nexport class RecognitionResult {\r\n private privResultId: string;\r\n private privReason: ResultReason;\r\n private privText: string;\r\n private privDuration: number;\r\n private privOffset: number;\r\n private privErrorDetails: string;\r\n private privJson: string;\r\n private privProperties: PropertyCollection;\r\n\r\n /**\r\n * Creates and initializes an instance of this class.\r\n * @constructor\r\n * @param {string} resultId - The result id.\r\n * @param {ResultReason} reason - The reason.\r\n * @param {string} text - The recognized text.\r\n * @param {number} duration - The duration.\r\n * @param {number} offset - The offset into the stream.\r\n * @param {string} errorDetails - Error details, if provided.\r\n * @param {string} json - Additional Json, if provided.\r\n * @param {PropertyCollection} properties - Additional properties, if provided.\r\n */\r\n constructor(resultId?: string, reason?: ResultReason, text?: string, duration?: number, offset?: number, errorDetails?: string, json?: string, properties?: PropertyCollection) {\r\n this.privResultId = resultId;\r\n this.privReason = reason;\r\n this.privText = text;\r\n this.privDuration = duration;\r\n this.privOffset = offset;\r\n this.privErrorDetails = errorDetails;\r\n this.privJson = json;\r\n this.privProperties = properties;\r\n }\r\n\r\n /**\r\n * Specifies the result identifier.\r\n * @member RecognitionResult.prototype.resultId\r\n * @function\r\n * @public\r\n * @returns {string} Specifies the result identifier.\r\n */\r\n public get resultId(): string {\r\n return this.privResultId;\r\n }\r\n\r\n /**\r\n * Specifies status of the result.\r\n * @member RecognitionResult.prototype.reason\r\n * @function\r\n * @public\r\n * @returns {ResultReason} Specifies status of the result.\r\n */\r\n public get reason(): ResultReason {\r\n return this.privReason;\r\n }\r\n\r\n /**\r\n * Presents the recognized text in the result.\r\n * @member RecognitionResult.prototype.text\r\n * @function\r\n * @public\r\n * @returns {string} Presents the recognized text in the result.\r\n */\r\n public get text(): string {\r\n return this.privText;\r\n }\r\n\r\n /**\r\n * Duration of recognized speech in 100 nano second incements.\r\n * @member RecognitionResult.prototype.duration\r\n * @function\r\n * @public\r\n * @returns {number} Duration of recognized speech in 100 nano second incements.\r\n */\r\n public get duration(): number {\r\n return this.privDuration;\r\n }\r\n\r\n /**\r\n * Offset of recognized speech in 100 nano second incements.\r\n * @member RecognitionResult.prototype.offset\r\n * @function\r\n * @public\r\n * @returns {number} Offset of recognized speech in 100 nano second incements.\r\n */\r\n public get offset(): number {\r\n return this.privOffset;\r\n }\r\n\r\n /**\r\n * In case of an unsuccessful recognition, provides a brief description of an occurred error.\r\n * This field is only filled-out if the recognition status (@see RecognitionStatus) is set to Canceled.\r\n * @member RecognitionResult.prototype.errorDetails\r\n * @function\r\n * @public\r\n * @returns {string} a brief description of an error.\r\n */\r\n public get errorDetails(): string {\r\n return this.privErrorDetails;\r\n }\r\n\r\n /**\r\n * A string containing Json serialized recognition result as it was received from the service.\r\n * @member RecognitionResult.prototype.json\r\n * @function\r\n * @private\r\n * @returns {string} Json serialized representation of the result.\r\n */\r\n public get json(): string {\r\n return this.privJson;\r\n }\r\n\r\n /**\r\n * The set of properties exposed in the result.\r\n * @member RecognitionResult.prototype.properties\r\n * @function\r\n * @public\r\n * @returns {PropertyCollection} The set of properties exposed in the result.\r\n */\r\n public get properties(): PropertyCollection {\r\n return this.privProperties;\r\n }\r\n}\r\n\n\n\n// WEBPACK FOOTER //\n// ../src/sdk/RecognitionResult.ts","//\r\n// copyright (c) Microsoft. All rights reserved.\r\n// See https://aka.ms/csspeech/license201809 for the full license information.\r\n//\r\nimport { PropertyCollection, RecognitionResult, ResultReason } from \"./Exports\";\r\n\r\n/**\r\n * Defines result of speech recognition.\r\n * @class SpeechRecognitionResult\r\n */\r\nexport class SpeechRecognitionResult extends RecognitionResult {\r\n /**\r\n * Creates and initializes an instance of this class.\r\n * @constructor\r\n * @public\r\n * @param {string} resultId - The result id.\r\n * @param {ResultReason} reason - The reason.\r\n * @param {string} text - The recognized text.\r\n * @param {number} duration - The duration.\r\n * @param {number} offset - The offset into the stream.\r\n * @param {string} errorDetails - Error details, if provided.\r\n * @param {string} json - Additional Json, if provided.\r\n * @param {PropertyCollection} properties - Additional properties, if provided.\r\n */\r\n public constructor(resultId?: string, reason?: ResultReason, text?: string, duration?: number, offset?: number, errorDetails?: string, json?: string, properties?: PropertyCollection) {\r\n super(resultId, reason, text, duration, offset, errorDetails, json, properties);\r\n }\r\n}\r\n\n\n\n// WEBPACK FOOTER //\n// ../src/sdk/SpeechRecognitionResult.ts","//\r\n// copyright (c) Microsoft. All rights reserved.\r\n// See https://aka.ms/csspeech/license201809 for the full license information.\r\n//\r\n\r\nimport {\r\n PropertyCollection,\r\n ResultReason,\r\n SpeechRecognitionResult,\r\n} from \"./Exports\";\r\n\r\n/**\r\n * Intent recognition result.\r\n * @class\r\n */\r\nexport class IntentRecognitionResult extends SpeechRecognitionResult {\r\n private privIntentId: string;\r\n\r\n /**\r\n * Creates and initializes an instance of this class.\r\n * @constructor\r\n * @param intentId - The intent id.\r\n * @param resultId - The result id.\r\n * @param reason - The reason.\r\n * @param text - The recognized text.\r\n * @param duration - The duration.\r\n * @param offset - The offset into the stream.\r\n * @param errorDetails - Error details, if provided.\r\n * @param json - Additional Json, if provided.\r\n * @param properties - Additional properties, if provided.\r\n */\r\n constructor(intentId?: string, resultId?: string, reason?: ResultReason, text?: string, duration?: number, offset?: number, errorDetails?: string, json?: string, properties?: PropertyCollection) {\r\n super(resultId, reason, text, duration, offset, errorDetails, json, properties);\r\n\r\n this.privIntentId = intentId;\r\n }\r\n\r\n /**\r\n * A String that represents the intent identifier being recognized.\r\n * @member IntentRecognitionResult.prototype.intentId\r\n * @function\r\n * @public\r\n * @returns {string} A String that represents the intent identifier being recognized.\r\n */\r\n public get intentId(): string {\r\n return this.privIntentId;\r\n }\r\n}\r\n\n\n\n// WEBPACK FOOTER //\n// ../src/sdk/IntentRecognitionResult.ts","//\r\n// copyright (c) Microsoft. All rights reserved.\r\n// See https://aka.ms/csspeech/license201809 for the full license information.\r\n//\r\nimport { ArgumentNullError } from \"../common/Error\";\r\nimport { Contracts } from \"./Contracts\";\r\n\r\n/**\r\n * Language understanding model\r\n * @class LanguageUnderstandingModel\r\n */\r\nexport class LanguageUnderstandingModel {\r\n /**\r\n * Creates and initializes a new instance\r\n * @constructor\r\n */\r\n protected constructor() {\r\n }\r\n\r\n /**\r\n * Creates an language understanding model using the specified endpoint.\r\n * @member LanguageUnderstandingModel.fromEndpoint\r\n * @function\r\n * @public\r\n * @param {URL} uri - A String that represents the endpoint of the language understanding model.\r\n * @returns {LanguageUnderstandingModel} The language understanding model being created.\r\n */\r\n public static fromEndpoint(uri: URL): LanguageUnderstandingModel {\r\n Contracts.throwIfNull(uri, \"uri\");\r\n Contracts.throwIfNullOrWhitespace(uri.hostname, \"uri\");\r\n\r\n const langModelImp: LanguageUnderstandingModelImpl = new LanguageUnderstandingModelImpl();\r\n // Need to extract the app ID from the URL.\r\n // URL is in the format: https://.api.cognitive.microsoft.com/luis/v2.0/apps/?subscription-key=&timezoneOffset=-360\r\n\r\n // Start tearing the string apart.\r\n\r\n // region can be extracted from the host name.\r\n const firstDot: number = uri.host.indexOf(\".\");\r\n if (-1 === firstDot) {\r\n throw new Error(\"Could not determine region from endpoint\");\r\n }\r\n langModelImp.region = uri.host.substr(0, firstDot);\r\n\r\n // Now the app ID.\r\n\r\n const lastSegment: number = uri.pathname.lastIndexOf(\"/\") + 1;\r\n if (-1 === lastSegment) {\r\n throw new Error(\"Could not determine appId from endpoint\");\r\n }\r\n\r\n langModelImp.appId = uri.pathname.substr(lastSegment);\r\n\r\n // And finally the key.\r\n langModelImp.subscriptionKey = uri.searchParams.get(\"subscription-key\");\r\n if (undefined === langModelImp.subscriptionKey) {\r\n throw new Error(\"Could not determine subscription key from endpoint\");\r\n }\r\n\r\n return langModelImp;\r\n }\r\n\r\n /**\r\n * Creates an language understanding model using the application id of Language Understanding service.\r\n * @member LanguageUnderstandingModel.fromAppId\r\n * @function\r\n * @public\r\n * @param {string} appId - A String that represents the application id of Language Understanding service.\r\n * @returns {LanguageUnderstandingModel} The language understanding model being created.\r\n */\r\n public static fromAppId(appId: string): LanguageUnderstandingModel {\r\n Contracts.throwIfNullOrWhitespace(appId, \"appId\");\r\n\r\n const langModelImp: LanguageUnderstandingModelImpl = new LanguageUnderstandingModelImpl();\r\n langModelImp.appId = appId;\r\n return langModelImp;\r\n }\r\n\r\n /**\r\n * Creates a language understanding model using hostname, subscription key and application id of Language Understanding service.\r\n * @member LanguageUnderstandingModel.fromSubscription\r\n * @function\r\n * @public\r\n * @param {string} subscriptionKey - A String that represents the subscription key of Language Understanding service.\r\n * @param {string} appId - A String that represents the application id of Language Understanding service.\r\n * @param {LanguageUnderstandingModel} region - A String that represents the region of the Language Understanding service (see the region page).\r\n * @returns {LanguageUnderstandingModel} The language understanding model being created.\r\n */\r\n public static fromSubscription(subscriptionKey: string, appId: string, region: string): LanguageUnderstandingModel {\r\n Contracts.throwIfNullOrWhitespace(subscriptionKey, \"subscriptionKey\");\r\n Contracts.throwIfNullOrWhitespace(appId, \"appId\");\r\n Contracts.throwIfNullOrWhitespace(region, \"region\");\r\n\r\n const langModelImp: LanguageUnderstandingModelImpl = new LanguageUnderstandingModelImpl();\r\n langModelImp.appId = appId;\r\n langModelImp.region = region;\r\n langModelImp.subscriptionKey = subscriptionKey;\r\n return langModelImp;\r\n }\r\n}\r\n\r\n/**\r\n * @private\r\n * @class LanguageUnderstandingModelImpl\r\n */\r\n// tslint:disable-next-line:max-classes-per-file\r\nexport class LanguageUnderstandingModelImpl extends LanguageUnderstandingModel {\r\n public appId: string;\r\n public region: string;\r\n public subscriptionKey: string;\r\n}\r\n\n\n\n// WEBPACK FOOTER //\n// ../src/sdk/LanguageUnderstandingModel.ts","//\r\n// copyright (c) Microsoft. All rights reserved.\r\n// See https://aka.ms/csspeech/license201809 for the full license information.\r\n//\r\nimport {\r\n RecognitionEventArgs,\r\n SpeechRecognitionResult,\r\n} from \"./Exports\";\r\n\r\n/**\r\n * Defines contents of speech recognizing/recognized event.\r\n * @class SpeechRecognitionEventArgs\r\n */\r\nexport class SpeechRecognitionEventArgs extends RecognitionEventArgs {\r\n private privResult: SpeechRecognitionResult;\r\n\r\n /**\r\n * Creates and initializes an instance of this class.\r\n * @constructor\r\n * @param {SpeechRecognitionResult} result - The speech recognition result.\r\n * @param {number} offset - The offset.\r\n * @param {string} sessionId - The session id.\r\n */\r\n public constructor(result: SpeechRecognitionResult, offset?: number, sessionId?: string) {\r\n super(offset, sessionId);\r\n\r\n this.privResult = result;\r\n }\r\n\r\n /**\r\n * Specifies the recognition result.\r\n * @member SpeechRecognitionEventArgs.prototype.result\r\n * @function\r\n * @public\r\n * @returns {SpeechRecognitionResult} the recognition result.\r\n */\r\n public get result(): SpeechRecognitionResult {\r\n return this.privResult;\r\n }\r\n}\r\n\n\n\n// WEBPACK FOOTER //\n// ../src/sdk/SpeechRecognitionEventArgs.ts","//\r\n// copyright (c) Microsoft. All rights reserved.\r\n// See https://aka.ms/csspeech/license201809 for the full license information.\r\n//\r\n\r\nimport {\r\n CancellationErrorCode,\r\n CancellationReason,\r\n RecognitionEventArgs,\r\n} from \"./Exports\";\r\n\r\n/**\r\n * Defines content of a RecognitionErrorEvent.\r\n * @class SpeechRecognitionCanceledEventArgs\r\n */\r\nexport class SpeechRecognitionCanceledEventArgs extends RecognitionEventArgs {\r\n private privReason: CancellationReason;\r\n private privErrorDetails: string;\r\n private privErrorCode: CancellationErrorCode;\r\n\r\n /**\r\n * Creates and initializes an instance of this class.\r\n * @constructor\r\n * @param {CancellationReason} reason - The cancellation reason.\r\n * @param {string} errorDetails - Error details, if provided.\r\n * @param {number} offset - The offset.\r\n * @param {string} sessionId - The session id.\r\n */\r\n public constructor(reason: CancellationReason, errorDetails: string, errorCode: CancellationErrorCode, offset?: number, sessionId?: string) {\r\n super(offset, sessionId);\r\n\r\n this.privReason = reason;\r\n this.privErrorDetails = errorDetails;\r\n this.privErrorCode = errorCode;\r\n }\r\n\r\n /**\r\n * The reason the recognition was canceled.\r\n * @member SpeechRecognitionCanceledEventArgs.prototype.reason\r\n * @function\r\n * @public\r\n * @returns {CancellationReason} Specifies the reason canceled.\r\n */\r\n public get reason(): CancellationReason {\r\n return this.privReason;\r\n }\r\n\r\n /**\r\n * The error code of why the cancellation occurred.\r\n * @return An error code that represents the error reason.\r\n * Added in version 1.1.0.\r\n */\r\n public get errorCode(): CancellationErrorCode {\r\n return this.privErrorCode;\r\n }\r\n\r\n /**\r\n * In case of an unsuccessful recognition, provides a details of why the occurred error.\r\n * This field is only filled-out if the reason canceled (@see getReason) is set to Error.\r\n * @member SpeechRecognitionCanceledEventArgs.prototype.errorDetails\r\n * @function\r\n * @public\r\n * @returns {string} A String that represents the error details.\r\n */\r\n public get errorDetails(): string {\r\n return this.privErrorDetails;\r\n }\r\n}\r\n\n\n\n// WEBPACK FOOTER //\n// ../src/sdk/SpeechRecognitionCanceledEventArgs.ts","//\r\n// copyright (c) Microsoft. All rights reserved.\r\n// See https://aka.ms/csspeech/license201809 for the full license information.\r\n//\r\nimport { RecognitionEventArgs, TranslationRecognitionResult } from \"./Exports\";\r\n\r\n/**\r\n * Translation text result event arguments.\r\n * @class TranslationRecognitionEventArgs\r\n */\r\nexport class TranslationRecognitionEventArgs extends RecognitionEventArgs {\r\n private privResult: TranslationRecognitionResult;\r\n\r\n /**\r\n * Creates and initializes an instance of this class.\r\n * @constructor\r\n * @param {TranslationRecognitionResult} result - The translation recognition result.\r\n * @param {number} offset - The offset.\r\n * @param {string} sessionId - The session id.\r\n */\r\n public constructor(result: TranslationRecognitionResult, offset?: number, sessionId?: string) {\r\n super(offset, sessionId);\r\n\r\n this.privResult = result;\r\n }\r\n\r\n /**\r\n * Specifies the recognition result.\r\n * @member TranslationRecognitionEventArgs.prototype.result\r\n * @function\r\n * @public\r\n * @returns {TranslationRecognitionResult} the recognition result.\r\n */\r\n public get result(): TranslationRecognitionResult {\r\n return this.privResult;\r\n }\r\n}\r\n\n\n\n// WEBPACK FOOTER //\n// ../src/sdk/TranslationRecognitionEventArgs.ts","//\r\n// copyright (c) Microsoft. All rights reserved.\r\n// See https://aka.ms/csspeech/license201809 for the full license information.\r\n//\r\nimport { SessionEventArgs, TranslationSynthesisResult } from \"./Exports\";\r\n\r\n/**\r\n * Translation Synthesis event arguments\r\n * @class TranslationSynthesisEventArgs\r\n */\r\nexport class TranslationSynthesisEventArgs extends SessionEventArgs {\r\n private privResult: TranslationSynthesisResult;\r\n\r\n /**\r\n * Creates and initializes an instance of this class.\r\n * @constructor\r\n * @param {TranslationSynthesisResult} result - The translation synthesis result.\r\n * @param {string} sessionId - The session id.\r\n */\r\n public constructor(result: TranslationSynthesisResult, sessionId?: string) {\r\n super(sessionId);\r\n\r\n this.privResult = result;\r\n }\r\n\r\n /**\r\n * Specifies the translation synthesis result.\r\n * @member TranslationSynthesisEventArgs.prototype.result\r\n * @function\r\n * @public\r\n * @returns {TranslationSynthesisResult} Specifies the translation synthesis result.\r\n */\r\n public get result(): TranslationSynthesisResult {\r\n return this.privResult;\r\n }\r\n}\r\n\n\n\n// WEBPACK FOOTER //\n// ../src/sdk/TranslationSynthesisEventArgs.ts","//\r\n// copyright (c) Microsoft. All rights reserved.\r\n// See https://aka.ms/csspeech/license201809 for the full license information.\r\n//\r\n\r\nimport { PropertyCollection, ResultReason, SpeechRecognitionResult, Translations } from \"./Exports\";\r\n\r\n/**\r\n * Translation text result.\r\n * @class TranslationRecognitionResult\r\n */\r\nexport class TranslationRecognitionResult extends SpeechRecognitionResult {\r\n private privTranslations: Translations;\r\n\r\n /**\r\n * Creates and initializes an instance of this class.\r\n * @constructor\r\n * @param {Translations} translations - The translations.\r\n * @param {string} resultId - The result id.\r\n * @param {ResultReason} reason - The reason.\r\n * @param {string} text - The recognized text.\r\n * @param {number} duration - The duration.\r\n * @param {number} offset - The offset into the stream.\r\n * @param {string} errorDetails - Error details, if provided.\r\n * @param {string} json - Additional Json, if provided.\r\n * @param {PropertyCollection} properties - Additional properties, if provided.\r\n */\r\n public constructor(translations: Translations, resultId?: string, reason?: ResultReason, text?: string, duration?: number, offset?: number, errorDetails?: string, json?: string, properties?: PropertyCollection) {\r\n super(resultId, reason, text, duration, offset, errorDetails, json, properties);\r\n\r\n this.privTranslations = translations;\r\n }\r\n\r\n /**\r\n * Presents the translation results. Each item in the dictionary represents a translation result in one of target languages, where the key\r\n * is the name of the target language, in BCP-47 format, and the value is the translation text in the specified language.\r\n * @member TranslationRecognitionResult.prototype.translations\r\n * @function\r\n * @public\r\n * @returns {Translations} the current translation map that holds all translations requested.\r\n */\r\n public get translations(): Translations {\r\n return this.privTranslations;\r\n }\r\n}\r\n\n\n\n// WEBPACK FOOTER //\n// ../src/sdk/TranslationRecognitionResult.ts","import { ResultReason } from \"./ResultReason\";\r\n\r\n//\r\n// copyright (c) Microsoft. All rights reserved.\r\n// See https://aka.ms/csspeech/license201809 for the full license information.\r\n//\r\n\r\n/**\r\n * Defines translation synthesis result, i.e. the voice output of the translated text in the target language.\r\n * @class TranslationSynthesisResult\r\n */\r\nexport class TranslationSynthesisResult {\r\n private privReason: ResultReason;\r\n private privAudio: ArrayBuffer;\r\n\r\n /**\r\n * Creates and initializes an instance of this class.\r\n * @constructor\r\n * @param {ResultReason} reason - The synthesis reason.\r\n * @param {ArrayBuffer} audio - The audio data.\r\n */\r\n constructor(reason: ResultReason, audio: ArrayBuffer) {\r\n this.privReason = reason;\r\n this.privAudio = audio;\r\n }\r\n\r\n /**\r\n * Translated text in the target language.\r\n * @member TranslationSynthesisResult.prototype.audio\r\n * @function\r\n * @public\r\n * @returns {ArrayBuffer} Translated audio in the target language.\r\n */\r\n public get audio(): ArrayBuffer {\r\n return this.privAudio;\r\n }\r\n\r\n /**\r\n * The synthesis status.\r\n * @member TranslationSynthesisResult.prototype.reason\r\n * @function\r\n * @public\r\n * @returns {ResultReason} The synthesis status.\r\n */\r\n public get reason(): ResultReason {\r\n return this.privReason;\r\n }\r\n}\r\n\n\n\n// WEBPACK FOOTER //\n// ../src/sdk/TranslationSynthesisResult.ts","//\r\n// Copyright (c) Microsoft. All rights reserved.\r\n// See https://aka.ms/csspeech/license201809 for the full license information.\r\n//\r\n\r\n/**\r\n * Defines the possible reasons a recognition result might be generated.\r\n * @class ResultReason\r\n */\r\nexport enum ResultReason {\r\n /**\r\n * Indicates speech could not be recognized. More details can be found in the NoMatchDetails object.\r\n * @member ResultReason.NoMatch\r\n */\r\n NoMatch,\r\n\r\n /**\r\n * Indicates that the recognition was canceled. More details can be found using the CancellationDetails object.\r\n * @member ResultReason.Canceled\r\n */\r\n Canceled,\r\n\r\n /**\r\n * Indicates the speech result contains hypothesis text.\r\n * @member ResultReason.RecognizedSpeech\r\n */\r\n RecognizingSpeech,\r\n\r\n /**\r\n * Indicates the speech result contains final text that has been recognized.\r\n * Speech Recognition is now complete for this phrase.\r\n * @member ResultReason.RecognizedSpeech\r\n */\r\n RecognizedSpeech,\r\n\r\n /**\r\n * Indicates the intent result contains hypothesis text and intent.\r\n * @member ResultReason.RecognizingIntent\r\n */\r\n RecognizingIntent,\r\n\r\n /**\r\n * Indicates the intent result contains final text and intent.\r\n * Speech Recognition and Intent determination are now complete for this phrase.\r\n * @member ResultReason.RecognizedIntent\r\n */\r\n RecognizedIntent,\r\n\r\n /**\r\n * Indicates the translation result contains hypothesis text and its translation(s).\r\n * @member ResultReason.TranslatingSpeech\r\n */\r\n TranslatingSpeech,\r\n\r\n /**\r\n * Indicates the translation result contains final text and corresponding translation(s).\r\n * Speech Recognition and Translation are now complete for this phrase.\r\n * @member ResultReason.TranslatedSpeech\r\n */\r\n TranslatedSpeech,\r\n\r\n /**\r\n * Indicates the synthesized audio result contains a non-zero amount of audio data\r\n * @member ResultReason.SynthesizingAudio\r\n */\r\n SynthesizingAudio,\r\n\r\n /**\r\n * Indicates the synthesized audio is now complete for this phrase.\r\n * @member ResultReason.SynthesizingAudioCompleted\r\n */\r\n SynthesizingAudioCompleted,\r\n}\r\n\n\n\n// WEBPACK FOOTER //\n// ../src/sdk/ResultReason.ts","//\r\n// copyright (c) Microsoft. All rights reserved.\r\n// See https://aka.ms/csspeech/license201809 for the full license information.\r\n//\r\n\r\nimport { OutputFormatPropertyName } from \"../common.speech/Exports\";\r\nimport { Contracts } from \"./Contracts\";\r\nimport {\r\n OutputFormat,\r\n PropertyCollection,\r\n PropertyId,\r\n} from \"./Exports\";\r\n\r\n/**\r\n * Speech configuration.\r\n * @class SpeechConfig\r\n */\r\nexport abstract class SpeechConfig {\r\n /**\r\n * Creates and initializes an instance.\r\n * @constructor\r\n */\r\n protected constructor() { }\r\n\r\n /**\r\n * Static instance of SpeechConfig returned by passing subscriptionKey and service region.\r\n * @member SpeechConfig.fromSubscription\r\n * @function\r\n * @public\r\n * @param {string} subscriptionKey - The subscription key.\r\n * @param {string} region - The region name (see the region page).\r\n * @returns {SpeechConfig} The speech factory\r\n */\r\n public static fromSubscription(subscriptionKey: string, region: string): SpeechConfig {\r\n Contracts.throwIfNullOrWhitespace(subscriptionKey, \"subscriptionKey\");\r\n Contracts.throwIfNullOrWhitespace(region, \"region\");\r\n\r\n const speechImpl: SpeechConfigImpl = new SpeechConfigImpl();\r\n speechImpl.setProperty(PropertyId.SpeechServiceConnection_Region, region);\r\n speechImpl.setProperty(PropertyId.SpeechServiceConnection_IntentRegion, region);\r\n speechImpl.setProperty(PropertyId.SpeechServiceConnection_Key, subscriptionKey);\r\n\r\n return speechImpl;\r\n }\r\n\r\n /**\r\n * Creates an instance of the speech factory with specified endpoint and subscription key.\r\n * This method is intended only for users who use a non-standard service endpoint or paramters.\r\n * the language setting in uri takes precedence, and the effective language is \"de-DE\".\r\n * @member SpeechConfig.fromEndpoint\r\n * @function\r\n * @public\r\n * @param {URL} endpoint - The service endpoint to connect to.\r\n * @param {string} subscriptionKey - The subscription key.\r\n * @returns {SpeechConfig} A speech factory instance.\r\n */\r\n public static fromEndpoint(endpoint: URL, subscriptionKey: string): SpeechConfig {\r\n Contracts.throwIfNull(endpoint, \"endpoint\");\r\n Contracts.throwIfNullOrWhitespace(subscriptionKey, \"subscriptionKey\");\r\n\r\n const speechImpl: SpeechConfigImpl = new SpeechConfigImpl();\r\n speechImpl.setProperty(PropertyId.SpeechServiceConnection_Endpoint, endpoint.href);\r\n speechImpl.setProperty(PropertyId.SpeechServiceConnection_Key, subscriptionKey);\r\n return speechImpl;\r\n }\r\n\r\n /**\r\n * Creates an instance of the speech factory with specified initial authorization token and region.\r\n * @member SpeechConfig.fromAuthorizationToken\r\n * @function\r\n * @public\r\n * @param {string} authorizationToken - The initial authorization token.\r\n * @param {string} region - The region name (see the region page).\r\n * @returns {SpeechConfig} A speech factory instance.\r\n */\r\n public static fromAuthorizationToken(authorizationToken: string, region: string): SpeechConfig {\r\n Contracts.throwIfNull(authorizationToken, \"authorizationToken\");\r\n Contracts.throwIfNullOrWhitespace(region, \"region\");\r\n\r\n const speechImpl: SpeechConfigImpl = new SpeechConfigImpl();\r\n speechImpl.setProperty(PropertyId.SpeechServiceConnection_Region, region);\r\n speechImpl.setProperty(PropertyId.SpeechServiceConnection_IntentRegion, region);\r\n speechImpl.authorizationToken = authorizationToken;\r\n return speechImpl;\r\n }\r\n\r\n /**\r\n * Returns the current authorization token.\r\n * @member SpeechConfig.prototype.authorizationToken\r\n * @function\r\n * @public\r\n */\r\n public abstract get authorizationToken(): string;\r\n\r\n /**\r\n * Sets the authorization token.\r\n * If this is set, subscription key is ignored.\r\n * User needs to make sure the provided authorization token is valid and not expired.\r\n * @member SpeechConfig.prototype.authorizationToken\r\n * @function\r\n * @public\r\n * @param {string} value - The authorization token.\r\n */\r\n public abstract set authorizationToken(value: string);\r\n\r\n /**\r\n * Returns the configured language.\r\n * @member SpeechConfig.prototype.speechRecognitionLanguage\r\n * @function\r\n * @public\r\n */\r\n public abstract get speechRecognitionLanguage(): string;\r\n\r\n /**\r\n * Sets the input language.\r\n * @member SpeechConfig.prototype.speechRecognitionLanguage\r\n * @function\r\n * @public\r\n * @param {string} value - The authorization token.\r\n */\r\n public abstract set speechRecognitionLanguage(value: string);\r\n\r\n /**\r\n * Sets an arbitrary property.\r\n * @member SpeechConfig.prototype.setProperty\r\n * @function\r\n * @public\r\n * @param {string} name - The name of the property to set.\r\n * @param {string} value - The new value of the property.\r\n */\r\n public abstract setProperty(name: string, value: string): void;\r\n\r\n /**\r\n * Returns the current value of an arbitrary property.\r\n * @member SpeechConfig.prototype.getProperty\r\n * @function\r\n * @public\r\n * @param {string} name - The name of the property to query.\r\n * @param {string} def - The value to return in case the property is not known.\r\n * @returns {string} The current value, or provided default, of the given property.\r\n */\r\n public abstract getProperty(name: string, def?: string): string;\r\n\r\n /**\r\n * Sets output format.\r\n * @member SpeechConfig.prototype.outputFormat\r\n * @function\r\n * @public\r\n */\r\n public abstract set outputFormat(format: OutputFormat);\r\n\r\n /**\r\n * Gets output format.\r\n * @member SpeechConfig.prototype.outputFormat\r\n * @function\r\n * @public\r\n * @returns {OutputFormat} Returns the output format.\r\n */\r\n public abstract get outputFormat(): OutputFormat;\r\n\r\n /**\r\n * Sets the endpoint ID of a customized speech model that is used for speech recognition.\r\n * @member SpeechConfig.prototype.endpointId\r\n * @function\r\n * @public\r\n * @param {string} value - The endpoint ID\r\n */\r\n public abstract set endpointId(value: string);\r\n\r\n /**\r\n * Gets the endpoint ID of a customized speech model that is used for speech recognition.\r\n * @member SpeechConfig.prototype.endpointId\r\n * @function\r\n * @public\r\n * @return {string} The endpoint ID\r\n */\r\n public abstract get endpointId(): string;\r\n\r\n /**\r\n * Closes the configuration.\r\n * @member SpeechConfig.prototype.close\r\n * @function\r\n * @public\r\n */\r\n /* tslint:disable:no-empty */\r\n public close(): void { }\r\n}\r\n\r\n/**\r\n * @private\r\n * @class SpeechConfigImpl\r\n */\r\n// tslint:disable-next-line:max-classes-per-file\r\nexport class SpeechConfigImpl extends SpeechConfig {\r\n\r\n private privProperties: PropertyCollection;\r\n\r\n public constructor() {\r\n super();\r\n this.privProperties = new PropertyCollection();\r\n this.speechRecognitionLanguage = \"en-US\"; // Should we have a default?\r\n this.outputFormat = OutputFormat.Simple;\r\n }\r\n\r\n public get properties(): PropertyCollection {\r\n return this.privProperties;\r\n }\r\n\r\n public get endPoint(): URL {\r\n return new URL(this.privProperties.getProperty(PropertyId.SpeechServiceConnection_Endpoint));\r\n }\r\n\r\n public get subscriptionKey(): string {\r\n return this.privProperties.getProperty(PropertyId.SpeechServiceConnection_Key);\r\n }\r\n\r\n public get region(): string {\r\n return this.privProperties.getProperty(PropertyId.SpeechServiceConnection_Region);\r\n }\r\n\r\n public get authorizationToken(): string {\r\n return this.privProperties.getProperty(PropertyId.SpeechServiceAuthorization_Token);\r\n }\r\n\r\n public set authorizationToken(value: string) {\r\n this.privProperties.setProperty(PropertyId.SpeechServiceAuthorization_Token, value);\r\n }\r\n\r\n public get speechRecognitionLanguage(): string {\r\n return this.privProperties.getProperty(PropertyId.SpeechServiceConnection_RecoLanguage);\r\n }\r\n\r\n public set speechRecognitionLanguage(value: string) {\r\n this.privProperties.setProperty(PropertyId.SpeechServiceConnection_RecoLanguage, value);\r\n }\r\n\r\n public get outputFormat(): OutputFormat {\r\n return (OutputFormat as any)[this.privProperties.getProperty(OutputFormatPropertyName, OutputFormat[OutputFormat.Simple])];\r\n }\r\n\r\n public set outputFormat(value: OutputFormat) {\r\n this.privProperties.setProperty(OutputFormatPropertyName, OutputFormat[value]);\r\n }\r\n\r\n public set endpointId(value: string) {\r\n this.privProperties.setProperty(PropertyId.SpeechServiceConnection_EndpointId, value);\r\n }\r\n\r\n public get endpointId(): string {\r\n return this.privProperties.getProperty(PropertyId.SpeechServiceConnection_EndpointId);\r\n }\r\n\r\n public setProperty(name: string | PropertyId, value: string): void {\r\n Contracts.throwIfNullOrWhitespace(value, \"value\");\r\n\r\n this.privProperties.setProperty(name, value);\r\n }\r\n\r\n public getProperty(name: string | PropertyId, def?: string): string {\r\n\r\n return this.privProperties.getProperty(name, def);\r\n }\r\n\r\n public clone(): SpeechConfigImpl {\r\n const ret: SpeechConfigImpl = new SpeechConfigImpl();\r\n ret.privProperties = this.privProperties.clone();\r\n return ret;\r\n }\r\n}\r\n\n\n\n// WEBPACK FOOTER //\n// ../src/sdk/SpeechConfig.ts","//\r\n// Copyright (c) Microsoft. All rights reserved.\r\n// See https://aka.ms/csspeech/license201809 for the full license information.\r\n//\r\nimport { ArgumentNullError, Promise, PromiseHelper } from \"../common/Exports\";\r\nimport { AuthInfo, IAuthentication } from \"./IAuthentication\";\r\n\r\nconst AuthHeader: string = \"Ocp-Apim-Subscription-Key\";\r\n\r\n/**\r\n * @class\r\n */\r\nexport class CognitiveSubscriptionKeyAuthentication implements IAuthentication {\r\n private authInfo: AuthInfo;\r\n\r\n /**\r\n * Creates and initializes an instance of the CognitiveSubscriptionKeyAuthentication class.\r\n * @constructor\r\n * @param {string} subscriptionKey - The subscription key\r\n */\r\n constructor(subscriptionKey: string) {\r\n if (!subscriptionKey) {\r\n throw new ArgumentNullError(\"subscriptionKey\");\r\n }\r\n\r\n this.authInfo = new AuthInfo(AuthHeader, subscriptionKey);\r\n }\r\n\r\n /**\r\n * Fetches the subscription key.\r\n * @member\r\n * @function\r\n * @public\r\n * @param {string} authFetchEventId - The id to fetch.\r\n */\r\n public Fetch = (authFetchEventId: string): Promise => {\r\n return PromiseHelper.FromResult(this.authInfo);\r\n }\r\n\r\n /**\r\n * Fetches the subscription key.\r\n * @member\r\n * @function\r\n * @public\r\n * @param {string} authFetchEventId - The id to fetch.\r\n */\r\n public FetchOnExpiry = (authFetchEventId: string): Promise => {\r\n return PromiseHelper.FromResult(this.authInfo);\r\n }\r\n}\r\n\n\n\n// WEBPACK FOOTER //\n// ../src/common.speech/CognitiveSubscriptionKeyAuthentication.ts","//\r\n// Copyright (c) Microsoft. All rights reserved.\r\n// See https://aka.ms/csspeech/license201809 for the full license information.\r\n//\r\nimport { ArgumentNullError, Promise, PromiseHelper } from \"../common/Exports\";\r\nimport { AuthInfo, IAuthentication } from \"./IAuthentication\";\r\n\r\nconst AuthHeader: string = \"Authorization\";\r\n\r\nexport class CognitiveTokenAuthentication implements IAuthentication {\r\n private fetchCallback: (authFetchEventId: string) => Promise;\r\n private fetchOnExpiryCallback: (authFetchEventId: string) => Promise;\r\n\r\n constructor(fetchCallback: (authFetchEventId: string) => Promise, fetchOnExpiryCallback: (authFetchEventId: string) => Promise) {\r\n if (!fetchCallback) {\r\n throw new ArgumentNullError(\"fetchCallback\");\r\n }\r\n\r\n if (!fetchOnExpiryCallback) {\r\n throw new ArgumentNullError(\"fetchOnExpiryCallback\");\r\n }\r\n\r\n this.fetchCallback = fetchCallback;\r\n this.fetchOnExpiryCallback = fetchOnExpiryCallback;\r\n }\r\n\r\n public Fetch = (authFetchEventId: string): Promise => {\r\n return this.fetchCallback(authFetchEventId).OnSuccessContinueWith((token: string) => new AuthInfo(AuthHeader, token));\r\n }\r\n\r\n public FetchOnExpiry = (authFetchEventId: string): Promise => {\r\n return this.fetchOnExpiryCallback(authFetchEventId).OnSuccessContinueWith((token: string) => new AuthInfo(AuthHeader, token));\r\n }\r\n}\r\n\n\n\n// WEBPACK FOOTER //\n// ../src/common.speech/CognitiveTokenAuthentication.ts","//\r\n// Copyright (c) Microsoft. All rights reserved.\r\n// See https://aka.ms/csspeech/license201809 for the full license information.\r\n//\r\nimport { WebsocketConnection } from \"../common.browser/Exports\";\r\nimport {\r\n IConnection,\r\n IStringDictionary,\r\n Promise,\r\n Storage,\r\n} from \"../common/Exports\";\r\nimport { PropertyId } from \"../sdk/Exports\";\r\nimport {\r\n AuthInfo,\r\n IAuthentication,\r\n IConnectionFactory,\r\n RecognizerConfig,\r\n SpeechResultFormat,\r\n WebsocketMessageFormatter,\r\n} from \"./Exports\";\r\n\r\nconst TestHooksParamName: string = \"testhooks\";\r\nconst ConnectionIdHeader: string = \"X-ConnectionId\";\r\n\r\nexport class IntentConnectionFactory implements IConnectionFactory {\r\n\r\n public Create = (\r\n config: RecognizerConfig,\r\n authInfo: AuthInfo,\r\n connectionId?: string): IConnection => {\r\n\r\n let endpoint: string = config.parameters.getProperty(PropertyId.SpeechServiceConnection_Endpoint);\r\n if (!endpoint) {\r\n const region: string = config.parameters.getProperty(PropertyId.SpeechServiceConnection_IntentRegion);\r\n\r\n endpoint = this.Host() + Storage.Local.GetOrAdd(\"TranslationRelativeUri\", \"/speech/\" + this.GetSpeechRegionFromIntentRegion(region) + \"/recognition/interactive/cognitiveservices/v1\");\r\n }\r\n\r\n const queryParams: IStringDictionary = {\r\n format: \"simple\",\r\n language: config.parameters.getProperty(PropertyId.SpeechServiceConnection_RecoLanguage),\r\n };\r\n\r\n if (this.IsDebugModeEnabled) {\r\n queryParams[TestHooksParamName] = \"1\";\r\n }\r\n\r\n const headers: IStringDictionary = {};\r\n headers[authInfo.HeaderName] = authInfo.Token;\r\n headers[ConnectionIdHeader] = connectionId;\r\n\r\n return new WebsocketConnection(endpoint, queryParams, headers, new WebsocketMessageFormatter(), connectionId);\r\n }\r\n\r\n private Host(): string {\r\n return Storage.Local.GetOrAdd(\"Host\", \"wss://speech.platform.bing.com\");\r\n }\r\n\r\n private get IsDebugModeEnabled(): boolean {\r\n const value = Storage.Local.GetOrAdd(\"IsDebugModeEnabled\", \"false\");\r\n return value.toLowerCase() === \"true\";\r\n }\r\n\r\n private GetSpeechRegionFromIntentRegion(intentRegion: string): string {\r\n switch (intentRegion) {\r\n case \"West US\":\r\n case \"US West\":\r\n case \"westus\":\r\n return \"uswest\";\r\n case \"West US 2\":\r\n case \"US West 2\":\r\n case \"westus2\":\r\n return \"uswest2\";\r\n case \"South Central US\":\r\n case \"US South Central\":\r\n case \"southcentralus\":\r\n return \"ussouthcentral\";\r\n case \"West Central US\":\r\n case \"US West Central\":\r\n case \"westcentralus\":\r\n return \"uswestcentral\";\r\n case \"East US\":\r\n case \"US East\":\r\n case \"eastus\":\r\n return \"useast\";\r\n case \"East US 2\":\r\n case \"US East 2\":\r\n case \"eastus2\":\r\n return \"useast2\";\r\n case \"West Europe\":\r\n case \"Europe West\":\r\n case \"westeurope\":\r\n return \"europewest\";\r\n case \"North Europe\":\r\n case \"Europe North\":\r\n case \"northeurope\":\r\n return \"europenorth\";\r\n case \"Brazil South\":\r\n case \"South Brazil\":\r\n case \"southbrazil\":\r\n return \"brazilsouth\";\r\n case \"Australia East\":\r\n case \"East Australia\":\r\n case \"eastaustralia\":\r\n return \"australiaeast\";\r\n case \"Southeast Asia\":\r\n case \"Asia Southeast\":\r\n case \"southeastasia\":\r\n return \"asiasoutheast\";\r\n case \"East Asia\":\r\n case \"Asia East\":\r\n case \"eastasia\":\r\n return \"asiaeast\";\r\n default:\r\n return intentRegion;\r\n }\r\n }\r\n}\r\n\n\n\n// WEBPACK FOOTER //\n// ../src/common.speech/IntentConnectionFactory.ts","//\r\n// Copyright (c) Microsoft. All rights reserved.\r\n// See https://aka.ms/csspeech/license201809 for the full license information.\r\n//\r\nimport {\r\n ArgumentNullError,\r\n ConnectionMessage,\r\n ConnectionOpenResponse,\r\n ConnectionState,\r\n CreateNoDashGuid,\r\n Deferred,\r\n IAudioSource,\r\n IAudioStreamNode,\r\n IConnection,\r\n IDisposable,\r\n IStreamChunk,\r\n MessageType,\r\n Promise,\r\n PromiseHelper,\r\n PromiseResult,\r\n} from \"../common/Exports\";\r\nimport { AudioStreamFormatImpl } from \"../sdk/Audio/AudioStreamFormat\";\r\nimport {\r\n RecognitionEventArgs,\r\n Recognizer,\r\n SessionEventArgs,\r\n SpeechRecognitionResult,\r\n} from \"../sdk/Exports\";\r\nimport {\r\n RequestSession,\r\n SpeechDetected,\r\n} from \"./Exports\";\r\nimport {\r\n AuthInfo,\r\n IAuthentication,\r\n} from \"./IAuthentication\";\r\nimport { IConnectionFactory } from \"./IConnectionFactory\";\r\nimport { RecognizerConfig } from \"./RecognizerConfig\";\r\nimport { SpeechConnectionMessage } from \"./SpeechConnectionMessage.Internal\";\r\n\r\nexport abstract class ServiceRecognizerBase implements IDisposable {\r\n private authentication: IAuthentication;\r\n private connectionFactory: IConnectionFactory;\r\n private connection: IConnection;\r\n private audioSource: IAudioSource;\r\n private speechConfigConnectionId: string;\r\n private connectionFetchPromise: Promise;\r\n private connectionId: string;\r\n private authFetchEventId: string;\r\n private isDisposed: boolean;\r\n private recognizer: Recognizer;\r\n\r\n protected recognizerConfig: RecognizerConfig;\r\n\r\n public constructor(\r\n authentication: IAuthentication,\r\n connectionFactory: IConnectionFactory,\r\n audioSource: IAudioSource,\r\n recognizerConfig: RecognizerConfig,\r\n recognizer: Recognizer) {\r\n\r\n if (!authentication) {\r\n throw new ArgumentNullError(\"authentication\");\r\n }\r\n\r\n if (!connectionFactory) {\r\n throw new ArgumentNullError(\"connectionFactory\");\r\n }\r\n\r\n if (!audioSource) {\r\n throw new ArgumentNullError(\"audioSource\");\r\n }\r\n\r\n if (!recognizerConfig) {\r\n throw new ArgumentNullError(\"recognizerConfig\");\r\n }\r\n\r\n this.authentication = authentication;\r\n this.connectionFactory = connectionFactory;\r\n this.audioSource = audioSource;\r\n this.recognizerConfig = recognizerConfig;\r\n this.isDisposed = false;\r\n this.recognizer = recognizer;\r\n }\r\n\r\n public get AudioSource(): IAudioSource {\r\n return this.audioSource;\r\n }\r\n\r\n public IsDisposed(): boolean {\r\n return this.isDisposed;\r\n }\r\n public Dispose(reason?: string): void {\r\n this.isDisposed = true;\r\n if (this.connection) {\r\n this.connection.Dispose(reason);\r\n this.connection = undefined;\r\n }\r\n }\r\n\r\n public Recognize(\r\n speechContextJson: string,\r\n successCallback: (e: SpeechRecognitionResult) => void,\r\n errorCallBack: (e: string) => void,\r\n ): Promise {\r\n\r\n const requestSession = new RequestSession(this.audioSource.Id());\r\n\r\n requestSession.ListenForServiceTelemetry(this.audioSource.Events);\r\n\r\n return this.audioSource\r\n .Attach(requestSession.AudioNodeId)\r\n .ContinueWithPromise((result: PromiseResult) => {\r\n if (result.IsError) {\r\n this.ErrorCallback(result.Error);\r\n throw new Error(result.Error);\r\n } else {\r\n requestSession.OnAudioSourceAttachCompleted(result.Result, false);\r\n }\r\n\r\n const audioNode = result.Result;\r\n\r\n return this.FetchConnection(requestSession)\r\n .On((connection: IConnection) => {\r\n const messageRetrievalPromise = this.ReceiveMessage(connection, requestSession, successCallback, errorCallBack);\r\n const messageSendPromise = this.SendSpeechConfig(requestSession.RequestId, connection, this.recognizerConfig.PlatformConfig.Serialize())\r\n .OnSuccessContinueWithPromise((_: boolean) => {\r\n return this.SendSpeechContext(requestSession.RequestId, connection, speechContextJson)\r\n .OnSuccessContinueWithPromise((_: boolean) => {\r\n return this.SendAudio(requestSession.RequestId, connection, audioNode, requestSession);\r\n });\r\n });\r\n\r\n const completionPromise = PromiseHelper.WhenAll([messageRetrievalPromise, messageSendPromise]);\r\n\r\n completionPromise.On((r: boolean) => {\r\n requestSession.Dispose();\r\n this.SendTelemetryData(requestSession.RequestId, connection, requestSession.GetTelemetry());\r\n }, (error: string) => {\r\n requestSession.Dispose(error);\r\n this.SendTelemetryData(requestSession.RequestId, connection, requestSession.GetTelemetry());\r\n });\r\n\r\n return completionPromise;\r\n }, (error: string) => {\r\n this.ConnectionError(requestSession.SessionId, requestSession.RequestId, error);\r\n }).OnSuccessContinueWithPromise(() => {\r\n return requestSession.CompletionPromise;\r\n });\r\n });\r\n }\r\n\r\n // Called when telemetry data is sent to the service.\r\n // Used for testing Telemetry capture.\r\n public static TelemetryData: (json: string) => void;\r\n\r\n protected abstract ConnectionError(sessionId: string, requestId: string, error: string): void;\r\n\r\n protected abstract ProcessTypeSpecificMessages(\r\n connectionMessage: SpeechConnectionMessage,\r\n requestSession: RequestSession,\r\n connection: IConnection,\r\n successCallback?: (e: SpeechRecognitionResult) => void,\r\n errorCallBack?: (e: string) => void): void;\r\n\r\n protected SendTelemetryData = (requestId: string, connection: IConnection, telemetryData: string) => {\r\n if (!!ServiceRecognizerBase.TelemetryData) {\r\n try {\r\n ServiceRecognizerBase.TelemetryData(telemetryData);\r\n /* tslint:disable:no-empty */\r\n } catch { }\r\n }\r\n\r\n return connection\r\n .Send(new SpeechConnectionMessage(\r\n MessageType.Text,\r\n \"telemetry\",\r\n requestId,\r\n \"application/json\",\r\n telemetryData));\r\n }\r\n\r\n private ErrorCallback(error: string): void {\r\n throw new Error(error);\r\n }\r\n\r\n private FetchConnection = (requestSession: RequestSession, isUnAuthorized: boolean = false): Promise => {\r\n if (this.connectionFetchPromise) {\r\n if (this.connectionFetchPromise.Result().IsError\r\n || this.connectionFetchPromise.Result().Result.State() === ConnectionState.Disconnected) {\r\n this.connectionId = null;\r\n this.connectionFetchPromise = null;\r\n return this.FetchConnection(requestSession);\r\n } else {\r\n requestSession.OnPreConnectionStart(this.authFetchEventId, this.connectionId);\r\n requestSession.OnConnectionEstablishCompleted(200);\r\n requestSession.ListenForServiceTelemetry(this.connectionFetchPromise.Result().Result.Events);\r\n return this.connectionFetchPromise;\r\n }\r\n }\r\n\r\n this.authFetchEventId = CreateNoDashGuid();\r\n this.connectionId = CreateNoDashGuid();\r\n\r\n requestSession.OnPreConnectionStart(this.authFetchEventId, this.connectionId);\r\n\r\n const authPromise = isUnAuthorized ? this.authentication.FetchOnExpiry(this.authFetchEventId) : this.authentication.Fetch(this.authFetchEventId);\r\n\r\n this.connectionFetchPromise = authPromise\r\n .ContinueWithPromise((result: PromiseResult) => {\r\n if (result.IsError) {\r\n requestSession.OnAuthCompleted(true, result.Error);\r\n throw new Error(result.Error);\r\n } else {\r\n requestSession.OnAuthCompleted(false);\r\n }\r\n\r\n if (this.connection) {\r\n this.connection.Dispose();\r\n this.connection = undefined;\r\n }\r\n\r\n this.connection = this.connectionFactory.Create(this.recognizerConfig, result.Result, this.connectionId);\r\n requestSession.ListenForServiceTelemetry(this.connection.Events);\r\n\r\n return this.connection.Open().OnSuccessContinueWithPromise((response: ConnectionOpenResponse) => {\r\n if (response.StatusCode === 200) {\r\n requestSession.OnConnectionEstablishCompleted(response.StatusCode);\r\n return PromiseHelper.FromResult(this.connection);\r\n } else if (response.StatusCode === 403 && !isUnAuthorized) {\r\n return this.FetchConnection(requestSession, true);\r\n } else {\r\n requestSession.OnConnectionEstablishCompleted(response.StatusCode, response.Reason);\r\n return PromiseHelper.FromError(`Unable to contact server. StatusCode: ${response.StatusCode}, Reason: ${response.Reason}`);\r\n }\r\n });\r\n });\r\n\r\n return this.connectionFetchPromise;\r\n }\r\n\r\n private ReceiveMessage = (\r\n connection: IConnection,\r\n requestSession: RequestSession,\r\n successCallback: (e: SpeechRecognitionResult) => void,\r\n errorCallBack: (e: string) => void,\r\n ): Promise => {\r\n return connection\r\n .Read()\r\n .OnSuccessContinueWithPromise((message: ConnectionMessage) => {\r\n // indicates we are draining the queue and it came with no message;\r\n if (!message) {\r\n return PromiseHelper.FromResult(true);\r\n }\r\n\r\n const connectionMessage = SpeechConnectionMessage.FromConnectionMessage(message);\r\n\r\n if (connectionMessage.RequestId.toLowerCase() === requestSession.RequestId.toLowerCase()) {\r\n switch (connectionMessage.Path.toLowerCase()) {\r\n case \"turn.start\":\r\n const sessionStartEventArgs: SessionEventArgs = new SessionEventArgs(requestSession.SessionId);\r\n\r\n if (!!this.recognizer.sessionStarted) {\r\n this.recognizer.sessionStarted(this.recognizer, sessionStartEventArgs);\r\n }\r\n break;\r\n case \"speech.startdetected\":\r\n const speechStartDetected: SpeechDetected = SpeechDetected.FromJSON(connectionMessage.TextBody);\r\n\r\n const speechStartEventArgs = new RecognitionEventArgs(speechStartDetected.Offset, requestSession.SessionId);\r\n\r\n if (!!this.recognizer.speechStartDetected) {\r\n this.recognizer.speechStartDetected(this.recognizer, speechStartEventArgs);\r\n }\r\n\r\n break;\r\n case \"speech.enddetected\":\r\n\r\n let json: string;\r\n\r\n if (connectionMessage.TextBody.length > 0) {\r\n json = connectionMessage.TextBody;\r\n } else {\r\n // If the request was empty, the JSON returned is empty.\r\n json = \"{ Offset: 0 }\";\r\n }\r\n\r\n const speechStopDetected: SpeechDetected = SpeechDetected.FromJSON(json);\r\n\r\n const speechStopEventArgs = new RecognitionEventArgs(speechStopDetected.Offset, requestSession.SessionId);\r\n\r\n if (!!this.recognizer.speechEndDetected) {\r\n this.recognizer.speechEndDetected(this.recognizer, speechStopEventArgs);\r\n }\r\n\r\n break;\r\n case \"turn.end\":\r\n const sessionStopEventArgs: SessionEventArgs = new SessionEventArgs(requestSession.SessionId);\r\n\r\n if (!!this.recognizer.sessionStopped) {\r\n this.recognizer.sessionStopped(this.recognizer, sessionStopEventArgs);\r\n }\r\n requestSession.OnServiceTurnEndResponse();\r\n return PromiseHelper.FromResult(true);\r\n default:\r\n this.ProcessTypeSpecificMessages(\r\n connectionMessage,\r\n requestSession,\r\n connection,\r\n successCallback,\r\n errorCallBack);\r\n }\r\n }\r\n\r\n return this.ReceiveMessage(connection, requestSession, successCallback, errorCallBack);\r\n });\r\n }\r\n\r\n private SendSpeechConfig = (requestId: string, connection: IConnection, speechConfigJson: string) => {\r\n if (speechConfigJson && this.connectionId !== this.speechConfigConnectionId) {\r\n this.speechConfigConnectionId = this.connectionId;\r\n return connection\r\n .Send(new SpeechConnectionMessage(\r\n MessageType.Text,\r\n \"speech.config\",\r\n requestId,\r\n \"application/json\",\r\n speechConfigJson));\r\n }\r\n\r\n return PromiseHelper.FromResult(true);\r\n }\r\n\r\n private SendSpeechContext = (requestId: string, connection: IConnection, speechContextJson: string) => {\r\n if (speechContextJson) {\r\n return connection\r\n .Send(new SpeechConnectionMessage(\r\n MessageType.Text,\r\n \"speech.context\",\r\n requestId,\r\n \"application/json\",\r\n speechContextJson));\r\n }\r\n return PromiseHelper.FromResult(true);\r\n }\r\n\r\n private SendAudio = (\r\n requestId: string,\r\n connection: IConnection,\r\n audioStreamNode: IAudioStreamNode,\r\n requestSession: RequestSession): Promise => {\r\n // NOTE: Home-baked promises crash ios safari during the invocation\r\n // of the error callback chain (looks like the recursion is way too deep, and\r\n // it blows up the stack). The following construct is a stop-gap that does not\r\n // bubble the error up the callback chain and hence circumvents this problem.\r\n // TODO: rewrite with ES6 promises.\r\n const deferred = new Deferred();\r\n\r\n // The time we last sent data to the service.\r\n let lastSendTime: number = 0;\r\n\r\n const audioFormat: AudioStreamFormatImpl = this.audioSource.Format as AudioStreamFormatImpl;\r\n\r\n const readAndUploadCycle = (_: boolean) => {\r\n // If speech is done, stop sending audio.\r\n if (!this.isDisposed && !requestSession.IsSpeechEnded && !requestSession.IsCompleted) {\r\n audioStreamNode.Read().On(\r\n (audioStreamChunk: IStreamChunk) => {\r\n // we have a new audio chunk to upload.\r\n if (requestSession.IsSpeechEnded) {\r\n // If service already recognized audio end then dont send any more audio\r\n deferred.Resolve(true);\r\n return;\r\n }\r\n\r\n const payload = (audioStreamChunk.IsEnd) ? null : audioStreamChunk.Buffer;\r\n const uploaded = connection.Send(\r\n new SpeechConnectionMessage(\r\n MessageType.Binary, \"audio\", requestId, null, payload));\r\n\r\n if (!audioStreamChunk.IsEnd) {\r\n\r\n // Caculate any delay to the audio stream needed. /2 to allow 2x real time transmit rate max.\r\n const minSendTime = ((payload.byteLength / audioFormat.avgBytesPerSec) / 2) * 1000;\r\n\r\n const delay: number = Math.max(0, (lastSendTime - Date.now() + minSendTime));\r\n\r\n uploaded.OnSuccessContinueWith((result: boolean) => {\r\n setTimeout(() => {\r\n lastSendTime = Date.now();\r\n readAndUploadCycle(result);\r\n }, delay);\r\n });\r\n } else {\r\n // the audio stream has been closed, no need to schedule next\r\n // read-upload cycle.\r\n deferred.Resolve(true);\r\n }\r\n },\r\n (error: string) => {\r\n if (requestSession.IsSpeechEnded) {\r\n // For whatever reason, Reject is used to remove queue subscribers inside\r\n // the Queue.DrainAndDispose invoked from DetachAudioNode down blow, which\r\n // means that sometimes things can be rejected in normal circumstances, without\r\n // any errors.\r\n deferred.Resolve(true); // TODO: remove the argument, it's is completely meaningless.\r\n } else {\r\n // Only reject, if there was a proper error.\r\n deferred.Reject(error);\r\n }\r\n });\r\n }\r\n };\r\n\r\n readAndUploadCycle(true);\r\n\r\n return deferred.Promise();\r\n }\r\n}\r\n\n\n\n// WEBPACK FOOTER //\n// ../src/common.speech/ServiceRecognizerBase.ts","//\r\n// Copyright (c) Microsoft. All rights reserved.\r\n// See https://aka.ms/csspeech/license201809 for the full license information.\r\n//\r\nimport {\r\n ArgumentNullError,\r\n ConnectionMessage,\r\n IStringDictionary,\r\n MessageType,\r\n} from \"../common/Exports\";\r\n\r\nconst PathHeaderName: string = \"path\";\r\nconst ContentTypeHeaderName: string = \"content-type\";\r\nconst RequestIdHeaderName: string = \"x-requestid\";\r\nconst RequestTimestampHeaderName: string = \"x-timestamp\";\r\n\r\nexport class SpeechConnectionMessage extends ConnectionMessage {\r\n\r\n private path: string;\r\n private requestId: string;\r\n private contentType: string;\r\n private additionalHeaders: IStringDictionary;\r\n\r\n public constructor(\r\n messageType: MessageType,\r\n path: string,\r\n requestId: string,\r\n contentType: string,\r\n body: any,\r\n additionalHeaders?: IStringDictionary,\r\n id?: string) {\r\n\r\n if (!path) {\r\n throw new ArgumentNullError(\"path\");\r\n }\r\n\r\n if (!requestId) {\r\n throw new ArgumentNullError(\"requestId\");\r\n }\r\n\r\n const headers: IStringDictionary = {};\r\n headers[PathHeaderName] = path;\r\n headers[RequestIdHeaderName] = requestId;\r\n headers[RequestTimestampHeaderName] = new Date().toISOString();\r\n if (contentType) {\r\n headers[ContentTypeHeaderName] = contentType;\r\n }\r\n\r\n if (additionalHeaders) {\r\n for (const headerName in additionalHeaders) {\r\n if (headerName) {\r\n headers[headerName] = additionalHeaders[headerName];\r\n }\r\n\r\n }\r\n }\r\n\r\n if (id) {\r\n super(messageType, body, headers, id);\r\n } else {\r\n super(messageType, body, headers);\r\n }\r\n\r\n this.path = path;\r\n this.requestId = requestId;\r\n this.contentType = contentType;\r\n this.additionalHeaders = additionalHeaders;\r\n }\r\n\r\n public get Path(): string {\r\n return this.path;\r\n }\r\n\r\n public get RequestId(): string {\r\n return this.requestId;\r\n }\r\n\r\n public get ContentType(): string {\r\n return this.contentType;\r\n }\r\n\r\n public get AdditionalHeaders(): IStringDictionary {\r\n return this.additionalHeaders;\r\n }\r\n\r\n public static FromConnectionMessage = (message: ConnectionMessage): SpeechConnectionMessage => {\r\n let path = null;\r\n let requestId = null;\r\n let contentType = null;\r\n let requestTimestamp = null;\r\n const additionalHeaders: IStringDictionary = {};\r\n\r\n if (message.Headers) {\r\n for (const headerName in message.Headers) {\r\n if (headerName) {\r\n if (headerName.toLowerCase() === PathHeaderName.toLowerCase()) {\r\n path = message.Headers[headerName];\r\n } else if (headerName.toLowerCase() === RequestIdHeaderName.toLowerCase()) {\r\n requestId = message.Headers[headerName];\r\n } else if (headerName.toLowerCase() === RequestTimestampHeaderName.toLowerCase()) {\r\n requestTimestamp = message.Headers[headerName];\r\n } else if (headerName.toLowerCase() === ContentTypeHeaderName.toLowerCase()) {\r\n contentType = message.Headers[headerName];\r\n } else {\r\n additionalHeaders[headerName] = message.Headers[headerName];\r\n }\r\n }\r\n }\r\n }\r\n\r\n return new SpeechConnectionMessage(\r\n message.MessageType,\r\n path,\r\n requestId,\r\n contentType,\r\n message.Body,\r\n additionalHeaders,\r\n message.Id);\r\n }\r\n}\r\n\n\n\n// WEBPACK FOOTER //\n// ../src/common.speech/SpeechConnectionMessage.Internal.ts","//\r\n// Copyright (c) Microsoft. All rights reserved.\r\n// See https://aka.ms/csspeech/license201809 for the full license information.\r\n//\r\nimport { PropertyCollection } from \"../sdk/Exports\";\r\n\r\nexport enum RecognitionMode {\r\n Interactive,\r\n Conversation,\r\n Dictation,\r\n}\r\n\r\nexport enum SpeechResultFormat {\r\n Simple,\r\n Detailed,\r\n}\r\n\r\nexport class RecognizerConfig {\r\n private recognitionMode: RecognitionMode = RecognitionMode.Interactive;\r\n private platformConfig: PlatformConfig;\r\n private recognitionActivityTimeout: number;\r\n private speechConfig: PropertyCollection;\r\n\r\n constructor(\r\n platformConfig: PlatformConfig,\r\n recognitionMode: RecognitionMode = RecognitionMode.Interactive,\r\n speechConfig: PropertyCollection) {\r\n this.platformConfig = platformConfig ? platformConfig : new PlatformConfig(new Context(null));\r\n this.recognitionMode = recognitionMode;\r\n this.recognitionActivityTimeout = recognitionMode === RecognitionMode.Interactive ? 8000 : 25000;\r\n this.speechConfig = speechConfig;\r\n }\r\n\r\n public get parameters(): PropertyCollection {\r\n return this.speechConfig;\r\n }\r\n\r\n public get RecognitionMode(): RecognitionMode {\r\n return this.recognitionMode;\r\n }\r\n\r\n public get PlatformConfig(): PlatformConfig {\r\n return this.platformConfig;\r\n }\r\n\r\n public get RecognitionActivityTimeout(): number {\r\n return this.recognitionActivityTimeout;\r\n }\r\n\r\n public get IsContinuousRecognition(): boolean {\r\n return this.recognitionMode !== RecognitionMode.Interactive;\r\n }\r\n}\r\n\r\n// tslint:disable-next-line:max-classes-per-file\r\nexport class PlatformConfig {\r\n private context: Context;\r\n\r\n constructor(context: Context) {\r\n this.context = context;\r\n }\r\n\r\n public Serialize = (): string => {\r\n return JSON.stringify(this, (key: any, value: any): any => {\r\n if (value && typeof value === \"object\") {\r\n const replacement: any = {};\r\n for (const k in value) {\r\n if (Object.hasOwnProperty.call(value, k)) {\r\n replacement[k && k.charAt(0).toLowerCase() + k.substring(1)] = value[k];\r\n }\r\n }\r\n return replacement;\r\n }\r\n return value;\r\n });\r\n }\r\n\r\n public get Context(): Context {\r\n return this.context;\r\n }\r\n\r\n}\r\n\r\n// tslint:disable-next-line:max-classes-per-file\r\nexport class Context {\r\n private system: System;\r\n private os: OS;\r\n\r\n constructor(os: OS) {\r\n this.system = new System();\r\n this.os = os;\r\n }\r\n\r\n public get System(): System {\r\n return this.system;\r\n }\r\n\r\n public get OS(): OS {\r\n return this.os;\r\n }\r\n}\r\n\r\n// tslint:disable-next-line:max-classes-per-file\r\nexport class System {\r\n private name: string;\r\n private version: string;\r\n private build: string;\r\n private lang: string;\r\n constructor() {\r\n // Note: below will be patched for official builds.\r\n const SPEECHSDK_CLIENTSDK_VERSION = \"1.1.0\";\r\n\r\n this.name = \"SpeechSDK\";\r\n this.version = SPEECHSDK_CLIENTSDK_VERSION;\r\n this.build = \"JavaScript\";\r\n this.lang = \"JavaScript\";\r\n }\r\n public get Version(): string {\r\n // Controlled by sdk\r\n return this.version;\r\n }\r\n public get Lang(): string {\r\n // Controlled by sdk\r\n return this.lang;\r\n }\r\n}\r\n\r\n// tslint:disable-next-line:max-classes-per-file\r\nexport class OS {\r\n\r\n private platform: string;\r\n private name: string;\r\n private version: string;\r\n\r\n constructor(platform: string, name: string, version: string) {\r\n this.platform = platform;\r\n this.name = name;\r\n this.version = version;\r\n }\r\n\r\n public get Platform(): string {\r\n return this.platform;\r\n }\r\n\r\n public get Name(): string {\r\n return this.name;\r\n }\r\n\r\n public get Version(): string {\r\n return this.version;\r\n }\r\n}\r\n\r\n// tslint:disable-next-line:max-classes-per-file\r\nexport class Device {\r\n\r\n private manufacturer: string;\r\n private model: string;\r\n private version: string;\r\n\r\n constructor(manufacturer: string, model: string, version: string) {\r\n this.manufacturer = manufacturer;\r\n this.model = model;\r\n this.version = version;\r\n }\r\n\r\n public get Manufacturer(): string {\r\n return this.manufacturer;\r\n }\r\n\r\n public get Model(): string {\r\n return this.model;\r\n }\r\n\r\n public get Version(): string {\r\n return this.version;\r\n }\r\n}\r\n\n\n\n// WEBPACK FOOTER //\n// ../src/common.speech/RecognizerConfig.ts","//\r\n// Copyright (c) Microsoft. All rights reserved.\r\n// See https://aka.ms/csspeech/license201809 for the full license information.\r\n//\r\nimport {\r\n ConnectionMessage,\r\n Deferred,\r\n IStringDictionary,\r\n IWebsocketMessageFormatter,\r\n MessageType,\r\n Promise,\r\n RawWebsocketMessage,\r\n} from \"../common/Exports\";\r\n\r\nconst CRLF: string = \"\\r\\n\";\r\n\r\nexport class WebsocketMessageFormatter implements IWebsocketMessageFormatter {\r\n\r\n public ToConnectionMessage = (message: RawWebsocketMessage): Promise => {\r\n const deferral = new Deferred();\r\n\r\n try {\r\n if (message.MessageType === MessageType.Text) {\r\n const textMessage: string = message.TextContent;\r\n let headers: IStringDictionary = {};\r\n let body: string = null;\r\n\r\n if (textMessage) {\r\n const headerBodySplit = textMessage.split(\"\\r\\n\\r\\n\");\r\n if (headerBodySplit && headerBodySplit.length > 0) {\r\n headers = this.ParseHeaders(headerBodySplit[0]);\r\n if (headerBodySplit.length > 1) {\r\n body = headerBodySplit[1];\r\n }\r\n }\r\n }\r\n\r\n deferral.Resolve(new ConnectionMessage(message.MessageType, body, headers, message.Id));\r\n } else if (message.MessageType === MessageType.Binary) {\r\n const binaryMessage: ArrayBuffer = message.BinaryContent;\r\n let headers: IStringDictionary = {};\r\n let body: ArrayBuffer = null;\r\n\r\n if (!binaryMessage || binaryMessage.byteLength < 2) {\r\n throw new Error(\"Invalid binary message format. Header length missing.\");\r\n }\r\n\r\n const dataView = new DataView(binaryMessage);\r\n const headerLength = dataView.getInt16(0);\r\n\r\n if (binaryMessage.byteLength < headerLength + 2) {\r\n throw new Error(\"Invalid binary message format. Header content missing.\");\r\n }\r\n\r\n let headersString = \"\";\r\n for (let i = 0; i < headerLength; i++) {\r\n headersString += String.fromCharCode((dataView).getInt8(i + 2));\r\n }\r\n\r\n headers = this.ParseHeaders(headersString);\r\n\r\n if (binaryMessage.byteLength > headerLength + 2) {\r\n body = binaryMessage.slice(2 + headerLength);\r\n }\r\n\r\n deferral.Resolve(new ConnectionMessage(message.MessageType, body, headers, message.Id));\r\n }\r\n } catch (e) {\r\n deferral.Reject(`Error formatting the message. Error: ${e}`);\r\n }\r\n\r\n return deferral.Promise();\r\n }\r\n\r\n public FromConnectionMessage = (message: ConnectionMessage): Promise => {\r\n const deferral = new Deferred();\r\n\r\n try {\r\n if (message.MessageType === MessageType.Text) {\r\n const payload = `${this.MakeHeaders(message)}${CRLF}${message.TextBody ? message.TextBody : \"\"}`;\r\n\r\n deferral.Resolve(new RawWebsocketMessage(MessageType.Text, payload, message.Id));\r\n\r\n } else if (message.MessageType === MessageType.Binary) {\r\n const headersString = this.MakeHeaders(message);\r\n const content = message.BinaryBody;\r\n\r\n const headerInt8Array = new Int8Array(this.StringToArrayBuffer(headersString));\r\n\r\n const payload = new ArrayBuffer(2 + headerInt8Array.byteLength + (content ? content.byteLength : 0));\r\n const dataView = new DataView(payload);\r\n\r\n dataView.setInt16(0, headerInt8Array.length);\r\n\r\n for (let i = 0; i < headerInt8Array.byteLength; i++) {\r\n dataView.setInt8(2 + i, headerInt8Array[i]);\r\n }\r\n\r\n if (content) {\r\n const bodyInt8Array = new Int8Array(content);\r\n for (let i = 0; i < bodyInt8Array.byteLength; i++) {\r\n dataView.setInt8(2 + headerInt8Array.byteLength + i, bodyInt8Array[i]);\r\n }\r\n }\r\n\r\n deferral.Resolve(new RawWebsocketMessage(MessageType.Binary, payload, message.Id));\r\n }\r\n } catch (e) {\r\n deferral.Reject(`Error formatting the message. ${e}`);\r\n }\r\n\r\n return deferral.Promise();\r\n }\r\n\r\n private MakeHeaders = (message: ConnectionMessage): string => {\r\n let headersString: string = \"\";\r\n\r\n if (message.Headers) {\r\n for (const header in message.Headers) {\r\n if (header) {\r\n headersString += `${header}: ${message.Headers[header]}${CRLF}`;\r\n }\r\n }\r\n }\r\n\r\n return headersString;\r\n }\r\n\r\n private ParseHeaders = (headersString: string): IStringDictionary => {\r\n const headers: IStringDictionary = {};\r\n\r\n if (headersString) {\r\n const headerMatches = headersString.match(/[^\\r\\n]+/g);\r\n if (headers) {\r\n for (const header of headerMatches) {\r\n if (header) {\r\n const separatorIndex = header.indexOf(\":\");\r\n const headerName = separatorIndex > 0 ? header.substr(0, separatorIndex).trim().toLowerCase() : header;\r\n const headerValue =\r\n separatorIndex > 0 && header.length > (separatorIndex + 1) ?\r\n header.substr(separatorIndex + 1).trim() :\r\n \"\";\r\n\r\n headers[headerName] = headerValue;\r\n }\r\n }\r\n }\r\n }\r\n\r\n return headers;\r\n }\r\n\r\n private StringToArrayBuffer = (str: string): ArrayBuffer => {\r\n const buffer = new ArrayBuffer(str.length);\r\n const view = new DataView(buffer);\r\n for (let i = 0; i < str.length; i++) {\r\n view.setUint8(i, str.charCodeAt(i));\r\n }\r\n return buffer;\r\n }\r\n}\r\n\n\n\n// WEBPACK FOOTER //\n// ../src/common.speech/WebsocketMessageFormatter.ts","//\r\n// Copyright (c) Microsoft. All rights reserved.\r\n// See https://aka.ms/csspeech/license201809 for the full license information.\r\n//\r\n\r\nexport class QueryParameterNames {\r\n public static get TestHooksParamName(): string {\r\n return \"testhooks\";\r\n }\r\n public static get ConnectionIdHeader(): string {\r\n return \"X-ConnectionId\";\r\n }\r\n public static get DeploymentIdParamName(): string {\r\n return \"cid\";\r\n }\r\n public static get FormatParamName(): string {\r\n return \"format\";\r\n }\r\n public static get LanguageParamName(): string {\r\n return \"language\";\r\n }\r\n public static get TranslationFromParamName(): string {\r\n return \"from\";\r\n }\r\n public static get TranslationToParamName(): string {\r\n return \"to\";\r\n }\r\n}\r\n\n\n\n// WEBPACK FOOTER //\n// ../src/common.speech/QueryParameterNames.ts","//\r\n// Copyright (c) Microsoft. All rights reserved.\r\n// See https://aka.ms/csspeech/license201809 for the full license information.\r\n//\r\nimport { WebsocketConnection } from \"../common.browser/Exports\";\r\nimport {\r\n IConnection,\r\n IStringDictionary,\r\n Storage,\r\n} from \"../common/Exports\";\r\nimport { PropertyId } from \"../sdk/Exports\";\r\nimport {\r\n AuthInfo,\r\n IConnectionFactory,\r\n RecognizerConfig,\r\n WebsocketMessageFormatter,\r\n} from \"./Exports\";\r\n\r\nconst TestHooksParamName: string = \"testhooks\";\r\nconst ConnectionIdHeader: string = \"X-ConnectionId\";\r\n\r\nexport class TranslationConnectionFactory implements IConnectionFactory {\r\n\r\n public Create = (\r\n config: RecognizerConfig,\r\n authInfo: AuthInfo,\r\n connectionId?: string): IConnection => {\r\n\r\n let endpoint: string = config.parameters.getProperty(PropertyId.SpeechServiceConnection_Endpoint, undefined);\r\n if (!endpoint) {\r\n const region: string = config.parameters.getProperty(PropertyId.SpeechServiceConnection_Region, undefined);\r\n\r\n endpoint = this.Host(region) + Storage.Local.GetOrAdd(\"TranslationRelativeUri\", \"/speech/translation/cognitiveservices/v1\");\r\n }\r\n\r\n const queryParams: IStringDictionary = {\r\n from: config.parameters.getProperty(PropertyId.SpeechServiceConnection_RecoLanguage),\r\n to: config.parameters.getProperty(PropertyId.SpeechServiceConnection_TranslationToLanguages),\r\n };\r\n\r\n if (this.IsDebugModeEnabled) {\r\n queryParams[TestHooksParamName] = \"1\";\r\n }\r\n\r\n const voiceName: string = \"voice\";\r\n const featureName: string = \"features\";\r\n\r\n if (config.parameters.getProperty(PropertyId.SpeechServiceConnection_TranslationVoice, undefined) !== undefined) {\r\n queryParams[voiceName] = config.parameters.getProperty(PropertyId.SpeechServiceConnection_TranslationVoice);\r\n queryParams[featureName] = \"texttospeech\";\r\n }\r\n\r\n const headers: IStringDictionary = {};\r\n headers[authInfo.HeaderName] = authInfo.Token;\r\n headers[ConnectionIdHeader] = connectionId;\r\n\r\n return new WebsocketConnection(endpoint, queryParams, headers, new WebsocketMessageFormatter(), connectionId);\r\n }\r\n\r\n private Host(region: string): string {\r\n return Storage.Local.GetOrAdd(\"Host\", \"wss://\" + region + \".s2s.speech.microsoft.com\");\r\n }\r\n\r\n private get IsDebugModeEnabled(): boolean {\r\n const value = Storage.Local.GetOrAdd(\"IsDebugModeEnabled\", \"false\");\r\n return value.toLowerCase() === \"true\";\r\n }\r\n}\r\n\n\n\n// WEBPACK FOOTER //\n// ../src/common.speech/TranslationConnectionFactory.ts","//\r\n// copyright (c) Microsoft. All rights reserved.\r\n// See https://aka.ms/csspeech/license201809 for the full license information.\r\n//\r\n\r\nimport {\r\n CancellationReason,\r\n ResultReason,\r\n} from \"../sdk/Exports\";\r\nimport {\r\n RecognitionStatus,\r\n} from \"./Exports\";\r\n\r\nexport class EnumTranslation {\r\n public static implTranslateRecognitionResult(recognitionStatus: RecognitionStatus): ResultReason {\r\n let reason = ResultReason.Canceled;\r\n switch (recognitionStatus) {\r\n case RecognitionStatus.Success:\r\n reason = ResultReason.RecognizedSpeech;\r\n break;\r\n case RecognitionStatus.NoMatch:\r\n case RecognitionStatus.InitialSilenceTimeout:\r\n case RecognitionStatus.BabbleTimeout:\r\n reason = ResultReason.NoMatch;\r\n break;\r\n case RecognitionStatus.EndOfDictation:\r\n case RecognitionStatus.Error:\r\n default:\r\n reason = ResultReason.Canceled;\r\n break;\r\n }\r\n\r\n return reason;\r\n }\r\n\r\n public static implTranslateCancelResult(recognitionStatus: RecognitionStatus): CancellationReason {\r\n let reason = CancellationReason.EndOfStream;\r\n switch (recognitionStatus) {\r\n case RecognitionStatus.Success:\r\n case RecognitionStatus.EndOfDictation:\r\n case RecognitionStatus.NoMatch:\r\n reason = CancellationReason.EndOfStream;\r\n break;\r\n case RecognitionStatus.InitialSilenceTimeout:\r\n case RecognitionStatus.BabbleTimeout:\r\n case RecognitionStatus.Error:\r\n default:\r\n reason = CancellationReason.Error;\r\n break;\r\n }\r\n return reason;\r\n }\r\n}\r\n\n\n\n// WEBPACK FOOTER //\n// ../src/common.speech/EnumTranslation.ts","//\r\n// Copyright (c) Microsoft. All rights reserved.\r\n// See https://aka.ms/csspeech/license201809 for the full license information.\r\n//\r\n\r\n/**\r\n * @class SynthesisStatus\r\n * @private\r\n */\r\nexport enum SynthesisStatus {\r\n /**\r\n * The response contains valid audio data.\r\n * @member SynthesisStatus.Success\r\n */\r\n Success,\r\n\r\n /**\r\n * Indicates the end of audio data. No valid audio data is included in the message.\r\n * @member SynthesisStatus.SynthesisEnd\r\n */\r\n SynthesisEnd,\r\n\r\n /**\r\n * Indicates an error occurred during synthesis data processing.\r\n * @member SynthesisStatus.Error\r\n */\r\n Error,\r\n}\r\n\r\nexport enum RecognitionStatus {\r\n Success,\r\n NoMatch,\r\n InitialSilenceTimeout,\r\n BabbleTimeout,\r\n Error,\r\n EndOfDictation,\r\n}\r\n\n\n\n// WEBPACK FOOTER //\n// ../src/common.speech/ServiceMessages/Enums.ts","//\r\n// Copyright (c) Microsoft. All rights reserved.\r\n// See https://aka.ms/csspeech/license201809 for the full license information.\r\n//\r\n\r\nimport { SynthesisStatus } from \"../Exports\";\r\n\r\n// translation.synthesis.end\r\nexport interface ITranslationSynthesisEnd {\r\n SynthesisStatus: SynthesisStatus;\r\n FailureReason: string;\r\n}\r\n\r\nexport class TranslationSynthesisEnd implements ITranslationSynthesisEnd {\r\n private obj: ITranslationSynthesisEnd;\r\n\r\n private constructor(json: string) {\r\n this.obj = JSON.parse(json);\r\n this.obj.SynthesisStatus = (SynthesisStatus as any)[this.obj.SynthesisStatus];\r\n }\r\n\r\n public static FromJSON(json: string): TranslationSynthesisEnd {\r\n return new TranslationSynthesisEnd(json);\r\n }\r\n\r\n public get SynthesisStatus(): SynthesisStatus {\r\n return this.obj.SynthesisStatus;\r\n }\r\n\r\n public get FailureReason(): string {\r\n return this.obj.FailureReason;\r\n }\r\n}\r\n\n\n\n// WEBPACK FOOTER //\n// ../src/common.speech/ServiceMessages/TranslationSynthesisEnd.ts","//\r\n// Copyright (c) Microsoft. All rights reserved.\r\n// See https://aka.ms/csspeech/license201809 for the full license information.\r\n//\r\n\r\nimport { ITranslations } from \"../Exports\";\r\nimport { TranslationStatus } from \"../TranslationStatus\";\r\n\r\n// translation.hypothesis\r\nexport interface ITranslationHypothesis {\r\n Duration: number;\r\n Offset: number;\r\n Text: string;\r\n Translation: ITranslations;\r\n}\r\n\r\nexport class TranslationHypothesis implements ITranslationHypothesis {\r\n private translationHypothesis: ITranslationHypothesis;\r\n\r\n private constructor(json: string) {\r\n this.translationHypothesis = JSON.parse(json);\r\n this.translationHypothesis.Translation.TranslationStatus = (TranslationStatus as any)[this.translationHypothesis.Translation.TranslationStatus];\r\n }\r\n\r\n public static FromJSON(json: string): TranslationHypothesis {\r\n return new TranslationHypothesis(json);\r\n }\r\n\r\n public get Duration(): number {\r\n return this.translationHypothesis.Duration;\r\n }\r\n\r\n public get Offset(): number {\r\n return this.translationHypothesis.Offset;\r\n }\r\n\r\n public get Text(): string {\r\n return this.translationHypothesis.Text;\r\n }\r\n\r\n public get Translation(): ITranslations {\r\n return this.translationHypothesis.Translation;\r\n }\r\n}\r\n\n\n\n// WEBPACK FOOTER //\n// ../src/common.speech/ServiceMessages/TranslationHypothesis.ts","//\r\n// Copyright (c) Microsoft. All rights reserved.\r\n// See https://aka.ms/csspeech/license201809 for the full license information.\r\n//\r\n\r\nimport {\r\n ITranslations,\r\n RecognitionStatus,\r\n} from \"../Exports\";\r\nimport { TranslationStatus } from \"../TranslationStatus\";\r\n\r\n// translation.phrase\r\nexport interface ITranslationPhrase {\r\n RecognitionStatus: RecognitionStatus;\r\n Offset: number;\r\n Duration: number;\r\n Text: string;\r\n Translation: ITranslations;\r\n}\r\n\r\nexport class TranslationPhrase implements ITranslationPhrase {\r\n private translationPhrase: ITranslationPhrase;\r\n\r\n private constructor(json: string) {\r\n this.translationPhrase = JSON.parse(json);\r\n this.translationPhrase.RecognitionStatus = (RecognitionStatus as any)[this.translationPhrase.RecognitionStatus];\r\n if (this.translationPhrase.Translation !== undefined) {\r\n this.translationPhrase.Translation.TranslationStatus = (TranslationStatus as any)[this.translationPhrase.Translation.TranslationStatus];\r\n }\r\n }\r\n\r\n public static FromJSON(json: string): TranslationPhrase {\r\n return new TranslationPhrase(json);\r\n }\r\n\r\n public get RecognitionStatus(): RecognitionStatus {\r\n return this.translationPhrase.RecognitionStatus;\r\n }\r\n public get Offset(): number {\r\n return this.translationPhrase.Offset;\r\n }\r\n public get Duration(): number {\r\n return this.translationPhrase.Duration;\r\n }\r\n public get Text(): string {\r\n return this.translationPhrase.Text;\r\n }\r\n public get Translation(): ITranslations {\r\n return this.translationPhrase.Translation;\r\n }\r\n}\r\n\n\n\n// WEBPACK FOOTER //\n// ../src/common.speech/ServiceMessages/TranslationPhrase.ts","//\r\n// Copyright (c) Microsoft. All rights reserved.\r\n// See https://aka.ms/csspeech/license201809 for the full license information.\r\n//\r\n\r\nimport {\r\n IAudioSource,\r\n IConnection,\r\n TranslationStatus,\r\n} from \"../common/Exports\";\r\nimport {\r\n CancellationErrorCode,\r\n CancellationReason,\r\n PropertyCollection,\r\n ResultReason,\r\n TranslationRecognitionCanceledEventArgs,\r\n TranslationRecognitionEventArgs,\r\n TranslationRecognitionResult,\r\n TranslationRecognizer,\r\n Translations,\r\n TranslationSynthesisEventArgs,\r\n TranslationSynthesisResult,\r\n} from \"../sdk/Exports\";\r\nimport {\r\n CancellationErrorCodePropertyName,\r\n EnumTranslation,\r\n RecognitionStatus,\r\n RequestSession,\r\n ServiceRecognizerBase,\r\n SynthesisStatus,\r\n TranslationHypothesis,\r\n TranslationPhrase,\r\n TranslationSynthesisEnd,\r\n} from \"./Exports\";\r\nimport {\r\n IAuthentication,\r\n} from \"./IAuthentication\";\r\nimport { IConnectionFactory } from \"./IConnectionFactory\";\r\nimport { RecognizerConfig } from \"./RecognizerConfig\";\r\nimport { SpeechConnectionMessage } from \"./SpeechConnectionMessage.Internal\";\r\n\r\n// tslint:disable-next-line:max-classes-per-file\r\nexport class TranslationServiceRecognizer extends ServiceRecognizerBase {\r\n private translationRecognizer: TranslationRecognizer;\r\n\r\n public constructor(\r\n authentication: IAuthentication,\r\n connectionFactory: IConnectionFactory,\r\n audioSource: IAudioSource,\r\n recognizerConfig: RecognizerConfig,\r\n translationRecognizer: TranslationRecognizer) {\r\n\r\n super(authentication, connectionFactory, audioSource, recognizerConfig, translationRecognizer);\r\n this.translationRecognizer = translationRecognizer;\r\n\r\n }\r\n\r\n protected ProcessTypeSpecificMessages(\r\n connectionMessage: SpeechConnectionMessage,\r\n requestSession: RequestSession,\r\n connection: IConnection,\r\n successCallback?: (e: TranslationRecognitionResult) => void,\r\n errorCallBack?: (e: string) => void): void {\r\n\r\n switch (connectionMessage.Path.toLowerCase()) {\r\n case \"translation.hypothesis\":\r\n\r\n const result: TranslationRecognitionEventArgs = this.FireEventForResult(TranslationHypothesis.FromJSON(connectionMessage.TextBody), requestSession);\r\n\r\n if (!!this.translationRecognizer.recognizing) {\r\n try {\r\n this.translationRecognizer.recognizing(this.translationRecognizer, result);\r\n /* tslint:disable:no-empty */\r\n } catch (error) {\r\n // Not going to let errors in the event handler\r\n // trip things up.\r\n }\r\n }\r\n\r\n break;\r\n case \"translation.phrase\":\r\n if (this.recognizerConfig.IsContinuousRecognition) {\r\n // For continuous recognition telemetry has to be sent for every phrase as per spec.\r\n this.SendTelemetryData(requestSession.RequestId, connection, requestSession.GetTelemetry());\r\n }\r\n\r\n const translatedPhrase: TranslationPhrase = TranslationPhrase.FromJSON(connectionMessage.TextBody);\r\n\r\n if (translatedPhrase.RecognitionStatus === RecognitionStatus.Success) {\r\n // OK, the recognition was successful. How'd the translation do?\r\n const result: TranslationRecognitionEventArgs = this.FireEventForResult(translatedPhrase, requestSession);\r\n if (!!this.translationRecognizer.recognized) {\r\n try {\r\n this.translationRecognizer.recognized(this.translationRecognizer, result);\r\n /* tslint:disable:no-empty */\r\n } catch (error) {\r\n // Not going to let errors in the event handler\r\n // trip things up.\r\n }\r\n }\r\n\r\n // report result to promise.\r\n if (!!successCallback) {\r\n try {\r\n successCallback(result.result);\r\n } catch (e) {\r\n if (!!errorCallBack) {\r\n errorCallBack(e);\r\n }\r\n }\r\n // Only invoke the call back once.\r\n // and if it's successful don't invoke the\r\n // error after that.\r\n successCallback = undefined;\r\n errorCallBack = undefined;\r\n }\r\n\r\n break;\r\n } else {\r\n const reason: ResultReason = EnumTranslation.implTranslateRecognitionResult(translatedPhrase.RecognitionStatus);\r\n\r\n const result = new TranslationRecognitionResult(\r\n undefined,\r\n requestSession.RequestId,\r\n reason,\r\n translatedPhrase.Text,\r\n translatedPhrase.Duration,\r\n translatedPhrase.Offset,\r\n undefined,\r\n connectionMessage.TextBody,\r\n undefined);\r\n\r\n if (reason === ResultReason.Canceled) {\r\n const cancelReason: CancellationReason = EnumTranslation.implTranslateCancelResult(translatedPhrase.RecognitionStatus);\r\n\r\n const ev = new TranslationRecognitionCanceledEventArgs(\r\n requestSession.SessionId,\r\n cancelReason,\r\n null,\r\n cancelReason === CancellationReason.Error ? CancellationErrorCode.ServiceError : CancellationErrorCode.NoError,\r\n result);\r\n\r\n if (!!this.translationRecognizer.canceled) {\r\n try {\r\n this.translationRecognizer.canceled(this.translationRecognizer, ev);\r\n /* tslint:disable:no-empty */\r\n } catch (error) {\r\n // Not going to let errors in the event handler\r\n // trip things up.\r\n }\r\n }\r\n } else {\r\n const ev = new TranslationRecognitionEventArgs(result, 0/*offset*/, requestSession.SessionId);\r\n\r\n if (!!this.translationRecognizer.recognized) {\r\n try {\r\n this.translationRecognizer.recognized(this.translationRecognizer, ev);\r\n /* tslint:disable:no-empty */\r\n } catch (error) {\r\n // Not going to let errors in the event handler\r\n // trip things up.\r\n }\r\n }\r\n }\r\n\r\n // report result to promise.\r\n if (!!successCallback) {\r\n try {\r\n successCallback(result);\r\n } catch (e) {\r\n if (!!errorCallBack) {\r\n errorCallBack(e);\r\n }\r\n }\r\n // Only invoke the call back once.\r\n // and if it's successful don't invoke the\r\n // error after that.\r\n successCallback = undefined;\r\n errorCallBack = undefined;\r\n }\r\n }\r\n break;\r\n\r\n case \"translation.synthesis\":\r\n this.sendSynthesisAudio(connectionMessage.BinaryBody, requestSession.SessionId);\r\n break;\r\n\r\n case \"translation.synthesis.end\":\r\n const synthEnd: TranslationSynthesisEnd = TranslationSynthesisEnd.FromJSON(connectionMessage.TextBody);\r\n\r\n switch (synthEnd.SynthesisStatus) {\r\n case SynthesisStatus.Error:\r\n if (!!this.translationRecognizer.synthesizing) {\r\n const result = new TranslationSynthesisResult(ResultReason.Canceled, undefined);\r\n const retEvent: TranslationSynthesisEventArgs = new TranslationSynthesisEventArgs(result, requestSession.SessionId);\r\n\r\n try {\r\n this.translationRecognizer.synthesizing(this.translationRecognizer, retEvent);\r\n /* tslint:disable:no-empty */\r\n } catch (error) {\r\n // Not going to let errors in the event handler\r\n // trip things up.\r\n }\r\n }\r\n\r\n if (!!this.translationRecognizer.canceled) {\r\n // And raise a canceled event to send the rich(er) error message back.\r\n const canceledResult: TranslationRecognitionCanceledEventArgs = new TranslationRecognitionCanceledEventArgs(\r\n requestSession.SessionId,\r\n CancellationReason.Error,\r\n synthEnd.FailureReason,\r\n CancellationErrorCode.ServiceError,\r\n null);\r\n\r\n try {\r\n this.translationRecognizer.canceled(this.translationRecognizer, canceledResult);\r\n /* tslint:disable:no-empty */\r\n } catch (error) {\r\n // Not going to let errors in the event handler\r\n // trip things up.\r\n }\r\n }\r\n break;\r\n case SynthesisStatus.Success:\r\n this.sendSynthesisAudio(undefined, requestSession.SessionId);\r\n break;\r\n default:\r\n break;\r\n }\r\n break;\r\n default:\r\n break;\r\n }\r\n }\r\n\r\n protected ConnectionError(sessionId: string, requestId: string, error: string): void {\r\n if (!!this.translationRecognizer.canceled) {\r\n const properties: PropertyCollection = new PropertyCollection();\r\n properties.setProperty(CancellationErrorCodePropertyName, CancellationErrorCode[CancellationErrorCode.ConnectionFailure]);\r\n\r\n const result: TranslationRecognitionResult = new TranslationRecognitionResult(\r\n undefined,\r\n requestId,\r\n ResultReason.Canceled,\r\n undefined,\r\n undefined,\r\n undefined,\r\n error,\r\n undefined,\r\n properties);\r\n\r\n const cancelEvent: TranslationRecognitionCanceledEventArgs = new TranslationRecognitionCanceledEventArgs(\r\n sessionId,\r\n CancellationReason.Error,\r\n error,\r\n CancellationErrorCode.ConnectionFailure,\r\n result,\r\n );\r\n try {\r\n this.translationRecognizer.canceled(this.translationRecognizer, cancelEvent);\r\n /* tslint:disable:no-empty */\r\n } catch { }\r\n }\r\n\r\n }\r\n\r\n private FireEventForResult(serviceResult: TranslationHypothesis | TranslationPhrase, requestSession: RequestSession): TranslationRecognitionEventArgs {\r\n let translations: Translations;\r\n\r\n if (undefined !== serviceResult.Translation.Translations) {\r\n translations = new Translations();\r\n for (const translation of serviceResult.Translation.Translations) {\r\n translations.set(translation.Language, translation.Text);\r\n }\r\n }\r\n\r\n let resultReason: ResultReason;\r\n if (serviceResult instanceof TranslationPhrase) {\r\n if (serviceResult.Translation.TranslationStatus === TranslationStatus.Success) {\r\n resultReason = ResultReason.TranslatedSpeech;\r\n } else {\r\n resultReason = ResultReason.RecognizedSpeech;\r\n }\r\n } else {\r\n resultReason = ResultReason.TranslatingSpeech;\r\n }\r\n\r\n const result = new TranslationRecognitionResult(\r\n translations,\r\n requestSession.RequestId,\r\n resultReason,\r\n serviceResult.Text,\r\n serviceResult.Duration,\r\n serviceResult.Offset,\r\n serviceResult.Translation.FailureReason,\r\n JSON.stringify(serviceResult),\r\n undefined);\r\n\r\n const ev = new TranslationRecognitionEventArgs(result, serviceResult.Offset, requestSession.SessionId);\r\n return ev;\r\n }\r\n\r\n private sendSynthesisAudio(audio: ArrayBuffer, sessionId: string): void {\r\n const reason = (undefined === audio) ? ResultReason.SynthesizingAudioCompleted : ResultReason.SynthesizingAudio;\r\n const result = new TranslationSynthesisResult(reason, audio);\r\n const retEvent: TranslationSynthesisEventArgs = new TranslationSynthesisEventArgs(result, sessionId);\r\n\r\n if (!!this.translationRecognizer.synthesizing) {\r\n try {\r\n this.translationRecognizer.synthesizing(this.translationRecognizer, retEvent);\r\n /* tslint:disable:no-empty */\r\n } catch (error) {\r\n // Not going to let errors in the event handler\r\n // trip things up.\r\n }\r\n }\r\n\r\n }\r\n}\r\n\n\n\n// WEBPACK FOOTER //\n// ../src/common.speech/TranslationServiceRecognizer.ts","//\r\n// Copyright (c) Microsoft. All rights reserved.\r\n// See https://aka.ms/csspeech/license201809 for the full license information.\r\n//\r\n\r\n// speech.endDetected\r\nexport interface ISpeechDetected {\r\n Offset: number;\r\n}\r\n\r\nexport class SpeechDetected implements ISpeechDetected {\r\n private speechStartDetected: ISpeechDetected;\r\n private constructor(json: string) {\r\n this.speechStartDetected = JSON.parse(json);\r\n }\r\n\r\n public static FromJSON(json: string): SpeechDetected {\r\n return new SpeechDetected(json);\r\n }\r\n\r\n public get Offset(): number {\r\n return this.speechStartDetected.Offset;\r\n }\r\n}\r\n\n\n\n// WEBPACK FOOTER //\n// ../src/common.speech/ServiceMessages/SpeechDetected.ts","//\r\n// Copyright (c) Microsoft. All rights reserved.\r\n// See https://aka.ms/csspeech/license201809 for the full license information.\r\n//\r\n\r\n// speech.hypothesis\r\nexport interface ISpeechHypothesis {\r\n Text: string;\r\n Offset: number;\r\n Duration: number;\r\n}\r\n\r\nexport class SpeechHypothesis implements ISpeechHypothesis {\r\n private speechHypothesis: ISpeechHypothesis;\r\n private constructor(json: string) {\r\n this.speechHypothesis = JSON.parse(json);\r\n }\r\n\r\n public static FromJSON(json: string): SpeechHypothesis {\r\n return new SpeechHypothesis(json);\r\n }\r\n public get Text(): string {\r\n return this.speechHypothesis.Text;\r\n }\r\n public get Offset(): number {\r\n return this.speechHypothesis.Offset;\r\n }\r\n public get Duration(): number {\r\n return this.speechHypothesis.Duration;\r\n }\r\n}\r\n\n\n\n// WEBPACK FOOTER //\n// ../src/common.speech/ServiceMessages/SpeechHypothesis.ts","//\r\n// Copyright (c) Microsoft. All rights reserved.\r\n// See https://aka.ms/csspeech/license201809 for the full license information.\r\n//\r\nimport {\r\n IAudioSource,\r\n IConnection,\r\n} from \"../common/Exports\";\r\nimport {\r\n CancellationErrorCode,\r\n CancellationReason,\r\n OutputFormat,\r\n PropertyCollection,\r\n ResultReason,\r\n SpeechRecognitionCanceledEventArgs,\r\n SpeechRecognitionEventArgs,\r\n SpeechRecognitionResult,\r\n SpeechRecognizer,\r\n} from \"../sdk/Exports\";\r\nimport {\r\n CancellationErrorCodePropertyName,\r\n DetailedSpeechPhrase,\r\n EnumTranslation,\r\n OutputFormatPropertyName,\r\n RecognitionStatus,\r\n RequestSession,\r\n ServiceRecognizerBase,\r\n SimpleSpeechPhrase,\r\n SpeechHypothesis,\r\n} from \"./Exports\";\r\nimport {\r\n IAuthentication,\r\n} from \"./IAuthentication\";\r\nimport { IConnectionFactory } from \"./IConnectionFactory\";\r\nimport { RecognizerConfig } from \"./RecognizerConfig\";\r\nimport { SpeechConnectionMessage } from \"./SpeechConnectionMessage.Internal\";\r\n\r\n// tslint:disable-next-line:max-classes-per-file\r\nexport class SpeechServiceRecognizer extends ServiceRecognizerBase {\r\n\r\n private speechRecognizer: SpeechRecognizer;\r\n\r\n public constructor(\r\n authentication: IAuthentication,\r\n connectionFactory: IConnectionFactory,\r\n audioSource: IAudioSource,\r\n recognizerConfig: RecognizerConfig,\r\n speechRecognizer: SpeechRecognizer) {\r\n super(authentication, connectionFactory, audioSource, recognizerConfig, speechRecognizer);\r\n this.speechRecognizer = speechRecognizer;\r\n }\r\n\r\n protected ProcessTypeSpecificMessages(\r\n connectionMessage: SpeechConnectionMessage,\r\n requestSession: RequestSession,\r\n connection: IConnection,\r\n successCallback?: (e: SpeechRecognitionResult) => void,\r\n errorCallBack?: (e: string) => void): void {\r\n\r\n let result: SpeechRecognitionResult;\r\n\r\n switch (connectionMessage.Path.toLowerCase()) {\r\n case \"speech.hypothesis\":\r\n const hypothesis: SpeechHypothesis = SpeechHypothesis.FromJSON(connectionMessage.TextBody);\r\n\r\n result = new SpeechRecognitionResult(\r\n requestSession.RequestId,\r\n ResultReason.RecognizingSpeech,\r\n hypothesis.Text,\r\n hypothesis.Duration,\r\n hypothesis.Offset,\r\n undefined,\r\n connectionMessage.TextBody,\r\n undefined);\r\n\r\n const ev = new SpeechRecognitionEventArgs(result, hypothesis.Duration, requestSession.SessionId);\r\n\r\n if (!!this.speechRecognizer.recognizing) {\r\n try {\r\n this.speechRecognizer.recognizing(this.speechRecognizer, ev);\r\n /* tslint:disable:no-empty */\r\n } catch (error) {\r\n // Not going to let errors in the event handler\r\n // trip things up.\r\n }\r\n }\r\n break;\r\n case \"speech.phrase\":\r\n if (this.recognizerConfig.IsContinuousRecognition) {\r\n // For continuous recognition telemetry has to be sent for every phrase as per spec.\r\n this.SendTelemetryData(requestSession.RequestId, connection, requestSession.GetTelemetry());\r\n }\r\n\r\n const simple: SimpleSpeechPhrase = SimpleSpeechPhrase.FromJSON(connectionMessage.TextBody);\r\n const resultReason: ResultReason = EnumTranslation.implTranslateRecognitionResult(simple.RecognitionStatus);\r\n\r\n if (ResultReason.Canceled === resultReason) {\r\n result = new SpeechRecognitionResult(\r\n requestSession.RequestId,\r\n resultReason,\r\n undefined,\r\n undefined,\r\n undefined,\r\n undefined,\r\n connectionMessage.TextBody,\r\n undefined);\r\n\r\n if (!!this.speechRecognizer.canceled) {\r\n const cancelEvent: SpeechRecognitionCanceledEventArgs = new SpeechRecognitionCanceledEventArgs(\r\n EnumTranslation.implTranslateCancelResult(simple.RecognitionStatus),\r\n undefined,\r\n undefined,\r\n EnumTranslation.implTranslateCancelResult(simple.RecognitionStatus) === CancellationReason.Error ? CancellationErrorCode.ServiceError : CancellationErrorCode.NoError,\r\n requestSession.SessionId);\r\n try {\r\n this.speechRecognizer.canceled(this.speechRecognizer, cancelEvent);\r\n /* tslint:disable:no-empty */\r\n } catch { }\r\n }\r\n } else {\r\n if (this.recognizerConfig.parameters.getProperty(OutputFormatPropertyName) === OutputFormat[OutputFormat.Simple]) {\r\n result = new SpeechRecognitionResult(\r\n requestSession.RequestId,\r\n EnumTranslation.implTranslateRecognitionResult(simple.RecognitionStatus),\r\n simple.DisplayText,\r\n simple.Duration,\r\n simple.Offset,\r\n undefined,\r\n connectionMessage.TextBody,\r\n undefined);\r\n } else {\r\n const detailed: DetailedSpeechPhrase = DetailedSpeechPhrase.FromJSON(connectionMessage.TextBody);\r\n\r\n result = new SpeechRecognitionResult(\r\n requestSession.RequestId,\r\n EnumTranslation.implTranslateRecognitionResult(detailed.RecognitionStatus),\r\n detailed.RecognitionStatus === RecognitionStatus.Success ? detailed.NBest[0].Display : undefined,\r\n detailed.Duration,\r\n detailed.Offset,\r\n undefined,\r\n connectionMessage.TextBody,\r\n undefined);\r\n }\r\n\r\n const event: SpeechRecognitionEventArgs = new SpeechRecognitionEventArgs(result, result.offset, requestSession.SessionId);\r\n\r\n if (!!this.speechRecognizer.recognized) {\r\n try {\r\n this.speechRecognizer.recognized(this.speechRecognizer, event);\r\n /* tslint:disable:no-empty */\r\n } catch (error) {\r\n // Not going to let errors in the event handler\r\n // trip things up.\r\n }\r\n }\r\n }\r\n\r\n // report result to promise.\r\n if (!!successCallback) {\r\n try {\r\n successCallback(result);\r\n } catch (e) {\r\n if (!!errorCallBack) {\r\n errorCallBack(e);\r\n }\r\n }\r\n // Only invoke the call back once.\r\n // and if it's successful don't invoke the\r\n // error after that.\r\n successCallback = undefined;\r\n errorCallBack = undefined;\r\n }\r\n\r\n break;\r\n default:\r\n break;\r\n }\r\n }\r\n\r\n protected ConnectionError(sessionId: string, requestId: string, error: string): void {\r\n if (!!this.speechRecognizer.canceled) {\r\n const properties: PropertyCollection = new PropertyCollection();\r\n properties.setProperty(CancellationErrorCodePropertyName, CancellationErrorCode[CancellationErrorCode.ConnectionFailure]);\r\n\r\n const cancelEvent: SpeechRecognitionCanceledEventArgs = new SpeechRecognitionCanceledEventArgs(\r\n CancellationReason.Error,\r\n error,\r\n CancellationErrorCode.ConnectionFailure,\r\n undefined,\r\n sessionId);\r\n try {\r\n this.speechRecognizer.canceled(this.speechRecognizer, cancelEvent);\r\n /* tslint:disable:no-empty */\r\n } catch { }\r\n }\r\n\r\n }\r\n}\r\n\n\n\n// WEBPACK FOOTER //\n// ../src/common.speech/SpeechServiceRecognizer.ts","//\r\n// Copyright (c) Microsoft. All rights reserved.\r\n// See https://aka.ms/csspeech/license201809 for the full license information.\r\n//\r\n\r\nimport {\r\n RecognitionStatus,\r\n} from \"../Exports\";\r\n\r\n// speech.phrase for detailed\r\nexport interface IDetailedSpeechPhrase {\r\n RecognitionStatus: RecognitionStatus;\r\n NBest: IPhrase[];\r\n Duration?: number;\r\n Offset?: number;\r\n}\r\n\r\nexport interface IPhrase {\r\n Confidence?: number;\r\n Lexical: string;\r\n ITN: string;\r\n MaskedITN: string;\r\n Display: string;\r\n}\r\n\r\nexport class DetailedSpeechPhrase implements IDetailedSpeechPhrase {\r\n private detailedSpeechPhrase: IDetailedSpeechPhrase;\r\n private constructor(json: string) {\r\n this.detailedSpeechPhrase = JSON.parse(json);\r\n this.detailedSpeechPhrase.RecognitionStatus = (RecognitionStatus as any)[this.detailedSpeechPhrase.RecognitionStatus];\r\n }\r\n\r\n public static FromJSON(json: string): DetailedSpeechPhrase {\r\n return new DetailedSpeechPhrase(json);\r\n }\r\n\r\n public get RecognitionStatus(): RecognitionStatus {\r\n return this.detailedSpeechPhrase.RecognitionStatus;\r\n }\r\n public get NBest(): IPhrase[] {\r\n return this.detailedSpeechPhrase.NBest;\r\n }\r\n public get Duration(): number {\r\n return this.detailedSpeechPhrase.Duration;\r\n }\r\n public get Offset(): number {\r\n return this.detailedSpeechPhrase.Offset;\r\n }\r\n}\r\n\n\n\n// WEBPACK FOOTER //\n// ../src/common.speech/ServiceMessages/DetailedSpeechPhrase.ts","//\r\n// Copyright (c) Microsoft. All rights reserved.\r\n// See https://aka.ms/csspeech/license201809 for the full license information.\r\n//\r\n\r\nimport {\r\n RecognitionStatus,\r\n} from \"../Exports\";\r\n\r\n// speech.phrase\r\nexport interface ISimpleSpeechPhrase {\r\n RecognitionStatus: RecognitionStatus;\r\n DisplayText: string;\r\n Offset?: number;\r\n Duration?: number;\r\n}\r\n\r\nexport class SimpleSpeechPhrase implements ISimpleSpeechPhrase {\r\n private simpleSpeechPhrase: ISimpleSpeechPhrase;\r\n private constructor(json: string) {\r\n this.simpleSpeechPhrase = JSON.parse(json);\r\n this.simpleSpeechPhrase.RecognitionStatus = (RecognitionStatus as any)[this.simpleSpeechPhrase.RecognitionStatus];\r\n }\r\n\r\n public static FromJSON(json: string): SimpleSpeechPhrase {\r\n return new SimpleSpeechPhrase(json);\r\n }\r\n\r\n public get RecognitionStatus(): RecognitionStatus {\r\n return this.simpleSpeechPhrase.RecognitionStatus;\r\n }\r\n public get DisplayText(): string {\r\n return this.simpleSpeechPhrase.DisplayText;\r\n }\r\n public get Offset(): number {\r\n return this.simpleSpeechPhrase.Offset;\r\n }\r\n public get Duration(): number {\r\n return this.simpleSpeechPhrase.Duration;\r\n }\r\n}\r\n\n\n\n// WEBPACK FOOTER //\n// ../src/common.speech/ServiceMessages/SimpleSpeechPhrase.ts","//\r\n// copyright (c) Microsoft. All rights reserved.\r\n// See https://aka.ms/csspeech/license201809 for the full license information.\r\n//\r\n\r\nimport { LanguageUnderstandingModelImpl } from \"../sdk/LanguageUnderstandingModel\";\r\n\r\n/**\r\n * @class AddedLmIntent\r\n */\r\n// tslint:disable-next-line:max-classes-per-file\r\nexport class AddedLmIntent {\r\n public modelImpl: LanguageUnderstandingModelImpl;\r\n public intentName: string;\r\n\r\n /**\r\n * Creates and initializes an instance of this class.\r\n * @constructor\r\n * @param modelImpl - The model.\r\n * @param intentName - The intent name.\r\n */\r\n public constructor(modelImpl: LanguageUnderstandingModelImpl, intentName: string) {\r\n this.modelImpl = modelImpl;\r\n this.intentName = intentName;\r\n }\r\n}\r\n\n\n\n// WEBPACK FOOTER //\n// ../src/common.speech/AddedLmIntent.ts","//\r\n// Copyright (c) Microsoft. All rights reserved.\r\n// See https://aka.ms/csspeech/license201809 for the full license information.\r\n//\r\nimport {\r\n IAudioSource,\r\n IConnection,\r\n} from \"../common/Exports\";\r\nimport {\r\n CancellationErrorCode,\r\n CancellationReason,\r\n IntentRecognitionCanceledEventArgs,\r\n IntentRecognitionEventArgs,\r\n IntentRecognitionResult,\r\n IntentRecognizer,\r\n PropertyCollection,\r\n PropertyId,\r\n ResultReason,\r\n} from \"../sdk/Exports\";\r\nimport {\r\n AddedLmIntent,\r\n CancellationErrorCodePropertyName,\r\n EnumTranslation,\r\n IntentResponse,\r\n RequestSession,\r\n ServiceRecognizerBase,\r\n SimpleSpeechPhrase,\r\n SpeechHypothesis,\r\n} from \"./Exports\";\r\nimport {\r\n IAuthentication,\r\n} from \"./IAuthentication\";\r\nimport { IConnectionFactory } from \"./IConnectionFactory\";\r\nimport { RecognizerConfig } from \"./RecognizerConfig\";\r\nimport { SpeechConnectionMessage } from \"./SpeechConnectionMessage.Internal\";\r\n\r\n// tslint:disable-next-line:max-classes-per-file\r\nexport class IntentServiceRecognizer extends ServiceRecognizerBase {\r\n\r\n private intentRecognizer: IntentRecognizer;\r\n private addedLmIntents: { [id: string]: AddedLmIntent; };\r\n private intentDataSent: boolean;\r\n private umbrellaIntent: AddedLmIntent;\r\n private pendingIntentArgs: IntentRecognitionEventArgs;\r\n\r\n public constructor(\r\n authentication: IAuthentication,\r\n connectionFactory: IConnectionFactory,\r\n audioSource: IAudioSource,\r\n recognizerConfig: RecognizerConfig,\r\n recognizer: IntentRecognizer,\r\n intentDataSent: boolean) {\r\n super(authentication, connectionFactory, audioSource, recognizerConfig, recognizer);\r\n this.intentRecognizer = recognizer;\r\n this.intentDataSent = intentDataSent;\r\n }\r\n\r\n public setIntents(addedIntents: { [id: string]: AddedLmIntent; }, umbrellaIntent: AddedLmIntent): void {\r\n this.addedLmIntents = addedIntents;\r\n this.umbrellaIntent = umbrellaIntent;\r\n }\r\n\r\n protected ProcessTypeSpecificMessages(\r\n connectionMessage: SpeechConnectionMessage,\r\n requestSession: RequestSession,\r\n connection: IConnection,\r\n successCallback?: (e: IntentRecognitionResult) => void,\r\n errorCallBack?: (e: string) => void): void {\r\n\r\n let result: IntentRecognitionResult;\r\n let ev: IntentRecognitionEventArgs;\r\n\r\n switch (connectionMessage.Path.toLowerCase()) {\r\n case \"speech.hypothesis\":\r\n const speechHypothesis: SpeechHypothesis = SpeechHypothesis.FromJSON(connectionMessage.TextBody);\r\n\r\n result = new IntentRecognitionResult(\r\n undefined,\r\n requestSession.RequestId,\r\n ResultReason.RecognizingIntent,\r\n speechHypothesis.Text,\r\n speechHypothesis.Duration,\r\n speechHypothesis.Offset,\r\n undefined,\r\n connectionMessage.TextBody,\r\n undefined);\r\n\r\n ev = new IntentRecognitionEventArgs(result, speechHypothesis.Offset, requestSession.SessionId);\r\n\r\n if (!!this.intentRecognizer.recognizing) {\r\n try {\r\n this.intentRecognizer.recognizing(this.intentRecognizer, ev);\r\n /* tslint:disable:no-empty */\r\n } catch (error) {\r\n // Not going to let errors in the event handler\r\n // trip things up.\r\n }\r\n }\r\n\r\n break;\r\n case \"speech.phrase\":\r\n const simple: SimpleSpeechPhrase = SimpleSpeechPhrase.FromJSON(connectionMessage.TextBody);\r\n\r\n result = new IntentRecognitionResult(\r\n undefined,\r\n requestSession.RequestId,\r\n EnumTranslation.implTranslateRecognitionResult(simple.RecognitionStatus),\r\n simple.DisplayText,\r\n simple.Duration,\r\n simple.Offset,\r\n undefined,\r\n connectionMessage.TextBody,\r\n undefined);\r\n\r\n ev = new IntentRecognitionEventArgs(result, result.offset, requestSession.SessionId);\r\n\r\n const sendEvent: () => void = () => {\r\n if (this.recognizerConfig.IsContinuousRecognition) {\r\n // For continuous recognition telemetry has to be sent for every phrase as per spec.\r\n this.SendTelemetryData(requestSession.RequestId, connection, requestSession.GetTelemetry());\r\n }\r\n\r\n if (!!this.intentRecognizer.recognized) {\r\n try {\r\n this.intentRecognizer.recognized(this.intentRecognizer, ev);\r\n /* tslint:disable:no-empty */\r\n } catch (error) {\r\n // Not going to let errors in the event handler\r\n // trip things up.\r\n }\r\n }\r\n\r\n // report result to promise.\r\n if (!!successCallback) {\r\n try {\r\n successCallback(result);\r\n } catch (e) {\r\n if (!!errorCallBack) {\r\n errorCallBack(e);\r\n }\r\n }\r\n // Only invoke the call back once.\r\n // and if it's successful don't invoke the\r\n // error after that.\r\n successCallback = undefined;\r\n errorCallBack = undefined;\r\n }\r\n };\r\n\r\n // If intent data was sent, the terminal result for this recognizer is an intent being found.\r\n // If no intent data was sent, the terminal event is speech recognition being successful.\r\n if (false === this.intentDataSent || ResultReason.NoMatch === ev.result.reason) {\r\n sendEvent();\r\n } else {\r\n // Squirrel away the args, when the response event arrives it will build upon them\r\n // and then return\r\n this.pendingIntentArgs = ev;\r\n }\r\n\r\n break;\r\n case \"response\":\r\n // Response from LUIS\r\n if (this.recognizerConfig.IsContinuousRecognition) {\r\n // For continuous recognition telemetry has to be sent for every phrase as per spec.\r\n this.SendTelemetryData(requestSession.RequestId, connection, requestSession.GetTelemetry());\r\n }\r\n\r\n ev = this.pendingIntentArgs;\r\n this.pendingIntentArgs = undefined;\r\n\r\n const intentResponse: IntentResponse = IntentResponse.FromJSON(connectionMessage.TextBody);\r\n\r\n if (undefined === ev) {\r\n // Odd... Not sure this can happen\r\n ev = new IntentRecognitionEventArgs(new IntentRecognitionResult(), 0 /*TODO*/, requestSession.SessionId);\r\n }\r\n\r\n // If LUIS didn't return anything, send the existing event, else\r\n // modify it to show the match.\r\n // See if the intent found is in the list of intents asked for.\r\n let addedIntent: AddedLmIntent = this.addedLmIntents[intentResponse.topScoringIntent.intent];\r\n\r\n if (this.umbrellaIntent !== undefined) {\r\n addedIntent = this.umbrellaIntent;\r\n }\r\n\r\n if (null !== intentResponse && addedIntent !== undefined) {\r\n const intentId = addedIntent.intentName === undefined ? intentResponse.topScoringIntent.intent : addedIntent.intentName;\r\n let reason = ev.result.reason;\r\n\r\n if (undefined !== intentId) {\r\n reason = ResultReason.RecognizedIntent;\r\n }\r\n\r\n // make sure, properties is set.\r\n const properties = (undefined !== ev.result.properties) ?\r\n ev.result.properties : new PropertyCollection();\r\n\r\n properties.setProperty(PropertyId.LanguageUnderstandingServiceResponse_JsonResult, connectionMessage.TextBody);\r\n\r\n ev = new IntentRecognitionEventArgs(\r\n new IntentRecognitionResult(\r\n intentId,\r\n ev.result.resultId,\r\n reason,\r\n ev.result.text,\r\n ev.result.duration,\r\n ev.result.offset,\r\n ev.result.errorDetails,\r\n ev.result.json,\r\n properties),\r\n ev.offset,\r\n ev.sessionId);\r\n }\r\n\r\n if (!!this.intentRecognizer.recognized) {\r\n try {\r\n this.intentRecognizer.recognized(this.intentRecognizer, ev);\r\n /* tslint:disable:no-empty */\r\n } catch (error) {\r\n // Not going to let errors in the event handler\r\n // trip things up.\r\n }\r\n }\r\n\r\n // report result to promise.\r\n if (!!successCallback) {\r\n try {\r\n successCallback(ev.result);\r\n } catch (e) {\r\n if (!!errorCallBack) {\r\n errorCallBack(e);\r\n }\r\n }\r\n // Only invoke the call back once.\r\n // and if it's successful don't invoke the\r\n // error after that.\r\n successCallback = undefined;\r\n errorCallBack = undefined;\r\n }\r\n break;\r\n default:\r\n break;\r\n }\r\n }\r\n\r\n protected ConnectionError(sessionId: string, requestId: string, error: string): void {\r\n if (!!this.intentRecognizer.canceled) {\r\n const properties: PropertyCollection = new PropertyCollection();\r\n properties.setProperty(CancellationErrorCodePropertyName, CancellationErrorCode[CancellationErrorCode.ConnectionFailure]);\r\n\r\n const result: IntentRecognitionResult = new IntentRecognitionResult(\r\n undefined,\r\n requestId,\r\n ResultReason.Canceled,\r\n undefined,\r\n undefined,\r\n undefined,\r\n error,\r\n undefined,\r\n properties);\r\n\r\n const cancelEvent: IntentRecognitionCanceledEventArgs = new IntentRecognitionCanceledEventArgs(\r\n CancellationReason.Error,\r\n error,\r\n CancellationErrorCode.ConnectionFailure,\r\n undefined,\r\n undefined,\r\n sessionId);\r\n try {\r\n this.intentRecognizer.canceled(this.intentRecognizer, cancelEvent);\r\n /* tslint:disable:no-empty */\r\n } catch { }\r\n }\r\n\r\n }\r\n\r\n}\r\n\n\n\n// WEBPACK FOOTER //\n// ../src/common.speech/IntentServiceRecognizer.ts","//\r\n// Copyright (c) Microsoft. All rights reserved.\r\n// See https://aka.ms/csspeech/license201809 for the full license information.\r\n//\r\n\r\n// response\r\nexport interface IIntentResponse {\r\n query: string;\r\n topScoringIntent: ISingleIntent;\r\n entities: IIntentEntity[];\r\n}\r\n\r\nexport interface IIntentEntity {\r\n entity: string;\r\n type: string;\r\n startIndex: number;\r\n endIndex: number;\r\n score: number;\r\n}\r\n\r\nexport interface ISingleIntent {\r\n intent: string;\r\n score: number;\r\n}\r\n\r\nexport class IntentResponse implements IIntentResponse {\r\n private intentResponse: IIntentResponse;\r\n private constructor(json: string) {\r\n this.intentResponse = JSON.parse(json);\r\n }\r\n\r\n public static FromJSON(json: string): IntentResponse {\r\n return new IntentResponse(json);\r\n }\r\n\r\n public get query(): string {\r\n return this.intentResponse.query;\r\n }\r\n public get topScoringIntent(): ISingleIntent {\r\n return this.intentResponse.topScoringIntent;\r\n }\r\n public get entities(): IIntentEntity[] {\r\n return this.intentResponse.entities;\r\n }\r\n}\r\n\n\n\n// WEBPACK FOOTER //\n// ../src/common.speech/ServiceMessages/IntentResponse.ts","//\r\n// Copyright (c) Microsoft. All rights reserved.\r\n// See https://aka.ms/csspeech/license201809 for the full license information.\r\n//\r\nimport {\r\n CreateNoDashGuid,\r\n Deferred,\r\n Events,\r\n IAudioStreamNode,\r\n IDetachable,\r\n IEventSource,\r\n PlatformEvent,\r\n Promise,\r\n} from \"../common/Exports\";\r\nimport {\r\n ConnectingToServiceEvent,\r\n ListeningStartedEvent,\r\n RecognitionStartedEvent,\r\n RecognitionTriggeredEvent,\r\n SpeechRecognitionEvent,\r\n} from \"./RecognitionEvents\";\r\nimport { ServiceTelemetryListener } from \"./ServiceTelemetryListener.Internal\";\r\n\r\nexport class RequestSession {\r\n private isDisposed: boolean = false;\r\n private serviceTelemetryListener: ServiceTelemetryListener;\r\n private detachables: IDetachable[] = new Array();\r\n private requestId: string;\r\n private audioSourceId: string;\r\n private audioNodeId: string;\r\n private audioNode: IAudioStreamNode;\r\n private authFetchEventId: string;\r\n private serviceTag: string;\r\n private isAudioNodeDetached: boolean = false;\r\n private isCompleted: boolean = false;\r\n\r\n private requestCompletionDeferral: Deferred;\r\n\r\n protected sessionId: string;\r\n\r\n constructor(audioSourceId: string) {\r\n this.audioSourceId = audioSourceId;\r\n this.requestId = CreateNoDashGuid();\r\n this.audioNodeId = CreateNoDashGuid();\r\n this.requestCompletionDeferral = new Deferred();\r\n\r\n this.serviceTelemetryListener = new ServiceTelemetryListener(this.requestId, this.audioSourceId, this.audioNodeId);\r\n\r\n this.OnEvent(new RecognitionTriggeredEvent(this.RequestId, this.sessionId, this.audioSourceId, this.audioNodeId));\r\n }\r\n\r\n public get SessionId(): string {\r\n return this.sessionId;\r\n }\r\n\r\n public get RequestId(): string {\r\n return this.requestId;\r\n }\r\n\r\n public get AudioNodeId(): string {\r\n return this.audioNodeId;\r\n }\r\n\r\n public get CompletionPromise(): Promise {\r\n return this.requestCompletionDeferral.Promise();\r\n }\r\n\r\n public get IsSpeechEnded(): boolean {\r\n return this.isAudioNodeDetached;\r\n }\r\n\r\n public get IsCompleted(): boolean {\r\n return this.isCompleted;\r\n }\r\n\r\n public ListenForServiceTelemetry(eventSource: IEventSource): void {\r\n this.detachables.push(eventSource.AttachListener(this.serviceTelemetryListener));\r\n }\r\n\r\n public OnAudioSourceAttachCompleted = (audioNode: IAudioStreamNode, isError: boolean, error?: string): void => {\r\n this.audioNode = audioNode;\r\n if (isError) {\r\n this.OnComplete();\r\n } else {\r\n this.OnEvent(new ListeningStartedEvent(this.requestId, this.sessionId, this.audioSourceId, this.audioNodeId));\r\n }\r\n }\r\n\r\n public OnPreConnectionStart = (authFetchEventId: string, connectionId: string): void => {\r\n this.authFetchEventId = authFetchEventId;\r\n this.sessionId = connectionId;\r\n this.OnEvent(new ConnectingToServiceEvent(this.requestId, this.authFetchEventId, this.sessionId));\r\n }\r\n\r\n public OnAuthCompleted = (isError: boolean, error?: string): void => {\r\n if (isError) {\r\n this.OnComplete();\r\n }\r\n }\r\n\r\n public OnConnectionEstablishCompleted = (statusCode: number, reason?: string): void => {\r\n if (statusCode === 200) {\r\n this.OnEvent(new RecognitionStartedEvent(this.RequestId, this.audioSourceId, this.audioNodeId, this.authFetchEventId, this.sessionId));\r\n return;\r\n } else if (statusCode === 403) {\r\n this.OnComplete();\r\n } else {\r\n this.OnComplete();\r\n }\r\n }\r\n\r\n public OnServiceTurnEndResponse = (): void => {\r\n this.OnComplete();\r\n }\r\n\r\n public Dispose = (error?: string): void => {\r\n if (!this.isDisposed) {\r\n // we should have completed by now. If we did not its an unknown error.\r\n this.isDisposed = true;\r\n for (const detachable of this.detachables) {\r\n detachable.Detach();\r\n }\r\n\r\n this.serviceTelemetryListener.Dispose();\r\n }\r\n }\r\n\r\n public GetTelemetry = (): string => {\r\n return this.serviceTelemetryListener.GetTelemetry();\r\n }\r\n\r\n protected OnEvent = (event: SpeechRecognitionEvent): void => {\r\n this.serviceTelemetryListener.OnEvent(event);\r\n Events.Instance.OnEvent(event);\r\n }\r\n\r\n private OnComplete = (): void => {\r\n if (!this.isCompleted) {\r\n this.isCompleted = true;\r\n this.DetachAudioNode();\r\n }\r\n }\r\n\r\n private DetachAudioNode = (): void => {\r\n if (!this.isAudioNodeDetached) {\r\n this.isAudioNodeDetached = true;\r\n if (this.audioNode) {\r\n this.audioNode.Detach();\r\n }\r\n }\r\n }\r\n}\r\n\n\n\n// WEBPACK FOOTER //\n// ../src/common.speech/RequestSession.ts","//\r\n// Copyright (c) Microsoft. All rights reserved.\r\n// See https://aka.ms/csspeech/license201809 for the full license information.\r\n//\r\nimport {\r\n AudioSourceErrorEvent,\r\n AudioStreamNodeAttachedEvent,\r\n AudioStreamNodeAttachingEvent,\r\n AudioStreamNodeDetachedEvent,\r\n AudioStreamNodeErrorEvent,\r\n ConnectionClosedEvent,\r\n ConnectionEstablishedEvent,\r\n ConnectionEstablishErrorEvent,\r\n ConnectionMessageReceivedEvent,\r\n ConnectionStartEvent,\r\n IEventListener,\r\n IStringDictionary,\r\n PlatformEvent,\r\n} from \"../common/Exports\";\r\nimport {\r\n ConnectingToServiceEvent,\r\n RecognitionTriggeredEvent,\r\n} from \"./RecognitionEvents\";\r\n\r\ninterface ITelemetry {\r\n Metrics: IMetric[];\r\n ReceivedMessages: IStringDictionary;\r\n}\r\n\r\n// tslint:disable-next-line:max-classes-per-file\r\ninterface IMetric {\r\n End: string;\r\n Error?: string;\r\n Id?: string;\r\n Name: string;\r\n Start: string;\r\n}\r\n\r\n// tslint:disable-next-line:max-classes-per-file\r\nexport class ServiceTelemetryListener implements IEventListener {\r\n private isDisposed: boolean = false;\r\n\r\n private requestId: string;\r\n private audioSourceId: string;\r\n private audioNodeId: string;\r\n\r\n private listeningTriggerMetric: IMetric = null;\r\n private micMetric: IMetric = null;\r\n private connectionEstablishMetric: IMetric = null;\r\n\r\n private micStartTime: string;\r\n\r\n private connectionId: string;\r\n private connectionStartTime: string;\r\n\r\n private receivedMessages: IStringDictionary;\r\n\r\n constructor(requestId: string, audioSourceId: string, audioNodeId: string) {\r\n this.requestId = requestId;\r\n this.audioSourceId = audioSourceId;\r\n this.audioNodeId = audioNodeId;\r\n\r\n this.receivedMessages = {};\r\n }\r\n\r\n public OnEvent = (e: PlatformEvent): void => {\r\n if (this.isDisposed) {\r\n return;\r\n }\r\n\r\n if (e instanceof RecognitionTriggeredEvent && e.RequestId === this.requestId) {\r\n this.listeningTriggerMetric = {\r\n End: e.EventTime,\r\n Name: \"ListeningTrigger\",\r\n Start: e.EventTime,\r\n };\r\n }\r\n\r\n if (e instanceof AudioStreamNodeAttachingEvent && e.AudioSourceId === this.audioSourceId && e.AudioNodeId === this.audioNodeId) {\r\n this.micStartTime = e.EventTime;\r\n }\r\n\r\n if (e instanceof AudioStreamNodeAttachedEvent && e.AudioSourceId === this.audioSourceId && e.AudioNodeId === this.audioNodeId) {\r\n this.micStartTime = e.EventTime;\r\n }\r\n\r\n if (e instanceof AudioSourceErrorEvent && e.AudioSourceId === this.audioSourceId) {\r\n if (!this.micMetric) {\r\n this.micMetric = {\r\n End: e.EventTime,\r\n Error: e.Error,\r\n Name: \"Microphone\",\r\n Start: this.micStartTime,\r\n };\r\n }\r\n }\r\n\r\n if (e instanceof AudioStreamNodeErrorEvent && e.AudioSourceId === this.audioSourceId && e.AudioNodeId === this.audioNodeId) {\r\n if (!this.micMetric) {\r\n this.micMetric = {\r\n End: e.EventTime,\r\n Error: e.Error,\r\n Name: \"Microphone\",\r\n Start: this.micStartTime,\r\n };\r\n }\r\n }\r\n\r\n if (e instanceof AudioStreamNodeDetachedEvent && e.AudioSourceId === this.audioSourceId && e.AudioNodeId === this.audioNodeId) {\r\n if (!this.micMetric) {\r\n this.micMetric = {\r\n End: e.EventTime,\r\n Name: \"Microphone\",\r\n Start: this.micStartTime,\r\n };\r\n }\r\n }\r\n\r\n if (e instanceof ConnectingToServiceEvent && e.RequestId === this.requestId) {\r\n this.connectionId = e.SessionId;\r\n }\r\n\r\n if (e instanceof ConnectionStartEvent && e.ConnectionId === this.connectionId) {\r\n this.connectionStartTime = e.EventTime;\r\n }\r\n\r\n if (e instanceof ConnectionEstablishedEvent && e.ConnectionId === this.connectionId) {\r\n if (!this.connectionEstablishMetric) {\r\n this.connectionEstablishMetric = {\r\n End: e.EventTime,\r\n Id: this.connectionId,\r\n Name: \"Connection\",\r\n Start: this.connectionStartTime,\r\n };\r\n }\r\n }\r\n\r\n if (e instanceof ConnectionEstablishErrorEvent && e.ConnectionId === this.connectionId) {\r\n if (!this.connectionEstablishMetric) {\r\n this.connectionEstablishMetric = {\r\n End: e.EventTime,\r\n Error: this.GetConnectionError(e.StatusCode),\r\n Id: this.connectionId,\r\n Name: \"Connection\",\r\n Start: this.connectionStartTime,\r\n };\r\n }\r\n }\r\n\r\n if (e instanceof ConnectionMessageReceivedEvent && e.ConnectionId === this.connectionId) {\r\n if (e.Message && e.Message.Headers && e.Message.Headers.path) {\r\n if (!this.receivedMessages[e.Message.Headers.path]) {\r\n this.receivedMessages[e.Message.Headers.path] = new Array();\r\n }\r\n\r\n this.receivedMessages[e.Message.Headers.path].push(e.NetworkReceivedTime);\r\n }\r\n }\r\n }\r\n\r\n public GetTelemetry = (): string => {\r\n const metrics = new Array();\r\n\r\n if (this.listeningTriggerMetric) {\r\n metrics.push(this.listeningTriggerMetric);\r\n }\r\n\r\n if (this.micMetric) {\r\n metrics.push(this.micMetric);\r\n }\r\n\r\n if (this.connectionEstablishMetric) {\r\n metrics.push(this.connectionEstablishMetric);\r\n }\r\n\r\n const telemetry: ITelemetry = {\r\n Metrics: metrics,\r\n ReceivedMessages: this.receivedMessages,\r\n };\r\n\r\n const json = JSON.stringify(telemetry);\r\n\r\n // We dont want to send the same telemetry again. So clean those out.\r\n this.receivedMessages = {};\r\n this.listeningTriggerMetric = null;\r\n this.micMetric = null;\r\n this.connectionEstablishMetric = null;\r\n\r\n return json;\r\n }\r\n\r\n public Dispose = (): void => {\r\n this.isDisposed = true;\r\n }\r\n\r\n private GetConnectionError = (statusCode: number): string => {\r\n /*\r\n -- Websocket status codes --\r\n NormalClosure = 1000,\r\n EndpointUnavailable = 1001,\r\n ProtocolError = 1002,\r\n InvalidMessageType = 1003,\r\n Empty = 1005,\r\n InvalidPayloadData = 1007,\r\n PolicyViolation = 1008,\r\n MessageTooBig = 1009,\r\n MandatoryExtension = 1010,\r\n InternalServerError = 1011\r\n */\r\n\r\n switch (statusCode) {\r\n case 400:\r\n case 1002:\r\n case 1003:\r\n case 1005:\r\n case 1007:\r\n case 1008:\r\n case 1009: return \"BadRequest\";\r\n case 401: return \"Unauthorized\";\r\n case 403: return \"Forbidden\";\r\n case 503:\r\n case 1001: return \"ServerUnavailable\";\r\n case 500:\r\n case 1011: return \"ServerError\";\r\n case 408:\r\n case 504: return \"Timeout\";\r\n default: return \"statuscode:\" + statusCode.toString();\r\n }\r\n }\r\n}\r\n\n\n\n// WEBPACK FOOTER //\n// ../src/common.speech/ServiceTelemetryListener.Internal.ts","//\r\n// Copyright (c) Microsoft. All rights reserved.\r\n// See https://aka.ms/csspeech/license201809 for the full license information.\r\n//\r\n\r\nimport {\r\n OutputFormatPropertyName,\r\n} from \"../common.speech/Exports\";\r\nimport {\r\n Contracts,\r\n} from \"./Contracts\";\r\nimport {\r\n OutputFormat,\r\n PropertyCollection,\r\n PropertyId,\r\n SpeechConfig,\r\n} from \"./Exports\";\r\n\r\n/**\r\n * Speech translation configuration.\r\n * @class SpeechTranslationConfig\r\n */\r\nexport abstract class SpeechTranslationConfig extends SpeechConfig {\r\n\r\n /**\r\n * Creates an instance of recognizer config.\r\n */\r\n protected constructor() {\r\n super();\r\n }\r\n\r\n /**\r\n * Static instance of SpeechTranslationConfig returned by passing a subscription key and service region.\r\n * @member SpeechTranslationConfig.fromSubscription\r\n * @function\r\n * @public\r\n * @param {string} subscriptionKey - The subscription key.\r\n * @param {string} region - The region name (see the region page).\r\n * @returns {SpeechTranslationConfig} The speech translation config.\r\n */\r\n public static fromSubscription(subscriptionKey: string, region: string): SpeechTranslationConfig {\r\n Contracts.throwIfNullOrWhitespace(subscriptionKey, \"subscriptionKey\");\r\n Contracts.throwIfNullOrWhitespace(region, \"region\");\r\n\r\n const ret: SpeechTranslationConfigImpl = new SpeechTranslationConfigImpl();\r\n ret.properties.setProperty(PropertyId.SpeechServiceConnection_Key, subscriptionKey);\r\n ret.properties.setProperty(PropertyId.SpeechServiceConnection_Region, region);\r\n return ret;\r\n }\r\n\r\n /**\r\n * Static instance of SpeechTranslationConfig returned by passing authorization token and service region.\r\n * Note: The caller needs to ensure that the authorization token is valid. Before the authorization token\r\n * expipres, the caller needs to refresh it by setting the property authorizationToken with a new valid token.\r\n * Otherwise, all the recognizers created by this SpeechTranslationConfig instance will encounter errors during recognition.\r\n * @member SpeechTranslationConfig.fromAuthorizationToken\r\n * @function\r\n * @public\r\n * @param {string} authorizationToken - The authorization token.\r\n * @param {string} region - The region name (see the region page).\r\n * @returns {SpeechTranslationConfig} The speech translation config.\r\n */\r\n public static fromAuthorizationToken(authorizationToken: string, region: string): SpeechTranslationConfig {\r\n Contracts.throwIfNullOrWhitespace(authorizationToken, \"authorizationToken\");\r\n Contracts.throwIfNullOrWhitespace(region, \"region\");\r\n\r\n const ret: SpeechTranslationConfigImpl = new SpeechTranslationConfigImpl();\r\n ret.properties.setProperty(PropertyId.SpeechServiceAuthorization_Token, authorizationToken);\r\n ret.properties.setProperty(PropertyId.SpeechServiceConnection_Region, region);\r\n return ret;\r\n }\r\n\r\n /**\r\n * Creates an instance of the speech translation config with specified endpoint and subscription key.\r\n * This method is intended only for users who use a non-standard service endpoint or paramters.\r\n * Note: The query properties specified in the endpoint URL are not changed, even if they are set by any other APIs.\r\n * For example, if language is defined in the uri as query parameter \"language=de-DE\", and also set by the speechRecognitionLanguage property,\r\n * the language setting in uri takes precedence, and the effective language is \"de-DE\".\r\n * Only the properties that are not specified in the endpoint URL can be set by other APIs.\r\n * @member SpeechTranslationConfig.fromEndpoint\r\n * @function\r\n * @public\r\n * @param {URL} endpoint - The service endpoint to connect to.\r\n * @param {string} subscriptionKey - The subscription key.\r\n * @returns {SpeechTranslationConfig} A speech config instance.\r\n */\r\n public static fromEndpoint(endpoint: URL, subscriptionKey: string): SpeechTranslationConfig {\r\n Contracts.throwIfNull(endpoint, \"endpoint\");\r\n Contracts.throwIfNullOrWhitespace(subscriptionKey, \"subscriptionKey\");\r\n\r\n const ret: SpeechTranslationConfigImpl = new SpeechTranslationConfigImpl();\r\n ret.properties.setProperty(PropertyId.SpeechServiceConnection_Endpoint, endpoint.href);\r\n ret.properties.setProperty(PropertyId.SpeechServiceConnection_Key, subscriptionKey);\r\n return ret;\r\n }\r\n\r\n /**\r\n * Sets the authorization token.\r\n * If this is set, subscription key is ignored.\r\n * User needs to make sure the provided authorization token is valid and not expired.\r\n * @member SpeechTranslationConfig.prototype.authorizationToken\r\n * @function\r\n * @public\r\n * @param {string} value - The authorization token.\r\n */\r\n public abstract set authorizationToken(value: string);\r\n\r\n /**\r\n * Sets the authorization token.\r\n * If this is set, subscription key is ignored.\r\n * User needs to make sure the provided authorization token is valid and not expired.\r\n * @member SpeechTranslationConfig.prototype.speechRecognitionLanguage\r\n * @function\r\n * @public\r\n * @param {string} value - The authorization token.\r\n */\r\n public abstract set speechRecognitionLanguage(value: string);\r\n\r\n /**\r\n * Add a (text) target language to translate into.\r\n * @member SpeechTranslationConfig.prototype.addTargetLanguage\r\n * @function\r\n * @public\r\n * @param {string} value - The language such as de-DE\r\n */\r\n public abstract addTargetLanguage(value: string): void;\r\n\r\n /**\r\n * Add a (text) target language to translate into.\r\n * @member SpeechTranslationConfig.prototype.targetLanguages\r\n * @function\r\n * @public\r\n * @param {string} value - The language such as de-DE\r\n */\r\n public abstract get targetLanguages(): string[];\r\n\r\n /**\r\n * Returns the selected voice name.\r\n * @member SpeechTranslationConfig.prototype.voiceName\r\n * @function\r\n * @public\r\n * @returns {string} The voice name.\r\n */\r\n public abstract get voiceName(): string;\r\n\r\n /**\r\n * Sets voice of the translated language, enable voice synthesis output.\r\n * @member SpeechTranslationConfig.prototype.voiceName\r\n * @function\r\n * @public\r\n * @param {string} value - The name of the voice.\r\n */\r\n public abstract set voiceName(value: string);\r\n\r\n /**\r\n * Sets a named property as value\r\n * @member SpeechTranslationConfig.prototype.setProperty\r\n * @function\r\n * @public\r\n * @param {string} name - The name of the property.\r\n * @param {string} value - The value.\r\n */\r\n public abstract setProperty(name: string, value: string): void;\r\n\r\n /**\r\n * Dispose of associated resources.\r\n * @member SpeechTranslationConfig.prototype.close\r\n * @function\r\n * @public\r\n */\r\n public abstract close(): void;\r\n}\r\n\r\n/**\r\n * @private\r\n * @class SpeechTranslationConfigImpl\r\n */\r\n// tslint:disable-next-line:max-classes-per-file\r\nexport class SpeechTranslationConfigImpl extends SpeechTranslationConfig {\r\n private speechProperties: PropertyCollection;\r\n\r\n public constructor() {\r\n super();\r\n this.speechProperties = new PropertyCollection();\r\n\r\n }\r\n /**\r\n * Sets the authorization token.\r\n * If this is set, subscription key is ignored.\r\n * User needs to make sure the provided authorization token is valid and not expired.\r\n * @member SpeechTranslationConfigImpl.prototype.authorizationToken\r\n * @function\r\n * @public\r\n * @param {string} value - The authorization token.\r\n */\r\n public set authorizationToken(value: string) {\r\n Contracts.throwIfNullOrWhitespace(value, \"value\");\r\n\r\n this.properties.setProperty(PropertyId.SpeechServiceAuthorization_Token, value);\r\n }\r\n\r\n /**\r\n * Sets the authorization token.\r\n * If this is set, subscription key is ignored.\r\n * User needs to make sure the provided authorization token is valid and not expired.\r\n * @member SpeechTranslationConfigImpl.prototype.speechRecognitionLanguage\r\n * @function\r\n * @public\r\n * @param {string} value - The authorization token.\r\n */\r\n public set speechRecognitionLanguage(value: string) {\r\n Contracts.throwIfNullOrWhitespace(value, \"value\");\r\n this.properties.setProperty(PropertyId.SpeechServiceConnection_RecoLanguage, value);\r\n }\r\n\r\n /**\r\n * @member SpeechTranslationConfigImpl.prototype.subscriptionKey\r\n * @function\r\n * @public\r\n */\r\n public get subscriptionKey(): string {\r\n return this.speechProperties.getProperty(PropertyId[PropertyId.SpeechServiceConnection_Key]);\r\n }\r\n\r\n /**\r\n * @member SpeechTranslationConfigImpl.prototype.outputFormat\r\n * @function\r\n * @public\r\n */\r\n public get outputFormat(): OutputFormat {\r\n return (OutputFormat as any)[this.speechProperties.getProperty(OutputFormatPropertyName, OutputFormat[OutputFormat.Simple])];\r\n }\r\n\r\n /**\r\n * @member SpeechTranslationConfigImpl.prototype.outputFormat\r\n * @function\r\n * @public\r\n */\r\n public set outputFormat(value: OutputFormat) {\r\n this.speechProperties.setProperty(OutputFormatPropertyName, OutputFormat[value]);\r\n }\r\n\r\n /**\r\n * @member SpeechTranslationConfigImpl.prototype.endpointId\r\n * @function\r\n * @public\r\n */\r\n public set endpointId(value: string) {\r\n this.speechProperties.setProperty(PropertyId.SpeechServiceConnection_Endpoint, value);\r\n }\r\n\r\n /**\r\n * @member SpeechTranslationConfigImpl.prototype.endpointId\r\n * @function\r\n * @public\r\n */\r\n public get endpointId(): string {\r\n return this.speechProperties.getProperty(PropertyId.SpeechServiceConnection_EndpointId);\r\n }\r\n /**\r\n * Add a (text) target language to translate into.\r\n * @member SpeechTranslationConfigImpl.prototype.addTargetLanguage\r\n * @function\r\n * @public\r\n * @param {string} value - The language such as de-DE\r\n */\r\n public addTargetLanguage(value: string): void {\r\n Contracts.throwIfNullOrWhitespace(value, \"value\");\r\n\r\n const languages: string[] = this.targetLanguages;\r\n languages.push(value);\r\n this.properties.setProperty(PropertyId.SpeechServiceConnection_TranslationToLanguages, languages.join(\",\"));\r\n }\r\n\r\n /**\r\n * Add a (text) target language to translate into.\r\n * @member SpeechTranslationConfigImpl.prototype.targetLanguages\r\n * @function\r\n * @public\r\n * @param {string} value - The language such as de-DE\r\n */\r\n public get targetLanguages(): string[] {\r\n\r\n if (this.speechProperties.getProperty(PropertyId.SpeechServiceConnection_TranslationToLanguages, undefined) !== undefined) {\r\n return this.speechProperties.getProperty(PropertyId.SpeechServiceConnection_TranslationToLanguages).split(\",\");\r\n } else {\r\n return [];\r\n }\r\n\r\n }\r\n\r\n /**\r\n * @member SpeechTranslationConfigImpl.prototype.voiceName\r\n * @function\r\n * @public\r\n */\r\n public get voiceName(): string {\r\n return this.getProperty(PropertyId[PropertyId.SpeechServiceConnection_TranslationVoice]);\r\n }\r\n\r\n /**\r\n * Sets voice of the translated language, enable voice synthesis output.\r\n * @member SpeechTranslationConfigImpl.prototype.voiceName\r\n * @function\r\n * @public\r\n * @param {string} value - The name of the voice.\r\n */\r\n public set voiceName(value: string) {\r\n Contracts.throwIfNullOrWhitespace(value, \"value\");\r\n\r\n this.properties.setProperty(PropertyId.SpeechServiceConnection_TranslationVoice, value);\r\n }\r\n\r\n /**\r\n * Provides the region.\r\n * @member SpeechTranslationConfigImpl.prototype.region\r\n * @function\r\n * @public\r\n * @returns {string} The region.\r\n */\r\n public get region(): string {\r\n return this.speechProperties.getProperty(PropertyId.SpeechServiceConnection_Region);\r\n }\r\n\r\n /**\r\n * Allows for setting arbitrary properties.\r\n * @member SpeechTranslationConfigImpl.prototype.setProperty\r\n * @function\r\n * @public\r\n * @param {string} name - The name of the property.\r\n * @param {string} value - The value of the property.\r\n */\r\n public setProperty(name: string, value: string): void {\r\n this.properties.setProperty(name, value);\r\n }\r\n\r\n /**\r\n * Allows for retrieving arbitrary property values.\r\n * @member SpeechTranslationConfigImpl.prototype.getProperty\r\n * @function\r\n * @public\r\n * @param {string} name - The name of the property.\r\n * @param {string} def - The default value of the property in case it is not set.\r\n * @returns {string} The value of the property.\r\n */\r\n public getProperty(name: string, def?: string): string {\r\n return this.speechProperties.getProperty(name, def);\r\n }\r\n\r\n /**\r\n * Provides access to custom properties.\r\n * @member SpeechTranslationConfigImpl.prototype.properties\r\n * @function\r\n * @public\r\n * @returns {PropertyCollection} The properties.\r\n */\r\n public get properties(): PropertyCollection {\r\n return this.speechProperties;\r\n }\r\n\r\n /**\r\n * Dispose of associated resources.\r\n * @member SpeechTranslationConfigImpl.prototype.close\r\n * @function\r\n * @public\r\n */\r\n public close(): void {\r\n return;\r\n }\r\n}\r\n\n\n\n// WEBPACK FOOTER //\n// ../src/sdk/SpeechTranslationConfig.ts","//\r\n// copyright (c) Microsoft. All rights reserved.\r\n// See https://aka.ms/csspeech/license201809 for the full license information.\r\n//\r\n\r\nimport { PropertyId } from \"./Exports\";\r\n\r\n/**\r\n * Represents collection of properties and their values.\r\n * @class PropertyCollection\r\n */\r\nexport class PropertyCollection {\r\n private keys: string[] = [] as string[];\r\n private values: string[] = [] as string[];\r\n\r\n /**\r\n * Returns the property value in type String. The parameter must have the same type as String.\r\n * Currently only String, int and bool are allowed.\r\n * If the name is not available, the specified defaultValue is returned.\r\n * @member PropertyCollection.prototype.getProperty\r\n * @function\r\n * @public\r\n * @param {string} key - The parameter name.\r\n * @param {string} def - The default value which is returned if the parameter is not available in the collection.\r\n * @returns {string} value of the parameter.\r\n */\r\n public getProperty(key: PropertyId | string, def?: string): string {\r\n let keyToUse: string;\r\n\r\n if (typeof key === \"string\") {\r\n keyToUse = key;\r\n } else {\r\n keyToUse = PropertyId[key];\r\n }\r\n\r\n for (let n = 0; n < this.keys.length; n++) {\r\n if (this.keys[n] === keyToUse) {\r\n return this.values[n];\r\n }\r\n }\r\n\r\n return def;\r\n }\r\n\r\n /**\r\n * Sets the String value of the parameter specified by name.\r\n * @member PropertyCollection.prototype.setProperty\r\n * @function\r\n * @public\r\n * @param {string} key - The parameter name.\r\n * @param {string} value - The value of the parameter.\r\n */\r\n public setProperty(key: string | PropertyId, value: string): void {\r\n let keyToUse: string;\r\n\r\n if (typeof key === \"string\") {\r\n keyToUse = key;\r\n } else {\r\n keyToUse = PropertyId[key];\r\n }\r\n\r\n for (let n = 0; n < this.keys.length; n++) {\r\n if (this.keys[n] === keyToUse) {\r\n this.values[n] = value;\r\n return;\r\n }\r\n }\r\n\r\n this.keys.push(keyToUse);\r\n this.values.push(value);\r\n }\r\n\r\n /**\r\n * Clones the collection.\r\n * @member PropertyCollection.prototype.clone\r\n * @function\r\n * @public\r\n * @returns {PropertyCollection} A copy of the collection.\r\n */\r\n public clone(): PropertyCollection {\r\n const clonedMap = new PropertyCollection();\r\n\r\n for (let n = 0; n < this.keys.length; n++) {\r\n clonedMap.keys.push(this.keys[n]);\r\n clonedMap.values.push(this.values[n]);\r\n }\r\n\r\n return clonedMap;\r\n }\r\n}\r\n\n\n\n// WEBPACK FOOTER //\n// ../src/sdk/PropertyCollection.ts","//\r\n// Copyright (c) Microsoft. All rights reserved.\r\n// See https://aka.ms/csspeech/license201809 for the full license information.\r\n//\r\n\r\n/**\r\n * Defines speech property ids.\r\n * @class PropertyId\r\n */\r\nexport enum PropertyId {\r\n\r\n /**\r\n * Subscription key.\r\n * @member PropertyId.SpeechServiceConnection_Key\r\n */\r\n SpeechServiceConnection_Key = 0,\r\n\r\n /**\r\n * Endpoint.\r\n * @member PropertyId.SpeechServiceConnection_Endpoint\r\n */\r\n SpeechServiceConnection_Endpoint,\r\n\r\n /**\r\n * Region.\r\n * @member PropertyId.SpeechServiceConnection_Region\r\n */\r\n SpeechServiceConnection_Region,\r\n\r\n /**\r\n * Authorization token.\r\n * @member PropertyId.SpeechServiceAuthorization_Token\r\n */\r\n SpeechServiceAuthorization_Token,\r\n\r\n /**\r\n * Authorization type.\r\n * @member PropertyId.SpeechServiceAuthorization_Type\r\n */\r\n SpeechServiceAuthorization_Type,\r\n\r\n /**\r\n * Endpoint ID.\r\n * @member PropertyId.SpeechServiceConnection_EndpointId\r\n */\r\n SpeechServiceConnection_EndpointId,\r\n\r\n /**\r\n * Translation to languages.\r\n * @member PropertyId.SpeechServiceConnection_TranslationToLanguages\r\n */\r\n SpeechServiceConnection_TranslationToLanguages,\r\n\r\n /**\r\n * Translation output voice.\r\n * @member PropertyId.SpeechServiceConnection_TranslationVoice\r\n */\r\n SpeechServiceConnection_TranslationVoice,\r\n\r\n /**\r\n * Translation features.\r\n * @member PropertyId.SpeechServiceConnection_TranslationFeatures\r\n */\r\n SpeechServiceConnection_TranslationFeatures,\r\n\r\n /**\r\n * Intent region.\r\n * @member PropertyId.SpeechServiceConnection_IntentRegion\r\n */\r\n SpeechServiceConnection_IntentRegion,\r\n\r\n /**\r\n * Recognition mode.\r\n * @member PropertyId.SpeechServiceConnection_RecoMode\r\n */\r\n SpeechServiceConnection_RecoMode,\r\n\r\n /**\r\n * Recognition language.\r\n * @member PropertyId.SpeechServiceConnection_RecoLanguage\r\n */\r\n SpeechServiceConnection_RecoLanguage,\r\n\r\n /**\r\n * Session id.\r\n * @member PropertyId.Speech_SessionId\r\n */\r\n Speech_SessionId,\r\n\r\n /**\r\n * Detailed result required.\r\n * @member PropertyId.SpeechServiceResponse_RequestDetailedResultTrueFalse\r\n */\r\n SpeechServiceResponse_RequestDetailedResultTrueFalse,\r\n\r\n /**\r\n * Profanity filtering required.\r\n * @member PropertyId.SpeechServiceResponse_RequestProfanityFilterTrueFalse\r\n */\r\n SpeechServiceResponse_RequestProfanityFilterTrueFalse,\r\n\r\n /**\r\n * JSON in result.\r\n * @member PropertyId.SpeechServiceResponse_JsonResult\r\n */\r\n SpeechServiceResponse_JsonResult,\r\n\r\n /**\r\n * Error details.\r\n * @member PropertyId.SpeechServiceResponse_JsonErrorDetails\r\n */\r\n SpeechServiceResponse_JsonErrorDetails,\r\n\r\n /**\r\n * Cancellation reason.\r\n * @member PropertyId.CancellationDetails_Reason\r\n */\r\n CancellationDetails_Reason,\r\n\r\n /**\r\n * Cancellation text.\r\n * @member PropertyId.CancellationDetails_ReasonText\r\n */\r\n CancellationDetails_ReasonText,\r\n\r\n /**\r\n * Cancellation detailed text.\r\n * @member PropertyId.CancellationDetails_ReasonDetailedText\r\n */\r\n CancellationDetails_ReasonDetailedText,\r\n\r\n /**\r\n * JSON result of language understanding service.\r\n * @member PropertyId.LanguageUnderstandingServiceResponse_JsonResult\r\n */\r\n LanguageUnderstandingServiceResponse_JsonResult,\r\n}\r\n\n\n\n// WEBPACK FOOTER //\n// ../src/sdk/PropertyId.ts","//\r\n// copyright (c) Microsoft. All rights reserved.\r\n// See https://aka.ms/csspeech/license201809 for the full license information.\r\n//\r\nimport {\r\n CognitiveSubscriptionKeyAuthentication,\r\n CognitiveTokenAuthentication,\r\n Context,\r\n Device,\r\n IAuthentication,\r\n IConnectionFactory,\r\n OS,\r\n PlatformConfig,\r\n RecognitionMode,\r\n RecognizerConfig,\r\n ServiceRecognizerBase,\r\n} from \"../common.speech/Exports\";\r\nimport {\r\n Promise,\r\n PromiseHelper,\r\n} from \"../common/Exports\";\r\nimport { Contracts } from \"./Contracts\";\r\nimport {\r\n AudioConfig,\r\n PropertyCollection,\r\n PropertyId,\r\n RecognitionEventArgs,\r\n SessionEventArgs,\r\n SpeechRecognitionResult,\r\n} from \"./Exports\";\r\n\r\n/**\r\n * Defines the base class Recognizer which mainly contains common event handlers.\r\n * @class Recognizer\r\n */\r\nexport abstract class Recognizer {\r\n private disposed: boolean;\r\n protected audioConfig: AudioConfig;\r\n\r\n /**\r\n * Creates and initializes an instance of a Recognizer\r\n * @constructor\r\n * @param {AudioConfig} audioInput - An optional audio input stream associated with the recognizer\r\n */\r\n protected constructor(audioConfig: AudioConfig) {\r\n this.audioConfig = (audioConfig !== undefined) ? audioConfig : AudioConfig.fromDefaultMicrophoneInput();\r\n\r\n this.disposed = false;\r\n }\r\n\r\n /**\r\n * Defines event handler for session started events.\r\n * @member Recognizer.prototype.sessionStarted\r\n * @function\r\n * @public\r\n */\r\n public sessionStarted: (sender: Recognizer, event: SessionEventArgs) => void;\r\n\r\n /**\r\n * Defines event handler for session stopped events.\r\n * @member Recognizer.prototype.sessionStopped\r\n * @function\r\n * @public\r\n */\r\n public sessionStopped: (sender: Recognizer, event: SessionEventArgs) => void;\r\n\r\n /**\r\n * Defines event handler for speech started events.\r\n * @member Recognizer.prototype.speechStartDetected\r\n * @function\r\n * @public\r\n */\r\n public speechStartDetected: (sender: Recognizer, event: RecognitionEventArgs) => void;\r\n\r\n /**\r\n * Defines event handler for speech stopped events.\r\n * @member Recognizer.prototype.speechEndDetected\r\n * @function\r\n * @public\r\n */\r\n public speechEndDetected: (sender: Recognizer, event: RecognitionEventArgs) => void;\r\n\r\n /**\r\n * Dispose of associated resources.\r\n * @member Recognizer.prototype.close\r\n * @function\r\n * @public\r\n */\r\n public close(): void {\r\n Contracts.throwIfDisposed(this.disposed);\r\n\r\n this.dispose(true);\r\n }\r\n\r\n /**\r\n * This method performs cleanup of resources.\r\n * The Boolean parameter disposing indicates whether the method is called from Dispose (if disposing is true) or from the finalizer (if disposing is false).\r\n * Derived classes should override this method to dispose resource if needed.\r\n * @member Recognizer.prototype.dispose\r\n * @function\r\n * @public\r\n * @param {boolean} disposing - Flag to request disposal.\r\n */\r\n protected dispose(disposing: boolean): void {\r\n if (this.disposed) {\r\n return;\r\n }\r\n\r\n if (disposing) {\r\n // disconnect\r\n }\r\n\r\n this.disposed = true;\r\n }\r\n\r\n //\r\n // ################################################################################################################\r\n // IMPLEMENTATION.\r\n // Move to independent class\r\n // ################################################################################################################\r\n //\r\n\r\n protected abstract CreateRecognizerConfig(speecgConfig: PlatformConfig, recognitionMode: RecognitionMode): RecognizerConfig;\r\n\r\n protected abstract CreateServiceRecognizer(authentication: IAuthentication, connectionFactory: IConnectionFactory, audioConfig: AudioConfig, recognizerConfig: RecognizerConfig): ServiceRecognizerBase;\r\n\r\n // Setup the recognizer\r\n protected implRecognizerSetup(recognitionMode: RecognitionMode, speechProperties: PropertyCollection, audioConfig: AudioConfig, speechConnectionFactory: IConnectionFactory): ServiceRecognizerBase {\r\n\r\n let osPlatform = (window !== undefined) ? \"Browser\" : \"Node\";\r\n let osName = \"unknown\";\r\n let osVersion = \"unknown\";\r\n\r\n if (navigator !== undefined) {\r\n osPlatform = osPlatform + \"/\" + navigator.platform;\r\n osName = navigator.userAgent;\r\n osVersion = navigator.appVersion;\r\n }\r\n\r\n const recognizerConfig = this.CreateRecognizerConfig(\r\n new PlatformConfig(\r\n new Context(new OS(osPlatform, osName, osVersion))),\r\n recognitionMode); // SDK.SpeechResultFormat.Simple (Options - Simple/Detailed)\r\n\r\n const subscriptionKey = speechProperties.getProperty(PropertyId.SpeechServiceConnection_Key, undefined);\r\n const authentication = subscriptionKey ?\r\n new CognitiveSubscriptionKeyAuthentication(subscriptionKey) :\r\n new CognitiveTokenAuthentication(\r\n (authFetchEventId: string): Promise => {\r\n const authorizationToken = speechProperties.getProperty(PropertyId.SpeechServiceAuthorization_Token, undefined);\r\n return PromiseHelper.FromResult(authorizationToken);\r\n },\r\n (authFetchEventId: string): Promise => {\r\n const authorizationToken = speechProperties.getProperty(PropertyId.SpeechServiceAuthorization_Token, undefined);\r\n return PromiseHelper.FromResult(authorizationToken);\r\n });\r\n\r\n return this.CreateServiceRecognizer(\r\n authentication,\r\n speechConnectionFactory,\r\n audioConfig,\r\n recognizerConfig);\r\n }\r\n\r\n // Start the recognition\r\n protected implRecognizerStart(\r\n recognizer: ServiceRecognizerBase,\r\n successCallback: (e: SpeechRecognitionResult) => void,\r\n errorCallback: (e: string) => void,\r\n speechContext?: string,\r\n ): void {\r\n recognizer.Recognize(speechContext, successCallback, errorCallback).On(\r\n /* tslint:disable:no-empty */\r\n (result: boolean): void => { },\r\n (error: string): void => {\r\n if (!!errorCallback) {\r\n // Internal error with service communication.\r\n errorCallback(\"Runtime error: \" + error);\r\n }\r\n });\r\n }\r\n}\r\n\n\n\n// WEBPACK FOOTER //\n// ../src/sdk/Recognizer.ts","//\r\n// copyright (c) Microsoft. All rights reserved.\r\n// See https://aka.ms/csspeech/license201809 for the full license information.\r\n//\r\nimport {\r\n IAuthentication,\r\n IConnectionFactory,\r\n OutputFormatPropertyName,\r\n PlatformConfig,\r\n RecognitionMode,\r\n RecognizerConfig,\r\n ServiceRecognizerBase,\r\n SpeechServiceRecognizer,\r\n} from \"../common.speech/Exports\";\r\nimport { SpeechConnectionFactory } from \"../common.speech/SpeechConnectionFactory\";\r\nimport { AudioConfigImpl } from \"./Audio/AudioConfig\";\r\nimport { Contracts } from \"./Contracts\";\r\nimport {\r\n AudioConfig,\r\n KeywordRecognitionModel,\r\n OutputFormat,\r\n PropertyCollection,\r\n PropertyId,\r\n Recognizer,\r\n SpeechRecognitionCanceledEventArgs,\r\n SpeechRecognitionEventArgs,\r\n SpeechRecognitionResult,\r\n} from \"./Exports\";\r\nimport { SpeechConfig, SpeechConfigImpl } from \"./SpeechConfig\";\r\n\r\n/**\r\n * Performs speech recognition from microphone, file, or other audio input streams, and gets transcribed text as result.\r\n * @class SpeechRecognizer\r\n */\r\nexport class SpeechRecognizer extends Recognizer {\r\n private disposedSpeechRecognizer: boolean = false;\r\n private privProperties: PropertyCollection;\r\n\r\n /**\r\n * SpeechRecognizer constructor.\r\n * @constructor\r\n * @param {SpeechConfig} speechConfig - An set of initial properties for this recognizer\r\n * @param {AudioConfig} audioConfig - An optional audio configuration associated with the recognizer\r\n */\r\n public constructor(speechConfig: SpeechConfig, audioConfig?: AudioConfig) {\r\n super(audioConfig);\r\n\r\n const speechConfigImpl: SpeechConfigImpl = speechConfig as SpeechConfigImpl;\r\n Contracts.throwIfNull(speechConfigImpl, \"speechConfig\");\r\n this.privProperties = speechConfigImpl.properties.clone();\r\n\r\n Contracts.throwIfNullOrWhitespace(speechConfigImpl.properties.getProperty(PropertyId.SpeechServiceConnection_RecoLanguage), PropertyId[PropertyId.SpeechServiceConnection_RecoLanguage]);\r\n\r\n }\r\n\r\n /**\r\n * The event recognizing signals that an intermediate recognition result is received.\r\n * @member SpeechRecognizer.prototype.recognizing\r\n * @function\r\n * @public\r\n */\r\n public recognizing: (sender: Recognizer, event: SpeechRecognitionEventArgs) => void;\r\n\r\n /**\r\n * The event recognized signals that a final recognition result is received.\r\n * @member SpeechRecognizer.prototype.recognized\r\n * @function\r\n * @public\r\n */\r\n public recognized: (sender: Recognizer, event: SpeechRecognitionEventArgs) => void;\r\n\r\n /**\r\n * The event canceled signals that an error occurred during recognition.\r\n * @member SpeechRecognizer.prototype.canceled\r\n * @function\r\n * @public\r\n */\r\n public canceled: (sender: Recognizer, event: SpeechRecognitionCanceledEventArgs) => void;\r\n\r\n /**\r\n * Gets the endpoint id of a customized speech model that is used for speech recognition.\r\n * @member SpeechRecognizer.prototype.endpointId\r\n * @function\r\n * @public\r\n * @returns {string} the endpoint id of a customized speech model that is used for speech recognition.\r\n */\r\n public get endpointId(): string {\r\n Contracts.throwIfDisposed(this.disposedSpeechRecognizer);\r\n\r\n return this.properties.getProperty(PropertyId.SpeechServiceConnection_EndpointId, \"00000000-0000-0000-0000-000000000000\");\r\n }\r\n\r\n /**\r\n * Sets the authorization token used to communicate with the service.\r\n * @member SpeechRecognizer.prototype.authorizationToken\r\n * @function\r\n * @public\r\n * @param {string} token - Authorization token.\r\n */\r\n public set authorizationToken(token: string) {\r\n Contracts.throwIfNullOrWhitespace(token, \"token\");\r\n this.properties.setProperty(PropertyId.SpeechServiceAuthorization_Token, token);\r\n }\r\n\r\n /**\r\n * Gets the authorization token used to communicate with the service.\r\n * @member SpeechRecognizer.prototype.authorizationToken\r\n * @function\r\n * @public\r\n * @returns {string} Authorization token.\r\n */\r\n public get authorizationToken(): string {\r\n return this.properties.getProperty(PropertyId.SpeechServiceAuthorization_Token);\r\n }\r\n\r\n /**\r\n * Gets the spoken language of recognition.\r\n * @member SpeechRecognizer.prototype.speechRecognitionLanguage\r\n * @function\r\n * @public\r\n * @returns {string} The spoken language of recognition.\r\n */\r\n public get speechRecognitionLanguage(): string {\r\n Contracts.throwIfDisposed(this.disposedSpeechRecognizer);\r\n\r\n return this.properties.getProperty(PropertyId.SpeechServiceConnection_RecoLanguage);\r\n }\r\n\r\n /**\r\n * Gets the output format of recognition.\r\n * @member SpeechRecognizer.prototype.outputFormat\r\n * @function\r\n * @public\r\n * @returns {OutputFormat} The output format of recognition.\r\n */\r\n public get outputFormat(): OutputFormat {\r\n Contracts.throwIfDisposed(this.disposedSpeechRecognizer);\r\n\r\n if (this.properties.getProperty(OutputFormatPropertyName, OutputFormat[OutputFormat.Simple]) === OutputFormat[OutputFormat.Simple]) {\r\n return OutputFormat.Simple;\r\n } else {\r\n return OutputFormat.Detailed;\r\n }\r\n }\r\n\r\n /**\r\n * The collection of properties and their values defined for this SpeechRecognizer.\r\n * @member SpeechRecognizer.prototype.properties\r\n * @function\r\n * @public\r\n * @returns {PropertyCollection} The collection of properties and their values defined for this SpeechRecognizer.\r\n */\r\n public get properties(): PropertyCollection {\r\n return this.privProperties;\r\n }\r\n\r\n /**\r\n * Starts speech recognition, and stops after the first utterance is recognized. The task returns the recognition text as result.\r\n * Note: RecognizeOnceAsync() returns when the first utterance has been recognized, so it is suitable only for single shot recognition\r\n * like command or query. For long-running recognition, use StartContinuousRecognitionAsync() instead.\r\n * @member SpeechRecognizer.prototype.recognizeOnceAsync\r\n * @function\r\n * @public\r\n * @param cb - Callback that received the SpeechRecognitionResult.\r\n * @param err - Callback invoked in case of an error.\r\n */\r\n public recognizeOnceAsync(cb?: (e: SpeechRecognitionResult) => void, err?: (e: string) => void): void {\r\n try {\r\n Contracts.throwIfDisposed(this.disposedSpeechRecognizer);\r\n\r\n this.implCloseExistingRecognizer();\r\n\r\n this.reco = this.implRecognizerSetup(\r\n RecognitionMode.Interactive,\r\n this.properties,\r\n this.audioConfig,\r\n new SpeechConnectionFactory());\r\n\r\n this.implRecognizerStart(this.reco, cb, err);\r\n } catch (error) {\r\n if (!!err) {\r\n if (error instanceof Error) {\r\n const typedError: Error = error as Error;\r\n err(typedError.name + \": \" + typedError.message);\r\n } else {\r\n err(error);\r\n }\r\n }\r\n }\r\n }\r\n\r\n /**\r\n * Starts speech recognition, until stopContinuousRecognitionAsync() is called.\r\n * User must subscribe to events to receive recognition results.\r\n * @member SpeechRecognizer.prototype.startContinuousRecognitionAsync\r\n * @function\r\n * @public\r\n * @param cb - Callback invoked once the recognition has started.\r\n * @param err - Callback invoked in case of an error.\r\n */\r\n public startContinuousRecognitionAsync(cb?: () => void, err?: (e: string) => void): void {\r\n try {\r\n Contracts.throwIfDisposed(this.disposedSpeechRecognizer);\r\n\r\n this.implCloseExistingRecognizer();\r\n\r\n this.reco = this.implRecognizerSetup(\r\n RecognitionMode.Conversation,\r\n this.properties,\r\n this.audioConfig,\r\n new SpeechConnectionFactory());\r\n\r\n this.implRecognizerStart(this.reco, undefined, undefined);\r\n\r\n // report result to promise.\r\n if (!!cb) {\r\n try {\r\n cb();\r\n } catch (e) {\r\n if (!!err) {\r\n err(e);\r\n }\r\n }\r\n cb = undefined;\r\n }\r\n } catch (error) {\r\n if (!!err) {\r\n if (error instanceof Error) {\r\n const typedError: Error = error as Error;\r\n err(typedError.name + \": \" + typedError.message);\r\n } else {\r\n err(error);\r\n }\r\n }\r\n }\r\n }\r\n\r\n /**\r\n * Stops continuous speech recognition.\r\n * @member SpeechRecognizer.prototype.stopContinuousRecognitionAsync\r\n * @function\r\n * @public\r\n * @param cb - Callback invoked once the recognition has stopped.\r\n * @param err - Callback invoked in case of an error.\r\n */\r\n public stopContinuousRecognitionAsync(cb?: () => void, err?: (e: string) => void): void {\r\n try {\r\n Contracts.throwIfDisposed(this.disposedSpeechRecognizer);\r\n\r\n this.implCloseExistingRecognizer();\r\n\r\n if (!!cb) {\r\n try {\r\n cb();\r\n } catch (e) {\r\n if (!!err) {\r\n err(e);\r\n }\r\n }\r\n }\r\n } catch (error) {\r\n if (!!err) {\r\n if (error instanceof Error) {\r\n const typedError: Error = error as Error;\r\n err(typedError.name + \": \" + typedError.message);\r\n } else {\r\n err(error);\r\n }\r\n }\r\n }\r\n }\r\n\r\n /**\r\n * Starts speech recognition with keyword spotting, until stopKeywordRecognitionAsync() is called.\r\n * User must subscribe to events to receive recognition results.\r\n * Note: Key word spotting functionality is only available on the Speech Devices SDK. This functionality is currently not included in the SDK itself.\r\n * @member SpeechRecognizer.prototype.startKeywordRecognitionAsync\r\n * @function\r\n * @public\r\n * @param {KeywordRecognitionModel} model The keyword recognition model that specifies the keyword to be recognized.\r\n * @param cb - Callback invoked once the recognition has started.\r\n * @param err - Callback invoked in case of an error.\r\n */\r\n public startKeywordRecognitionAsync(model: KeywordRecognitionModel, cb?: () => void, err?: (e: string) => void): void {\r\n Contracts.throwIfNull(model, \"model\");\r\n\r\n if (!!err) {\r\n err(\"Not yet implemented.\");\r\n }\r\n }\r\n\r\n /**\r\n * Stops continuous speech recognition.\r\n * Note: Key word spotting functionality is only available on the Speech Devices SDK. This functionality is currently not included in the SDK itself.\r\n * @member SpeechRecognizer.prototype.stopKeywordRecognitionAsync\r\n * @function\r\n * @public\r\n * @param cb - Callback invoked once the recognition has stopped.\r\n * @param err - Callback invoked in case of an error.\r\n */\r\n public stopKeywordRecognitionAsync(cb?: () => void, err?: (e: string) => void): void {\r\n if (!!cb) {\r\n cb();\r\n }\r\n }\r\n\r\n /**\r\n * closes all external resources held by an instance of this class.\r\n * @member SpeechRecognizer.prototype.close\r\n * @function\r\n * @public\r\n */\r\n public close(): void {\r\n Contracts.throwIfDisposed(this.disposedSpeechRecognizer);\r\n\r\n this.dispose(true);\r\n }\r\n\r\n /**\r\n * Disposes any resources held by the object.\r\n * @member SpeechRecognizer.prototype.dispose\r\n * @function\r\n * @public\r\n * @param {boolean} disposing - true if disposing the object.\r\n */\r\n protected dispose(disposing: boolean): void {\r\n if (this.disposedSpeechRecognizer) {\r\n return;\r\n }\r\n\r\n if (disposing) {\r\n this.implCloseExistingRecognizer();\r\n this.disposedSpeechRecognizer = true;\r\n }\r\n\r\n super.dispose(disposing);\r\n }\r\n\r\n protected CreateRecognizerConfig(speechConfig: PlatformConfig, recognitionMode: RecognitionMode): RecognizerConfig {\r\n return new RecognizerConfig(\r\n speechConfig,\r\n recognitionMode,\r\n this.properties);\r\n }\r\n\r\n protected CreateServiceRecognizer(authentication: IAuthentication, connectionFactory: IConnectionFactory, audioConfig: AudioConfig, recognizerConfig: RecognizerConfig): ServiceRecognizerBase {\r\n const configImpl: AudioConfigImpl = audioConfig as AudioConfigImpl;\r\n return new SpeechServiceRecognizer(authentication, connectionFactory, configImpl, recognizerConfig, this);\r\n }\r\n\r\n // tslint:disable-next-line:member-ordering\r\n private reco: ServiceRecognizerBase;\r\n\r\n private implCloseExistingRecognizer(): void {\r\n if (this.reco) {\r\n this.reco.AudioSource.TurnOff();\r\n this.reco.Dispose();\r\n this.reco = undefined;\r\n }\r\n }\r\n}\r\n\n\n\n// WEBPACK FOOTER //\n// ../src/sdk/SpeechRecognizer.ts","//\r\n// copyright (c) Microsoft. All rights reserved.\r\n// See https://aka.ms/csspeech/license201809 for the full license information.\r\n//\r\n\r\nimport {\r\n AddedLmIntent,\r\n IAuthentication,\r\n IConnectionFactory,\r\n IntentConnectionFactory,\r\n IntentServiceRecognizer,\r\n PlatformConfig,\r\n RecognitionMode,\r\n RecognizerConfig,\r\n ServiceRecognizerBase,\r\n} from \"../common.speech/Exports\";\r\nimport { AudioConfigImpl } from \"./Audio/AudioConfig\";\r\nimport { Contracts } from \"./Contracts\";\r\nimport {\r\n AudioConfig,\r\n IntentRecognitionCanceledEventArgs,\r\n IntentRecognitionEventArgs,\r\n IntentRecognitionResult,\r\n KeywordRecognitionModel,\r\n LanguageUnderstandingModel,\r\n PropertyCollection,\r\n PropertyId,\r\n Recognizer,\r\n SpeechConfig,\r\n} from \"./Exports\";\r\nimport { LanguageUnderstandingModelImpl } from \"./LanguageUnderstandingModel\";\r\nimport { SpeechConfigImpl } from \"./SpeechConfig\";\r\n\r\n/**\r\n * Intent recognizer.\r\n * @class\r\n */\r\nexport class IntentRecognizer extends Recognizer {\r\n private disposedIntentRecognizer: boolean;\r\n private privProperties: PropertyCollection;\r\n private reco: ServiceRecognizerBase;\r\n\r\n private addedIntents: string[][];\r\n private addedLmIntents: { [id: string]: AddedLmIntent; };\r\n private intentDataSent: boolean;\r\n private umbrellaIntent: AddedLmIntent;\r\n\r\n /**\r\n * Initializes an instance of the IntentRecognizer.\r\n * @constructor\r\n * @param {SpeechConfig} speechConfig - The set of configuration properties.\r\n * @param {AudioConfig} audioConfig - An optional audio input config associated with the recognizer\r\n */\r\n public constructor(speechConfig: SpeechConfig, audioConfig?: AudioConfig) {\r\n Contracts.throwIfNullOrUndefined(speechConfig, \"speechConfig\");\r\n const configImpl: SpeechConfigImpl = speechConfig as SpeechConfigImpl;\r\n Contracts.throwIfNullOrUndefined(configImpl, \"speechConfig\");\r\n\r\n super(audioConfig);\r\n this.intentDataSent = false;\r\n this.addedIntents = [];\r\n this.addedLmIntents = {};\r\n\r\n this.disposedIntentRecognizer = false;\r\n this.privProperties = configImpl.properties;\r\n\r\n Contracts.throwIfNullOrWhitespace(this.properties.getProperty(PropertyId.SpeechServiceConnection_RecoLanguage), PropertyId[PropertyId.SpeechServiceConnection_RecoLanguage]);\r\n }\r\n\r\n /**\r\n * The event recognizing signals that an intermediate recognition result is received.\r\n * @member IntentRecognizer.prototype.recognizing\r\n * @function\r\n * @public\r\n */\r\n public recognizing: (sender: IntentRecognizer, event: IntentRecognitionEventArgs) => void;\r\n\r\n /**\r\n * The event recognized signals that a final recognition result is received.\r\n * @member IntentRecognizer.prototype.recognized\r\n * @function\r\n * @public\r\n */\r\n public recognized: (sender: IntentRecognizer, event: IntentRecognitionEventArgs) => void;\r\n\r\n /**\r\n * The event canceled signals that an error occurred during recognition.\r\n * @member IntentRecognizer.prototype.canceled\r\n * @function\r\n * @public\r\n */\r\n public canceled: (sender: IntentRecognizer, event: IntentRecognitionCanceledEventArgs) => void;\r\n\r\n /**\r\n * Gets the spoken language of recognition.\r\n * @member IntentRecognizer.prototype.speechRecognitionLanguage\r\n * @function\r\n * @public\r\n * @returns {string} the spoken language of recognition.\r\n */\r\n public get speechRecognitionLanguage(): string {\r\n Contracts.throwIfDisposed(this.disposedIntentRecognizer);\r\n\r\n return this.properties.getProperty(PropertyId.SpeechServiceConnection_RecoLanguage);\r\n }\r\n\r\n /**\r\n * Gets the authorization token used to communicate with the service.\r\n * @member IntentRecognizer.prototype.authorizationToken\r\n * @function\r\n * @public\r\n * @returns {string} Authorization token.\r\n */\r\n public get authorizationToken(): string {\r\n return this.properties.getProperty(PropertyId.SpeechServiceAuthorization_Token);\r\n }\r\n\r\n /**\r\n * Sets the authorization token used to communicate with the service.\r\n * @member IntentRecognizer.prototype.authorizationToken\r\n * @function\r\n * @public\r\n * @param {string} value - Authorization token.\r\n */\r\n public set authorizationToken(value: string) {\r\n this.properties.setProperty(PropertyId.SpeechServiceAuthorization_Token, value);\r\n }\r\n\r\n /**\r\n * The collection of properties and their values defined for this IntentRecognizer.\r\n * @member IntentRecognizer.prototype.properties\r\n * @function\r\n * @public\r\n * @returns {PropertyCollection} The collection of properties and their values defined for this IntentRecognizer.\r\n */\r\n public get properties(): PropertyCollection {\r\n return this.privProperties;\r\n }\r\n\r\n /**\r\n * Starts intent recognition, and stops after the first utterance is recognized. The task returns the recognition text and intent as result.\r\n * Note: RecognizeOnceAsync() returns when the first utterance has been recognized, so it is suitable only for single shot recognition like command or query. For long-running recognition, use StartContinuousRecognitionAsync() instead.\r\n * @member IntentRecognizer.prototype.recognizeOnceAsync\r\n * @function\r\n * @public\r\n * @param cb - Callback that received the recognition has finished with an IntentRecognitionResult.\r\n * @param err - Callback invoked in case of an error.\r\n */\r\n public recognizeOnceAsync(cb?: (e: IntentRecognitionResult) => void, err?: (e: string) => void): void {\r\n try {\r\n Contracts.throwIfDisposed(this.disposedIntentRecognizer);\r\n\r\n this.implCloseExistingRecognizer();\r\n\r\n let contextJson: string;\r\n\r\n if (Object.keys(this.addedLmIntents).length !== 0 || undefined !== this.umbrellaIntent) {\r\n contextJson = this.buildSpeechContext();\r\n this.intentDataSent = true;\r\n }\r\n\r\n this.reco = this.implRecognizerSetup(\r\n RecognitionMode.Interactive,\r\n this.properties,\r\n this.audioConfig,\r\n new IntentConnectionFactory());\r\n\r\n const intentReco: IntentServiceRecognizer = this.reco as IntentServiceRecognizer;\r\n intentReco.setIntents(this.addedLmIntents, this.umbrellaIntent);\r\n\r\n this.implRecognizerStart(this.reco, cb, err, contextJson);\r\n\r\n } catch (error) {\r\n if (!!err) {\r\n if (error instanceof Error) {\r\n const typedError: Error = error as Error;\r\n err(typedError.name + \": \" + typedError.message);\r\n } else {\r\n err(error);\r\n }\r\n }\r\n }\r\n }\r\n\r\n /**\r\n * Starts speech recognition, until stopContinuousRecognitionAsync() is called.\r\n * User must subscribe to events to receive recognition results.\r\n * @member IntentRecognizer.prototype.startContinuousRecognitionAsync\r\n * @function\r\n * @public\r\n * @param cb - Callback invoked once the recognition has started.\r\n * @param err - Callback invoked in case of an error.\r\n */\r\n public startContinuousRecognitionAsync(cb?: () => void, err?: (e: string) => void): void {\r\n try {\r\n Contracts.throwIfDisposed(this.disposedIntentRecognizer);\r\n\r\n this.implCloseExistingRecognizer();\r\n\r\n let contextJson: string;\r\n\r\n if (Object.keys(this.addedLmIntents).length !== 0) {\r\n contextJson = this.buildSpeechContext();\r\n this.intentDataSent = true;\r\n }\r\n\r\n this.reco = this.implRecognizerSetup(\r\n RecognitionMode.Conversation,\r\n this.properties,\r\n this.audioConfig,\r\n new IntentConnectionFactory());\r\n\r\n const intentReco: IntentServiceRecognizer = this.reco as IntentServiceRecognizer;\r\n intentReco.setIntents(this.addedLmIntents, this.umbrellaIntent);\r\n\r\n this.implRecognizerStart(this.reco, undefined, undefined, contextJson);\r\n\r\n // report result to promise.\r\n if (!!cb) {\r\n try {\r\n cb();\r\n } catch (e) {\r\n if (!!err) {\r\n err(e);\r\n }\r\n }\r\n cb = undefined;\r\n }\r\n } catch (error) {\r\n if (!!err) {\r\n if (error instanceof Error) {\r\n const typedError: Error = error as Error;\r\n err(typedError.name + \": \" + typedError.message);\r\n } else {\r\n err(error);\r\n }\r\n }\r\n }\r\n }\r\n\r\n /**\r\n * Stops continuous intent recognition.\r\n * @member IntentRecognizer.prototype.stopContinuousRecognitionAsync\r\n * @function\r\n * @public\r\n * @param cb - Callback invoked once the recognition has stopped.\r\n * @param err - Callback invoked in case of an error.\r\n */\r\n public stopContinuousRecognitionAsync(cb?: () => void, err?: (e: string) => void): void {\r\n try {\r\n Contracts.throwIfDisposed(this.disposedIntentRecognizer);\r\n\r\n this.implCloseExistingRecognizer();\r\n\r\n if (!!cb) {\r\n try {\r\n cb();\r\n } catch (e) {\r\n if (!!err) {\r\n err(e);\r\n }\r\n }\r\n }\r\n } catch (error) {\r\n if (!!err) {\r\n if (error instanceof Error) {\r\n const typedError: Error = error as Error;\r\n err(typedError.name + \": \" + typedError.message);\r\n } else {\r\n err(error);\r\n }\r\n }\r\n }\r\n }\r\n\r\n /**\r\n * Starts speech recognition with keyword spotting, until stopKeywordRecognitionAsync() is called.\r\n * User must subscribe to events to receive recognition results.\r\n * Note: Key word spotting functionality is only available on the Speech Devices SDK. This functionality is currently not included in the SDK itself.\r\n * @member IntentRecognizer.prototype.startKeywordRecognitionAsync\r\n * @function\r\n * @public\r\n * @param {KeywordRecognitionModel} model - The keyword recognition model that specifies the keyword to be recognized.\r\n * @param cb - Callback invoked once the recognition has started.\r\n * @param err - Callback invoked in case of an error.\r\n */\r\n public startKeywordRecognitionAsync(model: KeywordRecognitionModel, cb?: () => void, err?: (e: string) => void): void {\r\n Contracts.throwIfNull(model, \"model\");\r\n\r\n if (!!err) {\r\n err(\"Not yet implemented.\");\r\n }\r\n }\r\n\r\n /**\r\n * Stops continuous speech recognition.\r\n * Note: Key word spotting functionality is only available on the Speech Devices SDK. This functionality is currently not included in the SDK itself.\r\n * @member IntentRecognizer.prototype.stopKeywordRecognitionAsync\r\n * @function\r\n * @public\r\n * @param cb - Callback invoked once the recognition has stopped.\r\n * @param err - Callback invoked in case of an error.\r\n */\r\n public stopKeywordRecognitionAsync(cb?: () => void, err?: (e: string) => void): void {\r\n if (!!cb) {\r\n cb();\r\n }\r\n }\r\n\r\n /**\r\n * Adds a phrase that should be recognized as intent.\r\n * @member IntentRecognizer.prototype.addIntent\r\n * @function\r\n * @public\r\n * @param {string} intentId - A String that represents the identifier of the intent to be recognized.\r\n * @param {string} phrase - A String that specifies the phrase representing the intent.\r\n */\r\n public addIntent(simplePhrase: string, intentId?: string): void {\r\n Contracts.throwIfDisposed(this.disposedIntentRecognizer);\r\n Contracts.throwIfNullOrWhitespace(intentId, \"intentId\");\r\n Contracts.throwIfNullOrWhitespace(simplePhrase, \"simplePhrase\");\r\n\r\n this.addedIntents.push([intentId, simplePhrase]);\r\n }\r\n\r\n /**\r\n * Adds an intent from Language Understanding service for recognition.\r\n * @member IntentRecognizer.prototype.addIntentWithLanguageModel\r\n * @function\r\n * @public\r\n * @param {string} intentId - A String that represents the identifier of the intent to be recognized. Ignored if intentName is empty.\r\n * @param {string} model - The intent model from Language Understanding service.\r\n * @param {string} intentName - The intent name defined in the intent model. If it is empty, all intent names defined in the model will be added.\r\n */\r\n public addIntentWithLanguageModel(intentId: string, model: LanguageUnderstandingModel, intentName?: string): void {\r\n Contracts.throwIfDisposed(this.disposedIntentRecognizer);\r\n Contracts.throwIfNullOrWhitespace(intentId, \"intentId\");\r\n Contracts.throwIfNull(model, \"model\");\r\n\r\n const modelImpl: LanguageUnderstandingModelImpl = model as LanguageUnderstandingModelImpl;\r\n Contracts.throwIfNullOrWhitespace(modelImpl.appId, \"model.appId\");\r\n\r\n this.addedLmIntents[intentId] = new AddedLmIntent(modelImpl, intentName);\r\n }\r\n\r\n /**\r\n * @summary Adds all intents from the specified Language Understanding Model.\r\n * @member IntentRecognizer.prototype.addAllIntents\r\n * @function\r\n * @public\r\n * @function\r\n * @public\r\n * @param {LanguageUnderstandingModel} model - The language understanding model containing the intents.\r\n * @param {string} intentId - A custom id String to be returned in the IntentRecognitionResult's getIntentId() method.\r\n */\r\n public addAllIntents(model: LanguageUnderstandingModel, intentId?: string): void {\r\n Contracts.throwIfNull(model, \"model\");\r\n\r\n const modelImpl: LanguageUnderstandingModelImpl = model as LanguageUnderstandingModelImpl;\r\n Contracts.throwIfNullOrWhitespace(modelImpl.appId, \"model.appId\");\r\n\r\n this.umbrellaIntent = new AddedLmIntent(modelImpl, intentId);\r\n }\r\n\r\n /**\r\n * closes all external resources held by an instance of this class.\r\n * @member IntentRecognizer.prototype.close\r\n * @function\r\n * @public\r\n */\r\n public close(): void {\r\n Contracts.throwIfDisposed(this.disposedIntentRecognizer);\r\n\r\n this.dispose(true);\r\n }\r\n\r\n protected CreateRecognizerConfig(speecgConfig: PlatformConfig, recognitionMode: RecognitionMode): RecognizerConfig {\r\n return new RecognizerConfig(speecgConfig, recognitionMode, this.properties);\r\n }\r\n protected CreateServiceRecognizer(authentication: IAuthentication, connectionFactory: IConnectionFactory, audioConfig: AudioConfig, recognizerConfig: RecognizerConfig): ServiceRecognizerBase {\r\n const audioImpl: AudioConfigImpl = audioConfig as AudioConfigImpl;\r\n return new IntentServiceRecognizer(authentication, connectionFactory, audioImpl, recognizerConfig, this, this.intentDataSent);\r\n }\r\n\r\n protected dispose(disposing: boolean): void {\r\n if (this.disposedIntentRecognizer) {\r\n return;\r\n }\r\n\r\n if (disposing) {\r\n this.disposedIntentRecognizer = true;\r\n super.dispose(disposing);\r\n }\r\n }\r\n\r\n private implCloseExistingRecognizer(): void {\r\n if (this.reco) {\r\n this.reco.AudioSource.TurnOff();\r\n this.reco.Dispose();\r\n this.reco = undefined;\r\n }\r\n }\r\n\r\n private buildSpeechContext(): string {\r\n let appId: string;\r\n let region: string;\r\n let subscriptionKey: string;\r\n const refGrammers: string[] = [];\r\n\r\n if (undefined !== this.umbrellaIntent) {\r\n appId = this.umbrellaIntent.modelImpl.appId;\r\n region = this.umbrellaIntent.modelImpl.region;\r\n subscriptionKey = this.umbrellaIntent.modelImpl.subscriptionKey;\r\n }\r\n\r\n // Build the reference grammer array.\r\n for (const intentId of Object.keys(this.addedLmIntents)) {\r\n const addedLmIntent: AddedLmIntent = this.addedLmIntents[intentId];\r\n\r\n // validate all the same model, region, and key...\r\n if (appId === undefined) {\r\n appId = addedLmIntent.modelImpl.appId;\r\n } else {\r\n if (appId !== addedLmIntent.modelImpl.appId) {\r\n throw new Error(\"Intents must all be from the same LUIS model\");\r\n }\r\n }\r\n\r\n if (region === undefined) {\r\n region = addedLmIntent.modelImpl.region;\r\n } else {\r\n if (region !== addedLmIntent.modelImpl.region) {\r\n throw new Error(\"Intents must all be from the same LUIS model in a single region\");\r\n }\r\n }\r\n\r\n if (subscriptionKey === undefined) {\r\n subscriptionKey = addedLmIntent.modelImpl.subscriptionKey;\r\n } else {\r\n if (subscriptionKey !== addedLmIntent.modelImpl.subscriptionKey) {\r\n throw new Error(\"Intents must all use the same subscription key\");\r\n }\r\n }\r\n\r\n const grammer: string = \"luis/\" + appId + \"-PRODUCTION#\" + intentId;\r\n refGrammers.push(grammer);\r\n }\r\n\r\n return JSON.stringify({\r\n dgi: {\r\n ReferenceGrammars: (undefined === this.umbrellaIntent) ? refGrammers : [\"luis/\" + appId + \"-PRODUCTION\"],\r\n },\r\n intent: {\r\n id: appId,\r\n key: (subscriptionKey === undefined) ? this.privProperties.getProperty(PropertyId[PropertyId.SpeechServiceConnection_Key]) : subscriptionKey,\r\n provider: \"LUIS\",\r\n },\r\n });\r\n }\r\n}\r\n\n\n\n// WEBPACK FOOTER //\n// ../src/sdk/IntentRecognizer.ts","//\r\n// copyright (c) Microsoft. All rights reserved.\r\n// See https://aka.ms/csspeech/license201809 for the full license information.\r\n//\r\n\r\nimport {\r\n IAuthentication,\r\n IConnectionFactory,\r\n PlatformConfig,\r\n RecognitionMode,\r\n RecognizerConfig,\r\n ServiceRecognizerBase,\r\n TranslationConnectionFactory,\r\n TranslationServiceRecognizer,\r\n} from \"../common.speech/Exports\";\r\nimport { AudioConfigImpl } from \"./Audio/AudioConfig\";\r\nimport { Contracts } from \"./Contracts\";\r\nimport {\r\n AudioConfig,\r\n PropertyCollection,\r\n PropertyId,\r\n Recognizer,\r\n TranslationRecognitionCanceledEventArgs,\r\n TranslationRecognitionEventArgs,\r\n TranslationRecognitionResult,\r\n TranslationSynthesisEventArgs,\r\n} from \"./Exports\";\r\nimport { SpeechTranslationConfig, SpeechTranslationConfigImpl } from \"./SpeechTranslationConfig\";\r\n\r\n/**\r\n * Translation recognizer\r\n * @class TranslationRecognizer\r\n */\r\nexport class TranslationRecognizer extends Recognizer {\r\n private disposedTranslationRecognizer: boolean;\r\n private privProperties: PropertyCollection;\r\n\r\n /**\r\n * Initializes an instance of the TranslationRecognizer.\r\n * @constructor\r\n * @param {SpeechTranslationConfig} speechConfig - Set of properties to configure this recognizer.\r\n * @param {AudioConfig} audioConfig - An optional audio config associated with the recognizer\r\n */\r\n public constructor(speechConfig: SpeechTranslationConfig, audioConfig?: AudioConfig) {\r\n const configImpl = speechConfig as SpeechTranslationConfigImpl;\r\n Contracts.throwIfNull(configImpl, \"speechConfig\");\r\n\r\n super(audioConfig);\r\n\r\n this.disposedTranslationRecognizer = false;\r\n this.privProperties = configImpl.properties.clone();\r\n\r\n if (this.properties.getProperty(PropertyId.SpeechServiceConnection_TranslationVoice, undefined) !== undefined) {\r\n Contracts.throwIfNullOrWhitespace(this.properties.getProperty(PropertyId.SpeechServiceConnection_TranslationVoice), PropertyId[PropertyId.SpeechServiceConnection_TranslationVoice]);\r\n }\r\n\r\n Contracts.throwIfNullOrWhitespace(this.properties.getProperty(PropertyId.SpeechServiceConnection_TranslationToLanguages), PropertyId[PropertyId.SpeechServiceConnection_TranslationToLanguages]);\r\n Contracts.throwIfNullOrWhitespace(this.properties.getProperty(PropertyId.SpeechServiceConnection_RecoLanguage), PropertyId[PropertyId.SpeechServiceConnection_RecoLanguage]);\r\n }\r\n\r\n /**\r\n * The event recognizing signals that an intermediate recognition result is received.\r\n * @member TranslationRecognizer.prototype.recognizing\r\n * @function\r\n * @public\r\n */\r\n public recognizing: (sender: TranslationRecognizer, event: TranslationRecognitionEventArgs) => void;\r\n\r\n /**\r\n * The event recognized signals that a final recognition result is received.\r\n * @member TranslationRecognizer.prototype.recognized\r\n * @function\r\n * @public\r\n */\r\n public recognized: (sender: TranslationRecognizer, event: TranslationRecognitionEventArgs) => void;\r\n\r\n /**\r\n * The event canceled signals that an error occurred during recognition.\r\n * @member TranslationRecognizer.prototype.canceled\r\n * @function\r\n * @public\r\n */\r\n public canceled: (sender: TranslationRecognizer, event: TranslationRecognitionCanceledEventArgs) => void;\r\n\r\n /**\r\n * The event synthesizing signals that a translation synthesis result is received.\r\n * @member TranslationRecognizer.prototype.synthesizing\r\n * @function\r\n * @public\r\n */\r\n public synthesizing: (sender: TranslationRecognizer, event: TranslationSynthesisEventArgs) => void;\r\n\r\n /**\r\n * Gets the language name that was set when the recognizer was created.\r\n * @member TranslationRecognizer.prototype.speechRecognitionLanguage\r\n * @function\r\n * @public\r\n * @returns {string} Gets the language name that was set when the recognizer was created.\r\n */\r\n public get speechRecognitionLanguage(): string {\r\n Contracts.throwIfDisposed(this.disposedTranslationRecognizer);\r\n\r\n return this.properties.getProperty(PropertyId.SpeechServiceConnection_RecoLanguage);\r\n }\r\n\r\n /**\r\n * Gets target languages for translation that were set when the recognizer was created.\r\n * The language is specified in BCP-47 format. The translation will provide translated text for each of language.\r\n * @member TranslationRecognizer.prototype.targetLanguages\r\n * @function\r\n * @public\r\n * @returns {string[]} Gets target languages for translation that were set when the recognizer was created.\r\n */\r\n public get targetLanguages(): string[] {\r\n Contracts.throwIfDisposed(this.disposedTranslationRecognizer);\r\n\r\n return this.properties.getProperty(PropertyId.SpeechServiceConnection_TranslationToLanguages).split(\",\");\r\n }\r\n\r\n /**\r\n * Gets the name of output voice.\r\n * @member TranslationRecognizer.prototype.voiceName\r\n * @function\r\n * @public\r\n * @returns {string} the name of output voice.\r\n */\r\n public get voiceName(): string {\r\n Contracts.throwIfDisposed(this.disposedTranslationRecognizer);\r\n\r\n return this.properties.getProperty(PropertyId.SpeechServiceConnection_TranslationVoice, undefined);\r\n }\r\n\r\n /**\r\n * Gets the authorization token used to communicate with the service.\r\n * @member TranslationRecognizer.prototype.authorizationToken\r\n * @function\r\n * @public\r\n * @returns {string} Authorization token.\r\n */\r\n public get authorizationToken(): string {\r\n return this.properties.getProperty(PropertyId.SpeechServiceAuthorization_Token);\r\n }\r\n\r\n /**\r\n * Sets the authorization token used to communicate with the service.\r\n * @member TranslationRecognizer.prototype.authorizationToken\r\n * @function\r\n * @public\r\n * @param {string} value - Authorization token.\r\n */\r\n public set authorizationToken(value: string) {\r\n this.properties.setProperty(PropertyId.SpeechServiceAuthorization_Token, value);\r\n }\r\n\r\n /**\r\n * The collection of properties and their values defined for this TranslationRecognizer.\r\n * @member TranslationRecognizer.prototype.properties\r\n * @function\r\n * @public\r\n * @returns {PropertyCollection} The collection of properties and their values defined for this TranslationRecognizer.\r\n */\r\n public get properties(): PropertyCollection {\r\n return this.privProperties;\r\n }\r\n\r\n /**\r\n * Starts recognition and translation, and stops after the first utterance is recognized. The task returns the translation text as result.\r\n * Note: recognizeOnceAsync returns when the first utterance has been recognized, so it is suitableonly\r\n * for single shot recognition like command or query. For long-running recognition, use startContinuousRecognitionAsync() instead.\r\n * @member TranslationRecognizer.prototype.recognizeOnceAsync\r\n * @function\r\n * @public\r\n * @param cb - Callback that received the result when the translation has completed.\r\n * @param err - Callback invoked in case of an error.\r\n */\r\n public recognizeOnceAsync(cb?: (e: TranslationRecognitionResult) => void, err?: (e: string) => void): void {\r\n try {\r\n Contracts.throwIfDisposed(this.disposedTranslationRecognizer);\r\n\r\n this.implCloseExistingRecognizer();\r\n\r\n this.reco = this.implRecognizerSetup(\r\n RecognitionMode.Conversation,\r\n this.properties,\r\n this.audioConfig,\r\n new TranslationConnectionFactory());\r\n\r\n this.implRecognizerStart(\r\n this.reco,\r\n cb,\r\n err);\r\n } catch (error) {\r\n if (!!err) {\r\n if (error instanceof Error) {\r\n const typedError: Error = error as Error;\r\n err(typedError.name + \": \" + typedError.message);\r\n } else {\r\n err(error);\r\n }\r\n }\r\n }\r\n }\r\n\r\n /**\r\n * Starts recognition and translation, until stopContinuousRecognitionAsync() is called.\r\n * User must subscribe to events to receive translation results.\r\n * @member TranslationRecognizer.prototype.startContinuousRecognitionAsync\r\n * @function\r\n * @public\r\n * @param cb - Callback that received the translation has started.\r\n * @param err - Callback invoked in case of an error.\r\n */\r\n public startContinuousRecognitionAsync(cb?: () => void, err?: (e: string) => void): void {\r\n try {\r\n Contracts.throwIfDisposed(this.disposedTranslationRecognizer);\r\n\r\n this.implCloseExistingRecognizer();\r\n\r\n this.reco = this.implRecognizerSetup(\r\n RecognitionMode.Conversation,\r\n this.properties,\r\n this.audioConfig,\r\n new TranslationConnectionFactory());\r\n\r\n this.implRecognizerStart(this.reco, undefined, undefined);\r\n\r\n // report result to promise.\r\n if (!!cb) {\r\n try {\r\n cb();\r\n } catch (e) {\r\n if (!!err) {\r\n err(e);\r\n }\r\n }\r\n cb = undefined;\r\n }\r\n } catch (error) {\r\n if (!!err) {\r\n if (error instanceof Error) {\r\n const typedError: Error = error as Error;\r\n err(typedError.name + \": \" + typedError.message);\r\n } else {\r\n err(error);\r\n }\r\n }\r\n }\r\n }\r\n\r\n /**\r\n * Stops continuous recognition and translation.\r\n * @member TranslationRecognizer.prototype.stopContinuousRecognitionAsync\r\n * @function\r\n * @public\r\n * @param cb - Callback that received the translation has stopped.\r\n * @param err - Callback invoked in case of an error.\r\n */\r\n public stopContinuousRecognitionAsync(cb?: () => void, err?: (e: string) => void): void {\r\n try {\r\n Contracts.throwIfDisposed(this.disposedTranslationRecognizer);\r\n\r\n this.implCloseExistingRecognizer();\r\n\r\n if (!!cb) {\r\n try {\r\n cb();\r\n } catch (e) {\r\n if (!!err) {\r\n err(e);\r\n }\r\n }\r\n }\r\n } catch (error) {\r\n if (!!err) {\r\n if (error instanceof Error) {\r\n const typedError: Error = error as Error;\r\n err(typedError.name + \": \" + typedError.message);\r\n } else {\r\n err(error);\r\n }\r\n }\r\n }\r\n }\r\n\r\n /**\r\n * closes all external resources held by an instance of this class.\r\n * @member TranslationRecognizer.prototype.close\r\n * @function\r\n * @public\r\n */\r\n public close(): void {\r\n Contracts.throwIfDisposed(this.disposedTranslationRecognizer);\r\n\r\n this.dispose(true);\r\n }\r\n\r\n protected dispose(disposing: boolean): boolean {\r\n if (this.disposedTranslationRecognizer) {\r\n return;\r\n }\r\n\r\n if (disposing) {\r\n this.implCloseExistingRecognizer();\r\n this.disposedTranslationRecognizer = true;\r\n super.dispose(disposing);\r\n }\r\n }\r\n\r\n protected CreateRecognizerConfig(speechConfig: PlatformConfig, recognitionMode: RecognitionMode): RecognizerConfig {\r\n return new RecognizerConfig(speechConfig, RecognitionMode.Conversation, this.properties);\r\n }\r\n\r\n protected CreateServiceRecognizer(authentication: IAuthentication, connectionFactory: IConnectionFactory, audioConfig: AudioConfig, recognizerConfig: RecognizerConfig): ServiceRecognizerBase {\r\n\r\n const configImpl: AudioConfigImpl = audioConfig as AudioConfigImpl;\r\n\r\n return new TranslationServiceRecognizer(authentication, connectionFactory, configImpl, recognizerConfig, this);\r\n }\r\n\r\n // tslint:disable-next-line:member-ordering\r\n private reco: ServiceRecognizerBase;\r\n\r\n private implCloseExistingRecognizer(): void {\r\n if (this.reco) {\r\n this.reco.AudioSource.TurnOff();\r\n this.reco.Dispose();\r\n this.reco = undefined;\r\n }\r\n }\r\n}\r\n\n\n\n// WEBPACK FOOTER //\n// ../src/sdk/TranslationRecognizer.ts","//\r\n// copyright (c) Microsoft. All rights reserved.\r\n// See https://aka.ms/csspeech/license201809 for the full license information.\r\n//\r\n\r\nimport { PropertyCollection } from \"./Exports\";\r\n\r\n/**\r\n * Represents collection of parameters and their values.\r\n * @class Translation\r\n */\r\nexport class Translations {\r\n // Use an PropertyCollection internally, just wrapping it to hide the | enum syntax it has.\r\n private map: PropertyCollection = new PropertyCollection();\r\n\r\n /**\r\n * Returns the parameter value in type String. The parameter must have the same type as String.\r\n * Currently only String, int and bool are allowed.\r\n * If the name is not available, the specified defaultValue is returned.\r\n * @member Translation.prototype.get\r\n * @function\r\n * @public\r\n * @param {string} key - The parameter name.\r\n * @param {string} def - The default value which is returned if the parameter is not available in the collection.\r\n * @returns {string} value of the parameter.\r\n */\r\n public get(key: string, def?: string): string {\r\n return this.map.getProperty(key, def);\r\n }\r\n\r\n /**\r\n * Sets the String value of the parameter specified by name.\r\n * @member Translation.prototype.set\r\n * @function\r\n * @public\r\n * @param {string} key - The parameter name.\r\n * @param {string} value - The value of the parameter.\r\n */\r\n public set(key: string, value: string): void {\r\n this.map.setProperty(key, value);\r\n }\r\n}\r\n\n\n\n// WEBPACK FOOTER //\n// ../src/sdk/Translations.ts","//\r\n// Copyright (c) Microsoft. All rights reserved.\r\n// See https://aka.ms/csspeech/license201809 for the full license information.\r\n//\r\n\r\n/**\r\n * Defines the possible reasons a recognition result might not be recognized.\r\n * @class NoMatchReason\r\n */\r\nexport enum NoMatchReason {\r\n\r\n /**\r\n * Indicates that speech was detected, but not recognized.\r\n * @member NoMatchReason.NotRecognized\r\n */\r\n NotRecognized,\r\n\r\n /**\r\n * Indicates that the start of the audio stream contained only silence, and the service timed out waiting for speech.\r\n * @member NoMatchReason.InitialSilenceTimeout\r\n */\r\n InitialSilenceTimeout,\r\n\r\n /**\r\n * Indicates that the start of the audio stream contained only noise, and the service timed out waiting for speech.\r\n * @member NoMatchReason.InitialBabbleTimeout\r\n */\r\n InitialBabbleTimeout,\r\n}\r\n\n\n\n// WEBPACK FOOTER //\n// ../src/sdk/NoMatchReason.ts","//\r\n// Copyright (c) Microsoft. All rights reserved.\r\n// See https://aka.ms/csspeech/license201809 for the full license information.\r\n//\r\n\r\nimport {\r\n RecognitionStatus,\r\n SimpleSpeechPhrase,\r\n} from \"../../src/common.speech/Exports\";\r\nimport {\r\n IntentRecognitionResult,\r\n NoMatchReason,\r\n SpeechRecognitionResult,\r\n TranslationRecognitionResult,\r\n} from \"./Exports\";\r\n\r\n/**\r\n * Contains detailed information for NoMatch recognition results.\r\n * @class NoMatchDetails\r\n */\r\nexport class NoMatchDetails {\r\n private privReason: NoMatchReason;\r\n\r\n /**\r\n * Creates and initializes an instance of this class.\r\n * @constructor\r\n * @param {NoMatchReason} reason - The no-match reason.\r\n */\r\n private constructor(reason: NoMatchReason) {\r\n this.privReason = reason;\r\n }\r\n\r\n /**\r\n * Creates an instance of NoMatchDetails object for the NoMatch SpeechRecognitionResults.\r\n * @member NoMatchDetails.fromResult\r\n * @function\r\n * @public\r\n * @param {SpeechRecognitionResult | IntentRecognitionResult | TranslationRecognitionResult} result - The recognition result that was not recognized.\r\n * @returns {NoMatchDetails} The no match details object being created.\r\n */\r\n public static fromResult(result: SpeechRecognitionResult | IntentRecognitionResult | TranslationRecognitionResult): NoMatchDetails {\r\n const simpleSpeech: SimpleSpeechPhrase = SimpleSpeechPhrase.FromJSON(result.json);\r\n\r\n let reason: NoMatchReason = NoMatchReason.NotRecognized;\r\n\r\n switch (simpleSpeech.RecognitionStatus) {\r\n case RecognitionStatus.BabbleTimeout:\r\n reason = NoMatchReason.InitialBabbleTimeout;\r\n break;\r\n case RecognitionStatus.InitialSilenceTimeout:\r\n reason = NoMatchReason.InitialSilenceTimeout;\r\n break;\r\n default:\r\n reason = NoMatchReason.NotRecognized;\r\n break;\r\n }\r\n\r\n return new NoMatchDetails(reason);\r\n }\r\n\r\n /**\r\n * The reason the recognition was canceled.\r\n * @member NoMatchDetails.prototype.reason\r\n * @function\r\n * @public\r\n * @returns {NoMatchReason} Specifies the reason canceled.\r\n */\r\n public get reason(): NoMatchReason {\r\n return this.privReason;\r\n }\r\n}\r\n\n\n\n// WEBPACK FOOTER //\n// ../src/sdk/NoMatchDetails.ts","//\r\n// Copyright (c) Microsoft. All rights reserved.\r\n// See https://aka.ms/csspeech/license201809 for the full license information.\r\n//\r\n\r\nimport {\r\n CancellationErrorCode,\r\n CancellationReason,\r\n TranslationRecognitionResult,\r\n} from \"./Exports\";\r\n\r\n/**\r\n * Define payload of speech recognition canceled result events.\r\n * @class TranslationRecognitionCanceledEventArgs\r\n */\r\nexport class TranslationRecognitionCanceledEventArgs {\r\n private privResult: TranslationRecognitionResult;\r\n private privSessionId: string;\r\n private privCancelReason: CancellationReason;\r\n private privErrorDetails: string;\r\n private privErrorCode: CancellationErrorCode;\r\n\r\n /**\r\n * Creates and initializes an instance of this class.\r\n * @constructor\r\n * @param {string} sessionid - The session id.\r\n * @param {CancellationReason} cancellationReason - The cancellation reason.\r\n * @param {string} errorDetails - Error details, if provided.\r\n * @param {TranslationRecognitionResult} result - The result.\r\n */\r\n public constructor(sessionid: string, cancellationReason: CancellationReason, errorDetails: string, errorCode: CancellationErrorCode, result: TranslationRecognitionResult) {\r\n this.privCancelReason = cancellationReason;\r\n this.privErrorDetails = errorDetails;\r\n this.privResult = result;\r\n this.privSessionId = sessionid;\r\n this.privErrorCode = errorCode;\r\n }\r\n\r\n /**\r\n * Specifies the recognition result.\r\n * @member TranslationRecognitionCanceledEventArgs.prototype.result\r\n * @function\r\n * @public\r\n * @returns {TranslationRecognitionResult} the recognition result.\r\n */\r\n public get result(): TranslationRecognitionResult {\r\n return this.privResult;\r\n }\r\n\r\n /**\r\n * Specifies the session identifier.\r\n * @member TranslationRecognitionCanceledEventArgs.prototype.sessionId\r\n * @function\r\n * @public\r\n * @returns {string} the session identifier.\r\n */\r\n public get sessionId(): string {\r\n return this.privSessionId;\r\n }\r\n\r\n /**\r\n * The reason the recognition was canceled.\r\n * @member TranslationRecognitionCanceledEventArgs.prototype.reason\r\n * @function\r\n * @public\r\n * @returns {CancellationReason} Specifies the reason canceled.\r\n */\r\n public get reason(): CancellationReason {\r\n return this.privCancelReason;\r\n }\r\n\r\n /**\r\n * The error code of why the cancellation occurred.\r\n * @return An error code that represents the error reason.\r\n * Added in version 1.1.0.\r\n */\r\n public get errorCode(): CancellationErrorCode {\r\n return this.privErrorCode;\r\n }\r\n\r\n /**\r\n * In case of an unsuccessful recognition, provides a details of why the occurred error.\r\n * This field is only filled-out if the reason canceled (@see getReason) is set to Error.\r\n * @member TranslationRecognitionCanceledEventArgs.prototype.errorDetails\r\n * @function\r\n * @public\r\n * @returns {string} A String that represents the error details.\r\n */\r\n public get errorDetails(): string {\r\n return this.privErrorDetails;\r\n }\r\n}\r\n\n\n\n// WEBPACK FOOTER //\n// ../src/sdk/TranslationRecognitionCanceledEventArgs.ts","//\r\n// Copyright (c) Microsoft. All rights reserved.\r\n// See https://aka.ms/csspeech/license201809 for the full license information.\r\n//\r\n\r\nimport {\r\n CancellationErrorCode,\r\n CancellationReason,\r\n IntentRecognitionEventArgs,\r\n IntentRecognitionResult,\r\n} from \"./Exports\";\r\n\r\n/**\r\n * Define payload of intent recognition canceled result events.\r\n * @class IntentRecognitionCanceledEventArgs\r\n */\r\nexport class IntentRecognitionCanceledEventArgs extends IntentRecognitionEventArgs {\r\n private privReason: CancellationReason;\r\n private privErrorDetails: string;\r\n private privErrorCode: CancellationErrorCode;\r\n\r\n /**\r\n * Creates and initializes an instance of this class.\r\n * @constructor\r\n * @param {CancellationReason} result - The result of the intent recognition.\r\n * @param {string} offset - The offset.\r\n * @param {IntentRecognitionResult} sessionId - The session id.\r\n */\r\n public constructor(reason: CancellationReason, errorDetails: string, errorCode: CancellationErrorCode, result?: IntentRecognitionResult, offset?: number, sessionId?: string) {\r\n super(result, offset, sessionId);\r\n\r\n this.privReason = reason;\r\n this.privErrorDetails = errorDetails;\r\n this.privErrorCode = errorCode;\r\n }\r\n\r\n /**\r\n * The reason the recognition was canceled.\r\n * @member IntentRecognitionCanceledEventArgs.prototype.reason\r\n * @function\r\n * @public\r\n * @returns {CancellationReason} Specifies the reason canceled.\r\n */\r\n public get reason(): CancellationReason {\r\n return this.privReason;\r\n }\r\n\r\n /**\r\n * The error code of why the cancellation occurred.\r\n * @return An error code that represents the error reason.\r\n * Added in version 1.1.0.\r\n */\r\n public get errorCode(): CancellationErrorCode {\r\n return this.privErrorCode;\r\n }\r\n\r\n /**\r\n * In case of an unsuccessful recognition, provides a details of why the occurred error.\r\n * This field is only filled-out if the reason canceled (@see getReason) is set to Error.\r\n * @member IntentRecognitionCanceledEventArgs.prototype.errorDetails\r\n * @function\r\n * @public\r\n * @returns {string} A String that represents the error details.\r\n */\r\n public get errorDetails(): string {\r\n return this.privErrorDetails;\r\n }\r\n}\r\n\n\n\n// WEBPACK FOOTER //\n// ../src/sdk/IntentRecognitionCanceledEventArgs.ts","//\r\n// Copyright (c) Microsoft. All rights reserved.\r\n// See https://aka.ms/csspeech/license201809 for the full license information.\r\n//\r\n\r\nimport {\r\n CancellationErrorCodePropertyName,\r\n EnumTranslation,\r\n SimpleSpeechPhrase,\r\n} from \"../common.speech/Exports\";\r\nimport {\r\n CancellationErrorCode,\r\n CancellationReason,\r\n RecognitionResult,\r\n} from \"./Exports\";\r\n\r\n/**\r\n * Contains detailed information about why a result was canceled.\r\n * @class CancellationDetails\r\n */\r\nexport class CancellationDetails {\r\n private privReason: CancellationReason;\r\n private privErrorDetails: string;\r\n private privErrorCode: CancellationErrorCode;\r\n\r\n /**\r\n * Creates and initializes an instance of this class.\r\n * @constructor\r\n * @param {CancellationReason} reason - The cancellation reason.\r\n * @param {string} errorDetails - The error details, if provided.\r\n */\r\n private constructor(reason: CancellationReason, errorDetails: string, errorCode: CancellationErrorCode) {\r\n this.privReason = reason;\r\n this.privErrorDetails = errorDetails;\r\n this.privErrorCode = errorCode;\r\n }\r\n\r\n /**\r\n * Creates an instance of CancellationDetails object for the canceled RecognitionResult.\r\n * @member CancellationDetails.fromResult\r\n * @function\r\n * @public\r\n * @param {RecognitionResult} result - The result that was canceled.\r\n * @returns {CancellationDetails} The cancellation details object being created.\r\n */\r\n public static fromResult(result: RecognitionResult): CancellationDetails {\r\n let reason = CancellationReason.Error;\r\n let errorCode: CancellationErrorCode = CancellationErrorCode.NoError;\r\n\r\n if (!!result.json) {\r\n const simpleSpeech: SimpleSpeechPhrase = SimpleSpeechPhrase.FromJSON(result.json);\r\n reason = EnumTranslation.implTranslateCancelResult(simpleSpeech.RecognitionStatus);\r\n }\r\n\r\n if (!!result.properties) {\r\n errorCode = (CancellationErrorCode as any)[result.properties.getProperty(CancellationErrorCodePropertyName, CancellationErrorCode[CancellationErrorCode.NoError])];\r\n }\r\n\r\n return new CancellationDetails(reason, result.errorDetails, errorCode);\r\n\r\n }\r\n\r\n /**\r\n * The reason the recognition was canceled.\r\n * @member CancellationDetails.prototype.reason\r\n * @function\r\n * @public\r\n * @returns {CancellationReason} Specifies the reason canceled.\r\n */\r\n public get reason(): CancellationReason {\r\n return this.privReason;\r\n }\r\n\r\n /**\r\n * In case of an unsuccessful recognition, provides a details of why the occurred error.\r\n * This field is only filled-out if the reason canceled (@see getReason) is set to Error.\r\n * @member CancellationDetails.prototype.errorDetails\r\n * @function\r\n * @public\r\n * @returns {string} A String that represents the error details.\r\n */\r\n public get errorDetails(): string {\r\n return this.privErrorDetails;\r\n }\r\n\r\n /**\r\n * The error code of why the cancellation occurred.\r\n * @return An error code that represents the error reason.\r\n * Added in version 1.1.0.\r\n */\r\n public get ErrorCode(): CancellationErrorCode {\r\n return this.privErrorCode;\r\n }\r\n\r\n}\r\n\n\n\n// WEBPACK FOOTER //\n// ../src/sdk/CancellationDetails.ts","//\r\n// Copyright (c) Microsoft. All rights reserved.\r\n// Licensed under the MIT license. See LICENSE.md file in the project root for full license information.\r\n//\r\n\r\n/**\r\n * Defines error code in case that CancellationReason is Error.\r\n * Added in version 1.1.0.\r\n */\r\nexport enum CancellationErrorCode {\r\n /**\r\n * Indicates that an error occurred during speech recognition. Use errorDetails() contains detailed error response.\r\n */\r\n NoError,\r\n\r\n /**\r\n * Indicates an authentication error. The errorDetails property contains detailed error response.\r\n */\r\n AuthenticationFailure,\r\n\r\n /**\r\n * Indicates that one or more recognition parameters are invalid.\r\n */\r\n BadRequestParameters,\r\n\r\n /**\r\n * Indicates that the number of parallel requests exceeded the number of allowed concurrent transcriptions for the subscription.\r\n */\r\n TooManyRequests,\r\n\r\n /**\r\n * Indicates an connection error. The errorDetails property contains detailed error response.\r\n */\r\n ConnectionFailure,\r\n\r\n /**\r\n * Indicates a time-out error when waiting for response from service.\r\n */\r\n ServiceTimeout,\r\n\r\n /**\r\n * Indicates that an error is returned by the service.\r\n */\r\n ServiceError,\r\n\r\n /**\r\n * Indicates an unexpected runtime error. The errorDetails property contains detailed error response.\r\n */\r\n RuntimeError,\r\n}\r\n\n\n\n// WEBPACK FOOTER //\n// ../src/sdk/CancellationErrorCodes.ts","//\r\n// Copyright (c) Microsoft. All rights reserved.\r\n// See https://aka.ms/csspeech/license201809 for the full license information.\r\n//\r\nimport { AudioStreamFormatImpl } from \"../../src/sdk/Audio/AudioStreamFormat\";\r\nimport { AudioStreamFormat } from \"../../src/sdk/Exports\";\r\nimport {\r\n AudioSourceErrorEvent,\r\n AudioSourceEvent,\r\n AudioSourceInitializingEvent,\r\n AudioSourceOffEvent,\r\n AudioSourceReadyEvent,\r\n AudioStreamNodeAttachedEvent,\r\n AudioStreamNodeAttachingEvent,\r\n AudioStreamNodeDetachedEvent,\r\n AudioStreamNodeErrorEvent,\r\n CreateNoDashGuid,\r\n Events,\r\n EventSource,\r\n IAudioSource,\r\n IAudioStreamNode,\r\n IStringDictionary,\r\n PlatformEvent,\r\n Promise,\r\n PromiseHelper,\r\n Stream,\r\n StreamReader,\r\n} from \"../common/Exports\";\r\n\r\nimport { Timer } from \"../common.browser/Exports\";\r\n\r\nexport class FileAudioSource implements IAudioSource {\r\n\r\n // Recommended sample rate (bytes/second).\r\n private static readonly SAMPLE_RATE: number = 16000 * 2; // 16 kHz * 16 bits\r\n\r\n // We should stream audio at no faster than 2x real-time (i.e., send five chunks\r\n // per second, with the chunk size == sample rate in bytes per second * 2 / 5).\r\n private static readonly CHUNK_SIZE: number = FileAudioSource.SAMPLE_RATE * 2 / 5;\r\n\r\n private static readonly UPLOAD_INTERVAL: number = 200; // milliseconds\r\n\r\n // 10 seconds of audio in bytes =\r\n // sample rate (bytes/second) * 600 (seconds) + 44 (size of the wave header).\r\n private static readonly MAX_SIZE: number = FileAudioSource.SAMPLE_RATE * 600 + 44;\r\n\r\n private static readonly FILEFORMAT: AudioStreamFormatImpl = AudioStreamFormat.getWaveFormatPCM(16000, 16, 1) as AudioStreamFormatImpl;\r\n\r\n private streams: IStringDictionary> = {};\r\n\r\n private id: string;\r\n\r\n private events: EventSource;\r\n\r\n private file: File;\r\n\r\n public constructor(file: File, audioSourceId?: string) {\r\n this.id = audioSourceId ? audioSourceId : CreateNoDashGuid();\r\n this.events = new EventSource();\r\n this.file = file;\r\n }\r\n\r\n public get Format(): AudioStreamFormat {\r\n return FileAudioSource.FILEFORMAT;\r\n }\r\n\r\n public TurnOn = (): Promise => {\r\n if (typeof FileReader === \"undefined\") {\r\n const errorMsg = \"Browser does not support FileReader.\";\r\n this.OnEvent(new AudioSourceErrorEvent(errorMsg, \"\")); // initialization error - no streamid at this point\r\n return PromiseHelper.FromError(errorMsg);\r\n } else if (this.file.name.lastIndexOf(\".wav\") !== this.file.name.length - 4) {\r\n const errorMsg = this.file.name + \" is not supported. Only WAVE files are allowed at the moment.\";\r\n this.OnEvent(new AudioSourceErrorEvent(errorMsg, \"\"));\r\n return PromiseHelper.FromError(errorMsg);\r\n } else if (this.file.size > FileAudioSource.MAX_SIZE) {\r\n const errorMsg = this.file.name + \" exceeds the maximum allowed file size (\" + FileAudioSource.MAX_SIZE + \").\";\r\n this.OnEvent(new AudioSourceErrorEvent(errorMsg, \"\"));\r\n return PromiseHelper.FromError(errorMsg);\r\n }\r\n\r\n this.OnEvent(new AudioSourceInitializingEvent(this.id)); // no stream id\r\n this.OnEvent(new AudioSourceReadyEvent(this.id));\r\n return PromiseHelper.FromResult(true);\r\n }\r\n\r\n public Id = (): string => {\r\n return this.id;\r\n }\r\n\r\n public Attach = (audioNodeId: string): Promise => {\r\n this.OnEvent(new AudioStreamNodeAttachingEvent(this.id, audioNodeId));\r\n\r\n return this.Upload(audioNodeId).OnSuccessContinueWith(\r\n (streamReader: StreamReader) => {\r\n this.OnEvent(new AudioStreamNodeAttachedEvent(this.id, audioNodeId));\r\n return {\r\n Detach: () => {\r\n streamReader.Close();\r\n delete this.streams[audioNodeId];\r\n this.OnEvent(new AudioStreamNodeDetachedEvent(this.id, audioNodeId));\r\n this.TurnOff();\r\n },\r\n Id: () => {\r\n return audioNodeId;\r\n },\r\n Read: () => {\r\n return streamReader.Read();\r\n },\r\n };\r\n });\r\n }\r\n\r\n public Detach = (audioNodeId: string): void => {\r\n if (audioNodeId && this.streams[audioNodeId]) {\r\n this.streams[audioNodeId].Close();\r\n delete this.streams[audioNodeId];\r\n this.OnEvent(new AudioStreamNodeDetachedEvent(this.id, audioNodeId));\r\n }\r\n }\r\n\r\n public TurnOff = (): Promise => {\r\n for (const streamId in this.streams) {\r\n if (streamId) {\r\n const stream = this.streams[streamId];\r\n if (stream && !stream.IsClosed) {\r\n stream.Close();\r\n }\r\n }\r\n }\r\n\r\n this.OnEvent(new AudioSourceOffEvent(this.id)); // no stream now\r\n return PromiseHelper.FromResult(true);\r\n }\r\n\r\n public get Events(): EventSource {\r\n return this.events;\r\n }\r\n\r\n private Upload = (audioNodeId: string): Promise> => {\r\n return this.TurnOn()\r\n .OnSuccessContinueWith>((_: boolean) => {\r\n const stream = new Stream(audioNodeId);\r\n\r\n this.streams[audioNodeId] = stream;\r\n\r\n const reader: FileReader = new FileReader();\r\n\r\n let startOffset = 0;\r\n let endOffset = FileAudioSource.CHUNK_SIZE;\r\n let lastWriteTimestamp = 0;\r\n\r\n const processNextChunk = (event: Event): void => {\r\n if (stream.IsClosed) {\r\n return; // output stream was closed (somebody called TurnOff). We're done here.\r\n }\r\n\r\n if (lastWriteTimestamp !== 0) {\r\n const delay = Date.now() - lastWriteTimestamp;\r\n if (delay < FileAudioSource.UPLOAD_INTERVAL) {\r\n // It's been less than the \"upload interval\" since we've uploaded the\r\n // last chunk. Schedule the next upload to make sure that we're sending\r\n // upstream roughly one chunk per upload interval.\r\n new Timer(FileAudioSource.UPLOAD_INTERVAL - delay, processNextChunk).start();\r\n return;\r\n }\r\n }\r\n\r\n stream.Write(reader.result as ArrayBuffer);\r\n lastWriteTimestamp = Date.now();\r\n\r\n if (endOffset < this.file.size) {\r\n startOffset = endOffset;\r\n endOffset = Math.min(endOffset + FileAudioSource.CHUNK_SIZE, this.file.size);\r\n const chunk = this.file.slice(startOffset, endOffset);\r\n reader.readAsArrayBuffer(chunk);\r\n } else {\r\n // we've written the entire file to the output stream, can close it now.\r\n stream.Close();\r\n }\r\n };\r\n\r\n reader.onload = processNextChunk;\r\n\r\n reader.onerror = (event: ErrorEvent) => {\r\n const errorMsg = `Error occurred while processing '${this.file.name}'. ${event.error}`;\r\n this.OnEvent(new AudioStreamNodeErrorEvent(this.id, audioNodeId, event.error));\r\n throw new Error(errorMsg);\r\n };\r\n\r\n const chunk = this.file.slice(startOffset, endOffset);\r\n reader.readAsArrayBuffer(chunk);\r\n\r\n return stream.GetReader();\r\n });\r\n }\r\n\r\n private OnEvent = (event: AudioSourceEvent): void => {\r\n this.events.OnEvent(event);\r\n Events.Instance.OnEvent(event);\r\n }\r\n}\r\n\n\n\n// WEBPACK FOOTER //\n// ../src/common.browser/FileAudioSource.ts","//\r\n// Copyright (c) Microsoft. All rights reserved.\r\n// See https://aka.ms/csspeech/license201809 for the full license information.\r\n//\r\nimport { Stream } from \"../common/Exports\";\r\nimport { IRecorder } from \"./IRecorder\";\r\n\r\n// getting around the build error for MediaRecorder as Typescript does not have a definition for this one.\r\ndeclare var MediaRecorder: any;\r\n\r\nexport class OpusRecorder implements IRecorder {\r\n private mediaResources: IMediaResources;\r\n private mediaRecorderOptions: any;\r\n\r\n constructor(options?: { mimeType: string, bitsPerSecond: number }) {\r\n this.mediaRecorderOptions = options;\r\n }\r\n\r\n public Record = (context: AudioContext, mediaStream: MediaStream, outputStream: Stream): void => {\r\n const mediaRecorder: any = new MediaRecorder(mediaStream, this.mediaRecorderOptions);\r\n const timeslice = 100; // this is in ms - 100 ensures that the chunk doesn't exceed the max size of chunk allowed in WS connection\r\n mediaRecorder.ondataavailable = (dataAvailableEvent: any) => {\r\n if (outputStream) {\r\n const reader = new FileReader();\r\n reader.readAsArrayBuffer(dataAvailableEvent.data);\r\n reader.onloadend = (event: ProgressEvent) => {\r\n outputStream.Write(reader.result as ArrayBuffer);\r\n };\r\n }\r\n };\r\n\r\n this.mediaResources = {\r\n recorder: mediaRecorder,\r\n stream: mediaStream,\r\n };\r\n mediaRecorder.start(timeslice);\r\n }\r\n\r\n public ReleaseMediaResources = (context: AudioContext): void => {\r\n if (this.mediaResources.recorder.state !== \"inactive\") {\r\n this.mediaResources.recorder.stop();\r\n }\r\n this.mediaResources.stream.getTracks().forEach((track: any) => track.stop());\r\n }\r\n}\r\n\r\ninterface IMediaResources {\r\n stream: MediaStream;\r\n recorder: any;\r\n}\r\n\r\n/* Declaring this inline to avoid compiler warnings\r\ndeclare class MediaRecorder {\r\n constructor(mediaStream: MediaStream, options: any);\r\n\r\n public state: string;\r\n\r\n public ondataavailable(dataAvailableEvent: any): void;\r\n public stop(): void;\r\n}*/\r\n\n\n\n// WEBPACK FOOTER //\n// ../src/common.browser/OpusRecorder.ts","//\r\n// Copyright (c) Microsoft. All rights reserved.\r\n// See https://aka.ms/csspeech/license201809 for the full license information.\r\n//\r\nimport { RiffPcmEncoder, Stream } from \"../common/Exports\";\r\nimport { IRecorder } from \"./IRecorder\";\r\n\r\nexport class PcmRecorder implements IRecorder {\r\n private mediaResources: IMediaResources;\r\n\r\n public Record = (context: AudioContext, mediaStream: MediaStream, outputStream: Stream): void => {\r\n const desiredSampleRate = 16000;\r\n\r\n // https://developer.mozilla.org/en-US/docs/Web/API/AudioContext/createScriptProcessor\r\n const scriptNode = (() => {\r\n let bufferSize = 0;\r\n try {\r\n return context.createScriptProcessor(bufferSize, 1, 1);\r\n } catch (error) {\r\n // Webkit (<= version 31) requires a valid bufferSize.\r\n bufferSize = 2048;\r\n let audioSampleRate = context.sampleRate;\r\n while (bufferSize < 16384 && audioSampleRate >= (2 * desiredSampleRate)) {\r\n bufferSize <<= 1 ;\r\n audioSampleRate >>= 1;\r\n }\r\n return context.createScriptProcessor(bufferSize, 1, 1);\r\n }\r\n })();\r\n\r\n const waveStreamEncoder = new RiffPcmEncoder(context.sampleRate, desiredSampleRate);\r\n let needHeader: boolean = true;\r\n const that = this;\r\n scriptNode.onaudioprocess = (event: AudioProcessingEvent) => {\r\n const inputFrame = event.inputBuffer.getChannelData(0);\r\n\r\n if (outputStream && !outputStream.IsClosed) {\r\n const waveFrame = waveStreamEncoder.Encode(needHeader, inputFrame);\r\n if (!!waveFrame) {\r\n outputStream.Write(waveFrame);\r\n needHeader = false;\r\n }\r\n }\r\n };\r\n\r\n // https://developer.mozilla.org/en-US/docs/Web/API/AudioContext/createMediaStreamSource\r\n const micInput = context.createMediaStreamSource(mediaStream);\r\n\r\n this.mediaResources = {\r\n scriptProcessorNode: scriptNode,\r\n source: micInput,\r\n stream: mediaStream,\r\n };\r\n\r\n micInput.connect(scriptNode);\r\n scriptNode.connect(context.destination);\r\n }\r\n\r\n public ReleaseMediaResources = (context: AudioContext): void => {\r\n if (this.mediaResources) {\r\n if (this.mediaResources.scriptProcessorNode) {\r\n this.mediaResources.scriptProcessorNode.disconnect(context.destination);\r\n this.mediaResources.scriptProcessorNode = null;\r\n }\r\n if (this.mediaResources.source) {\r\n this.mediaResources.source.disconnect();\r\n this.mediaResources.stream.getTracks().forEach((track: any) => track.stop());\r\n this.mediaResources.source = null;\r\n }\r\n }\r\n }\r\n}\r\n\r\ninterface IMediaResources {\r\n source: MediaStreamAudioSourceNode;\r\n scriptProcessorNode: ScriptProcessorNode;\r\n stream: MediaStream;\r\n}\r\n\n\n\n// WEBPACK FOOTER //\n// ../src/common.browser/PCMRecorder.ts","//\r\n// Copyright (c) Microsoft. All rights reserved.\r\n// See https://aka.ms/csspeech/license201809 for the full license information.\r\n//\r\nimport { ArgumentNullError, IKeyValueStorage } from \"../common/Exports\";\r\n\r\nexport class SessionStorage implements IKeyValueStorage {\r\n\r\n public Get = (key: string): string => {\r\n if (!key) {\r\n throw new ArgumentNullError(\"key\");\r\n }\r\n\r\n return sessionStorage.getItem(key);\r\n }\r\n\r\n public GetOrAdd = (key: string, valueToAdd: string): string => {\r\n if (!key) {\r\n throw new ArgumentNullError(\"key\");\r\n }\r\n\r\n const value = sessionStorage.getItem(key);\r\n if (value === null || value === undefined) {\r\n sessionStorage.setItem(key, valueToAdd);\r\n }\r\n\r\n return sessionStorage.getItem(key);\r\n }\r\n\r\n public Set = (key: string, value: string): void => {\r\n if (!key) {\r\n throw new ArgumentNullError(\"key\");\r\n }\r\n\r\n sessionStorage.setItem(key, value);\r\n }\r\n\r\n public Remove = (key: string): void => {\r\n if (!key) {\r\n throw new ArgumentNullError(\"key\");\r\n }\r\n\r\n sessionStorage.removeItem(key);\r\n }\r\n}\r\n\n\n\n// WEBPACK FOOTER //\n// ../src/common.browser/SessionStorage.ts","//\r\n// Copyright (c) Microsoft. All rights reserved.\r\n// See https://aka.ms/csspeech/license201809 for the full license information.\r\n//\r\nimport { ITimer } from \"../common/Exports\";\r\n\r\nexport class Timer implements ITimer {\r\n private delayInMillisec: number;\r\n private timerId: number;\r\n private successCallback: any;\r\n constructor(delayInMillisec: number, successCallback: any) {\r\n this.delayInMillisec = delayInMillisec;\r\n this.successCallback = successCallback;\r\n }\r\n public start = (...params: any[]): void => {\r\n if (this.timerId) {\r\n this.stop();\r\n }\r\n this.timerId = setTimeout(this.successCallback, this.delayInMillisec, params);\r\n }\r\n\r\n public stop = (): void => {\r\n clearTimeout(this.timerId);\r\n }\r\n}\r\n\n\n\n// WEBPACK FOOTER //\n// ../src/common.browser/Timer.ts","//\r\n// Copyright (c) Microsoft. All rights reserved.\r\n// See https://aka.ms/csspeech/license201809 for the full license information.\r\n//\r\nimport {\r\n ArgumentNullError,\r\n ConnectionEvent,\r\n ConnectionMessage,\r\n ConnectionOpenResponse,\r\n ConnectionState,\r\n CreateNoDashGuid,\r\n EventSource,\r\n IConnection,\r\n IStringDictionary,\r\n IWebsocketMessageFormatter,\r\n PlatformEvent,\r\n Promise,\r\n} from \"../common/Exports\";\r\nimport { WebsocketMessageAdapter } from \"./WebsocketMessageAdapter\";\r\n\r\nexport class WebsocketConnection implements IConnection {\r\n\r\n private uri: string;\r\n private messageFormatter: IWebsocketMessageFormatter;\r\n private connectionMessageAdapter: WebsocketMessageAdapter;\r\n private id: string;\r\n private isDisposed: boolean = false;\r\n\r\n public constructor(\r\n uri: string,\r\n queryParameters: IStringDictionary,\r\n headers: IStringDictionary,\r\n messageFormatter: IWebsocketMessageFormatter,\r\n connectionId?: string) {\r\n\r\n if (!uri) {\r\n throw new ArgumentNullError(\"uri\");\r\n }\r\n\r\n if (!messageFormatter) {\r\n throw new ArgumentNullError(\"messageFormatter\");\r\n }\r\n\r\n this.messageFormatter = messageFormatter;\r\n\r\n let queryParams = \"\";\r\n let i = 0;\r\n\r\n if (queryParameters) {\r\n for (const paramName in queryParameters) {\r\n if (paramName) {\r\n queryParams += ((i === 0) && (uri.indexOf(\"?\") === -1)) ? \"?\" : \"&\";\r\n const val = encodeURIComponent(queryParameters[paramName]);\r\n queryParams += `${paramName}=${val}`;\r\n i++;\r\n }\r\n }\r\n }\r\n\r\n if (headers) {\r\n for (const headerName in headers) {\r\n if (headerName) {\r\n queryParams += i === 0 ? \"?\" : \"&\";\r\n const val = encodeURIComponent(headers[headerName]);\r\n queryParams += `${headerName}=${val}`;\r\n i++;\r\n }\r\n }\r\n }\r\n\r\n this.uri = uri + queryParams;\r\n this.id = connectionId ? connectionId : CreateNoDashGuid();\r\n\r\n this.connectionMessageAdapter = new WebsocketMessageAdapter(\r\n this.uri,\r\n this.Id,\r\n this.messageFormatter);\r\n }\r\n\r\n public Dispose = (): void => {\r\n this.isDisposed = true;\r\n\r\n if (this.connectionMessageAdapter) {\r\n this.connectionMessageAdapter.Close();\r\n }\r\n }\r\n\r\n public IsDisposed = (): boolean => {\r\n return this.isDisposed;\r\n }\r\n\r\n public get Id(): string {\r\n return this.id;\r\n }\r\n\r\n public State = (): ConnectionState => {\r\n return this.connectionMessageAdapter.State;\r\n }\r\n\r\n public Open = (): Promise => {\r\n return this.connectionMessageAdapter.Open();\r\n }\r\n\r\n public Send = (message: ConnectionMessage): Promise => {\r\n return this.connectionMessageAdapter.Send(message);\r\n }\r\n\r\n public Read = (): Promise => {\r\n return this.connectionMessageAdapter.Read();\r\n }\r\n\r\n public get Events(): EventSource {\r\n return this.connectionMessageAdapter.Events;\r\n }\r\n}\r\n\n\n\n// WEBPACK FOOTER //\n// ../src/common.browser/WebsocketConnection.ts"],"sourceRoot":""}