{"version":3,"sources":["webpack:///./node_modules/microsoft-cognitiveservices-speech-sdk/distrib/es2015/src/sdk/SpeechSynthesisOutputFormat.js","webpack:///./node_modules/microsoft-cognitiveservices-speech-sdk/distrib/es2015/src/sdk/SourceLanguageConfig.js","webpack:///./node_modules/microsoft-cognitiveservices-speech-sdk/distrib/es2015/src/sdk/SpeechSynthesisResult.js","webpack:///./node_modules/microsoft-cognitiveservices-speech-sdk/distrib/es2015/src/sdk/PropertyId.js","webpack:///./node_modules/microsoft-cognitiveservices-speech-sdk/distrib/es2015/src/sdk/Transcription/ConversationExpirationEventArgs.js","webpack:///./node_modules/microsoft-cognitiveservices-speech-sdk/distrib/es2015/src/sdk/TranslationSynthesisResult.js","webpack:///./node_modules/microsoft-cognitiveservices-speech-sdk/distrib/es2015/src/sdk/PhraseListGrammar.js","webpack:///./node_modules/microsoft-cognitiveservices-speech-sdk/distrib/es2015/src/sdk/ServiceEventArgs.js","webpack:///./node_modules/microsoft-cognitiveservices-speech-sdk/distrib/es2015/src/sdk/Transcription/ConversationParticipantsChangedEventArgs.js","webpack:///./node_modules/microsoft-cognitiveservices-speech-sdk/distrib/es2015/src/sdk/Transcription/ConversationCommon.js","webpack:///./node_modules/microsoft-cognitiveservices-speech-sdk/distrib/es2015/src/sdk/Transcription/ConversationTranslator.js","webpack:///./node_modules/microsoft-cognitiveservices-speech-sdk/distrib/es2015/src/sdk/PronunciationAssessmentConfig.js","webpack:///./node_modules/microsoft-cognitiveservices-speech-sdk/distrib/es2015/src/sdk/OutputFormat.js","webpack:///./node_modules/microsoft-cognitiveservices-speech-sdk/distrib/es2015/src/sdk/VoiceProfileResult.js","webpack:///./node_modules/microsoft-cognitiveservices-speech-sdk/distrib/es2015/src/sdk/SpeakerIdentificationModel.js","webpack:///./node_modules/microsoft-cognitiveservices-speech-sdk/distrib/es2015/src/sdk/PropertyCollection.js","webpack:///./node_modules/microsoft-cognitiveservices-speech-sdk/distrib/es2015/src/sdk/Recognizer.js","webpack:///./node_modules/microsoft-cognitiveservices-speech-sdk/distrib/es2015/src/sdk/VoiceProfile.js","webpack:///./node_modules/microsoft-cognitiveservices-speech-sdk/distrib/es2015/src/sdk/SpeechSynthesisWordBoundaryEventArgs.js","webpack:///./node_modules/microsoft-cognitiveservices-speech-sdk/distrib/es2015/src/sdk/PronunciationAssessmentGradingSystem.js","webpack:///./node_modules/microsoft-cognitiveservices-speech-sdk/distrib/es2015/src/sdk/RecognitionEventArgs.js","webpack:///./node_modules/microsoft-cognitiveservices-speech-sdk/distrib/es2015/src/sdk/Transcription/ConversationTranslationResult.js","webpack:///./node_modules/microsoft-cognitiveservices-speech-sdk/distrib/es2015/src/sdk/ProfanityOption.js","webpack:///./node_modules/microsoft-cognitiveservices-speech-sdk/distrib/es2015/src/sdk/VoiceProfileType.js","webpack:///./src/assets/images/keyBoard.png","webpack:///./node_modules/microsoft-cognitiveservices-speech-sdk/distrib/es2015/src/sdk/TranslationRecognizer.js","webpack:///./node_modules/microsoft-cognitiveservices-speech-sdk/distrib/es2015/src/sdk/SpeechTranslationConfig.js","webpack:///./node_modules/microsoft-cognitiveservices-speech-sdk/distrib/es2015/src/sdk/ServicePropertyChannel.js","webpack:///./node_modules/microsoft-cognitiveservices-speech-sdk/distrib/es2015/src/sdk/SpeechConfig.js","webpack:///./node_modules/microsoft-cognitiveservices-speech-sdk/distrib/es2015/src/sdk/SpeechRecognitionResult.js","webpack:///./node_modules/microsoft-cognitiveservices-speech-sdk/distrib/es2015/src/sdk/SpeakerVerificationModel.js","webpack:///./node_modules/microsoft-cognitiveservices-speech-sdk/distrib/es2015/src/sdk/TranslationSynthesisEventArgs.js","webpack:///./node_modules/microsoft-cognitiveservices-speech-sdk/distrib/es2015/src/sdk/TranslationRecognitionCanceledEventArgs.js","webpack:///./node_modules/microsoft-cognitiveservices-speech-sdk/distrib/es2015/src/sdk/RecognitionResult.js","webpack:///./node_modules/microsoft-cognitiveservices-speech-sdk/distrib/es2015/src/sdk/ResultReason.js","webpack:///./node_modules/microsoft-cognitiveservices-speech-sdk/distrib/es2015/src/sdk/Transcription/ConversationTranscriber.js","webpack:///./node_modules/microsoft-cognitiveservices-speech-sdk/distrib/es2015/src/sdk/VoiceProfileClient.js","webpack:///./node_modules/microsoft-cognitiveservices-speech-sdk/node_modules/uuid/dist/esm-browser/rng.js","webpack:///./node_modules/microsoft-cognitiveservices-speech-sdk/node_modules/uuid/dist/esm-browser/regex.js","webpack:///./node_modules/microsoft-cognitiveservices-speech-sdk/node_modules/uuid/dist/esm-browser/validate.js","webpack:///./node_modules/microsoft-cognitiveservices-speech-sdk/node_modules/uuid/dist/esm-browser/stringify.js","webpack:///./node_modules/microsoft-cognitiveservices-speech-sdk/node_modules/uuid/dist/esm-browser/v4.js","webpack:///./node_modules/microsoft-cognitiveservices-speech-sdk/distrib/es2015/src/sdk/TranslationRecognitionEventArgs.js","webpack:///./node_modules/microsoft-cognitiveservices-speech-sdk/distrib/es2015/src/sdk/SpeechRecognizer.js","webpack:///./node_modules/microsoft-cognitiveservices-speech-sdk/distrib/es2015/src/sdk/SpeechSynthesizer.js","webpack:///./node_modules/microsoft-cognitiveservices-speech-sdk/distrib/es2015/src/sdk/Transcription/ParticipantChangedReason.js","webpack:///./node_modules/microsoft-cognitiveservices-speech-sdk/distrib/es2015/src/sdk/Translations.js","webpack:///./node_modules/microsoft-cognitiveservices-speech-sdk/distrib/es2015/src/sdk/SpeechRecognitionCanceledEventArgs.js","webpack:///./node_modules/microsoft-cognitiveservices-speech-sdk/distrib/es2015/src/sdk/VoiceProfileEnrollmentResult.js","webpack:///./node_modules/microsoft-cognitiveservices-speech-sdk/distrib/es2015/src/sdk/PronunciationAssessmentResult.js","webpack:///./node_modules/microsoft-cognitiveservices-speech-sdk/distrib/es2015/src/sdk/PronunciationAssessmentGranularity.js","webpack:///./node_modules/microsoft-cognitiveservices-speech-sdk/distrib/es2015/src/sdk/SessionEventArgs.js","webpack:///./node_modules/microsoft-cognitiveservices-speech-sdk/distrib/es2015/src/sdk/Transcription/ConversationTranslationEventArgs.js","webpack:///./src/assets/images/basicInstruction.png","webpack:///./node_modules/microsoft-cognitiveservices-speech-sdk/distrib/es2015/src/sdk/Transcription/ConversationTranslationCanceledEventArgs.js","webpack:///./node_modules/microsoft-cognitiveservices-speech-sdk/distrib/es2015/src/sdk/SpeechRecognitionEventArgs.js","webpack:///./node_modules/microsoft-cognitiveservices-speech-sdk/distrib/es2015/src/sdk/SpeakerRecognizer.js","webpack:///./node_modules/microsoft-cognitiveservices-speech-sdk/distrib/es2015/src/sdk/TurnStatusReceivedEventArgs.js","webpack:///./node_modules/microsoft-cognitiveservices-speech-sdk/distrib/es2015/src/sdk/Transcription/IParticipant.js","webpack:///./node_modules/microsoft-cognitiveservices-speech-sdk/distrib/es2015/src/sdk/SpeakerRecognitionResult.js","webpack:///./src/assets/images/introTime.png","webpack:///./node_modules/microsoft-cognitiveservices-speech-sdk/distrib/es2015/src/sdk/Transcription/Conversation.js","webpack:///./node_modules/microsoft-cognitiveservices-speech-sdk/distrib/es2015/src/sdk/SpeechSynthesisEventArgs.js","webpack:///./node_modules/microsoft-cognitiveservices-speech-sdk/distrib/es2015/src/sdk/TranslationRecognitionResult.js"],"names":["SpeechSynthesisOutputFormat","SourceLanguageConfig","language","endpointId","throwIfNullOrUndefined","this","privLanguage","privEndpointId","SpeechSynthesisResult","resultId","reason","audioData","errorDetails","properties","privResultId","privReason","privAudioData","privErrorDetails","privProperties","PropertyId","ConversationExpirationEventArgs","expirationTime","sessionId","super","privExpirationTime","TranslationSynthesisResult","audio","privAudio","PhraseListGrammar","recogBase","privGrammerBuilder","dynamicGrammar","recognizer","recoBase","internalData","phrase","addPhrase","phrases","clearPhrases","ServiceEventArgs","json","name","privJsonResult","privEventName","ConversationParticipantsChangedEventArgs","participants","privParticipant","ConversationCommon","audioConfig","privAudioConfig","cb","err","e","undefined","error","Error","typedError","message","SpeechState","__awaiter","thisArg","_arguments","P","generator","adopt","value","resolve","Promise","reject","fulfilled","step","next","rejected","result","done","then","apply","privIsDisposed","privIsSpeaking","privSpeechState","Inactive","privErrors","ConversationConnectionConfig","restErrors","privPlaceholderKey","privPlaceholderRegion","onSpeechConnected","Connected","onSpeechRecognizing","r","onSpeechSessionStarted","onSpeechSessionStopped","PropertyCollection","privSpeechRecognitionLanguage","_a","privConversation","conversation","nickname","param1","param2","param3","Contracts","invalidArgs","replace","throwIfNullOrWhitespace","handleError","permissionDeniedStart","lang","defaultLanguageCode","privSpeechTranslationConfig","SpeechTranslationConfig","fromSubscription","setProfanity","ProfanityOption","Masked","addTargetLanguage","setProperty","SpeechServiceConnection_RecoLanguage","ConversationTranslator_Name","endpoint","getProperty","ConversationTranslator_Host","speechEndpointHost","SpeechServiceConnection_Host","Conversation","conversationTranslator","joinConversationAsync","permissionDeniedConnect","authorizationToken","startConversationAsync","handleCallback","room","token","config","cancelSpeech","endConversationImplAsync","deleteConversationImplAsync","dispose","permissionDeniedSend","sendTextMessageAsync","canSpeak","privTranslationRecognizer","connectTranslatorRecognizer","startContinuousRecognition","stopContinuousRecognitionAsync","success","_b","isDisposed","close","privTranslationRecognizerConnection","closeConnection","AudioConfig","fromDefaultMicrophoneInput","SpeechServiceConnection_Key","encodeURIComponent","endpointHost","speechHost","cognitiveSpeechRegion","url","speechPath","configParams","SpeechServiceConnection_Endpoint","TranslationRecognizer","Connection","fromRecognizer","connected","disconnected","onSpeechDisconnected","recognized","onSpeechRecognized","recognizing","canceled","onSpeechCanceled","sessionStarted","sessionStopped","startContinuousRecognitionAsync","fireCancelEvent","_c","cancelEvent","ConversationTranslationCanceledEventArgs","CancellationReason","errorCode","RuntimeError","isConnected","Connecting","isMutedByHost","PronunciationAssessmentConfig","referenceText","gradingSystem","FivePoint","granularity","Phoneme","enableMiscue","PronunciationAssessment_ReferenceText","PronunciationAssessment_GradingSystem","PronunciationAssessment_Granularity","PronunciationAssessment_EnableMiscue","String","PronunciationAssessment_Json","updateJson","PronunciationAssessment_Params","speechContext","setPronunciationAssessmentParams","jsonString","paramsJson","JSON","parse","dimension","enableMiscueString","stringify","OutputFormat","VoiceProfileResult","statusText","Canceled","ServiceError","VoiceProfileCancellationDetails","NoError","SpeakerIdentificationModel","profiles","privVoiceProfiles","length","forEach","profile","profileType","TextIndependentIdentification","profileId","push","map","join","privKeys","privValues","key","def","keyToUse","n","clonedMap","destinationCollection","Recognizer","connectionFactory","privDisposed","clone","privConnectionFactory","implCommonRecognizerSetup","errorCb","throwIfDisposed","privReco","disposing","audioSource","turnOff","telemetryDataEnabled","enabled","osPlatform","window","osName","osVersion","navigator","platform","userAgent","appVersion","recognizerConfig","createRecognizerConfig","createServiceRecognizer","getAuthFromProperties","recognitionMode","ret","implRecognizerStop","recognize","promise","stopRecognizing","subscriptionKey","authentication","authFetchEventId","SpeechServiceAuthorization_Token","VoiceProfile","privId","privProfileType","SpeechSynthesisWordBoundaryEventArgs","audioOffset","text","wordLength","textOffset","privAudioOffset","privText","privWordLength","privTextOffset","PronunciationAssessmentGradingSystem","RecognitionEventArgs","offset","privOffset","ConversationTranslationResult","participantId","translations","originalLanguage","duration","privOrigLang","VoiceProfileType","module","exports","speechConfig","configImpl","throwIfNull","privDisposedTranslationRecognizer","SpeechServiceConnection_TranslationVoice","SpeechServiceConnection_TranslationToLanguages","split","recognizeOnceAsyncImpl","startContinuousRecognitionAsyncImpl","stopContinuousRecognitionAsyncImpl","_super","Object","create","get","call","region","SpeechTranslationConfigImpl","SpeechServiceConnection_Region","hostName","speechImpl","protocol","hostname","port","href","privSpeechProperties","outputFormat","Simple","SpeechServiceConnection_EndpointId","languages","targetLanguages","proxyHostName","proxyPort","proxyUserName","proxyPassword","SpeechServiceConnection_ProxyHostName","SpeechServiceConnection_ProxyPort","SpeechServiceConnection_ProxyUserName","SpeechServiceConnection_ProxyPassword","channel","currentProperties","profanity","SpeechServiceResponse_ProfanityOption","SpeechServiceConnection_EnableAudioLogging","SpeechServiceResponse_RequestWordLevelTimestamps","SpeechServiceConnection_SynthLanguage","SpeechServiceConnection_SynthVoice","voice","SpeechServiceConnection_SynthOutputFormat","format","ServicePropertyChannel","SpeechConfig","SpeechConfigImpl","SpeechServiceConnection_IntentRegion","speechRecognitionLanguage","URL","SpeechServiceConnection_AutoDetectSourceLanguages","SpeechRecognitionResult","languageDetectionConfidence","speakerId","privSpeakerId","SpeakerVerificationModel","privVoiceProfile","TranslationSynthesisEventArgs","privResult","TranslationRecognitionCanceledEventArgs","sessionid","cancellationReason","privCancelReason","privSessionId","privErrorCode","RecognitionResult","privDuration","privLanguageDetectionConfidence","privJson","ResultReason","ConversationTranscriber","privRecognizer","privDisposedRecognizer","conversationImpl","connectCallbacks","connectTranscriberRecognizer","disconnectCallbacks","VoiceProfileClient","speechConfigImpl","implClientSetup","privAdapter","createProfile","response","createEnrollment","ok","EnrolledVoiceProfile","data","deleteProfile","getResult","DeletedVoiceProfile","resetProfile","ResetVoiceProfile","successReason","getRandomValues","rnds8","Uint8Array","rng","crypto","bind","msCrypto","validate","uuid","test","byteToHex","toString","substr","arr","arguments","toLowerCase","TypeError","v4","options","buf","rnds","random","i","TranslationRecognitionEventArgs","SpeechRecognizer","autoDetectSourceLanguageConfig","mergeTo","Detailed","Interactive","model","SpeechSynthesizer","fromDefaultSpeakerOutput","privSynthesizing","synthesisRequestQueue","implCommonSynthesizeSetup","languageToDefaultVoice","ssml","XMLEncode","autoDetectSourceLanguage","stream","speakImpl","synthesizerConfig","createSynthesizerConfig","createSynthesisAdapter","audioOutputFormat","fromSpeechSynthesisOutputFormat","IsSsml","dataStream","requestId","audioDestination","enqueue","SynthesisRequest","adapterSpeak","catch","request","dequeue","Speak","isSSML","ParticipantChangedReason","Translations","privMap","SpeechRecognitionCanceledEventArgs","VoiceProfileEnrollmentResult","privDetails","enrollmentStatus","EnrollingVoiceProfile","enrollmentsCount","enrollmentsLength","VoiceProfileEnrollmentCancellationDetails","PronunciationAssessmentResult","j","NBest","privPronJson","SpeechServiceResponse_JsonResult","detailResult","PronunciationAssessment","AccuracyScore","PronScore","CompletenessScore","FluencyScore","PronunciationAssessmentGranularity","SessionEventArgs","ConversationTranslationEventArgs","SpeechRecognitionEventArgs","ConversationTranscriptionEventArgs","SpeakerRecognizer","privAudioConfigImpl","implSRSetup","responsePromise","identifySpeaker","Identify","verifySpeaker","Verify","voiceProfile","resultType","RecognizedSpeaker","TurnStatusReceivedEventArgs","turnStatus","privTurnStatus","fromJSON","interactionId","conversationId","statusCode","User","userId","privUserId","Participant","id","avatar","displayName","isHost","isMuted","isUsingTts","preferredLanguage","privAvatar","privDisplayName","privIsHost","privIsMuted","privIsUsingTts","privPreferredLanguage","privVoice","SpeakerRecognitionResultType","SpeakerRecognitionResult","resultReason","privProfileId","identifiedProfile","privScore","score","recognitionResult","NoMatch","SpeakerRecognitionCancellationDetails","arg2","arg3","arg4","ConversationImpl","createConversationAsync","privIsConnected","privConversationId","onConnected","privConversationTranslator","onDisconnected","onCanceled","onParticipantUpdateCommandReceived","updatedParticipant","privParticipants","getParticipant","changeNickname","setUseTTS","useTts","setProfanityFiltering","setMute","setTranslateToLanguages","translateToLanguages","addOrUpdateParticipant","participantsChanged","Updated","toParticipant","onLockRoomCommandReceived","onMuteAllCommandReceived","p","toParticipants","onParticipantJoinCommandReceived","newParticipant","participant","JoinedConversation","onParticipantLeaveCommandReceived","ejectedParticipant","deleteParticipant","LeftConversation","onTranslationReceived","_d","_e","_f","command","final","transcribed","payload","partial","transcribing","instantMessage","textMessageReceived","onParticipantsListReceived","sessionToken","privRoom","me","privIsReady","changeNicknameAsync","onConversationExpiration","conversationExpiration","privManager","hostNickname","privConfig","privTextMessageMaxLength","privConversationRecognizer","privToken","roomId","host","createOrJoin","meId","fromConfig","participantUpdateCommandReceived","lockRoomCommandReceived","muteAllCommandReceived","participantJoinCommandReceived","participantLeaveCommandReceived","translationReceived","participantsListReceived","connect","addParticipantImplAsync","cognitiveSpeechAuthToken","leave","canSendAsHost","permissionDeniedConversation","sendRequest","getLockCommand","getMuteAllCommand","canSend","permissionDeniedParticipant","exists","getParticipantIndex","invalidParticipantRequest","getMuteCommand","privTranscriberRecognizer","hasOwnProperty","removeParticipantImplAsync","user","index","findIndex","getEjectCommand","getMessageCommand","getChangeNicknameCommand","convId","part","props","transcriptionEventKeys","val","info","conversationProperties","conversationInfo","pushConversationEvent","includeHost","filter","setMuteAll","roomid","type","participantCommand","isLocked","setLockState","ejectParticipant","SpeechSynthesisEventArgs","TranslationRecognitionResult","privTranslations"],"mappings":"mOAOO,IAAIA,EAPX,kCAQA,SAAWA,GAKPA,EAA4BA,EAA4B,wBAA0B,GAAK,uBAKvFA,EAA4BA,EAA4B,4BAA8B,GAAK,2BAK3FA,EAA4BA,EAA4B,6BAA+B,GAAK,4BAK5FA,EAA4BA,EAA4B,+BAAiC,GAAK,8BAK9FA,EAA4BA,EAA4B,gCAAkC,GAAK,+BAK/FA,EAA4BA,EAA4B,+BAAiC,GAAK,8BAK9FA,EAA4BA,EAA4B,+BAAiC,GAAK,8BAK9FA,EAA4BA,EAA4B,+BAAiC,GAAK,8BAK9FA,EAA4BA,EAA4B,gCAAkC,GAAK,+BAK/FA,EAA4BA,EAA4B,6BAA+B,GAAK,4BAK5FA,EAA4BA,EAA4B,yBAA2B,IAAM,wBAKzFA,EAA4BA,EAA4B,wBAA0B,IAAM,uBAKxFA,EAA4BA,EAA4B,yBAA2B,IAAM,wBAKzFA,EAA4BA,EAA4B,yBAA2B,IAAM,wBAKzFA,EAA4BA,EAA4B,wBAA0B,IAAM,uBAKxFA,EAA4BA,EAA4B,wBAA0B,IAAM,uBAKxFA,EAA4BA,EAA4B,uBAAyB,IAAM,sBAKvFA,EAA4BA,EAA4B,yBAA2B,IAAM,wBAKzFA,EAA4BA,EAA4B,yBAA2B,IAAM,wBAKzFA,EAA4BA,EAA4B,wBAA0B,IAAM,uBAKxFA,EAA4BA,EAA4B,yBAA2B,IAAM,wBAKzFA,EAA4BA,EAA4B,+BAAiC,IAAM,8BAK/FA,EAA4BA,EAA4B,gCAAkC,IAAM,+BAnHpG,CAoHGA,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C7B6V,OAAQ1nB,KAAK8jB,SAASY,OACtBiD,KAAM,OAAmCC,mBACzChkB,MAAOgC,IAGf,kBAAkBxC,GAId,OAHA,OAAU+C,wBAAwBnG,KAAK8jB,SAASY,OAAQ,kBACxD,OAAUve,wBAAwBnG,KAAK8jB,SAASjS,cAAe,iBAC/D,OAAU1L,wBAAwB/C,EAAS,WACpCoJ,KAAKI,UAAU,CAElBiF,cAAe7R,KAAK8jB,SAASjS,cAC7B6S,OAAQ1kB,KAAK8jB,SAASY,OACtBzT,KAAM7N,EACNukB,KAAM,OAAmCjE,oB,kCCn7BrD,kCAOO,MAAMsE,EAMT,YAAY5jB,GACRpE,KAAKoW,WAAahS,EAStB,aACI,OAAOpE,KAAKoW,c,kCCxBpB,kDAOO,MAAM6R,UAAqC,OAc9C,YAAYnW,EAAc1R,EAAUC,EAAQ4Q,EAAMe,EAAUN,EAAQnR,EAAc4B,EAAM3B,GACpFU,MAAMd,EAAUC,EAAQ4Q,EAAMe,EAAUN,OAAQ1O,OAAWA,OAAWA,EAAWzC,EAAc4B,EAAM3B,GACrGR,KAAKkoB,iBAAmBpW,EAY5B,mBACI,OAAO9R,KAAKkoB","file":"js/MockTestView~31ecd969.433e01e6.js","sourcesContent":["// Copyright (c) Microsoft Corporation. All rights reserved.\n// Licensed under the MIT license.\n/**\n * Define speech synthesis audio output formats.\n * @enum SpeechSynthesisOutputFormat\n * Added in version 1.11.0\n */\nexport var SpeechSynthesisOutputFormat;\n(function (SpeechSynthesisOutputFormat) {\n /**\n * raw-8khz-8bit-mono-mulaw\n * @member SpeechSynthesisOutputFormat.Raw8Khz8BitMonoMULaw,\n */\n SpeechSynthesisOutputFormat[SpeechSynthesisOutputFormat[\"Raw8Khz8BitMonoMULaw\"] = 0] = \"Raw8Khz8BitMonoMULaw\";\n /**\n * riff-16khz-16kbps-mono-siren\n * @member SpeechSynthesisOutputFormat.Riff16Khz16KbpsMonoSiren\n */\n SpeechSynthesisOutputFormat[SpeechSynthesisOutputFormat[\"Riff16Khz16KbpsMonoSiren\"] = 1] = \"Riff16Khz16KbpsMonoSiren\";\n /**\n * audio-16khz-16kbps-mono-siren\n * @member SpeechSynthesisOutputFormat.Audio16Khz16KbpsMonoSiren\n */\n SpeechSynthesisOutputFormat[SpeechSynthesisOutputFormat[\"Audio16Khz16KbpsMonoSiren\"] = 2] = \"Audio16Khz16KbpsMonoSiren\";\n /**\n * audio-16khz-32kbitrate-mono-mp3\n * @member SpeechSynthesisOutputFormat.Audio16Khz32KBitRateMonoMp3\n */\n SpeechSynthesisOutputFormat[SpeechSynthesisOutputFormat[\"Audio16Khz32KBitRateMonoMp3\"] = 3] = \"Audio16Khz32KBitRateMonoMp3\";\n /**\n * audio-16khz-128kbitrate-mono-mp3\n * @member SpeechSynthesisOutputFormat.Audio16Khz128KBitRateMonoMp3\n */\n SpeechSynthesisOutputFormat[SpeechSynthesisOutputFormat[\"Audio16Khz128KBitRateMonoMp3\"] = 4] = \"Audio16Khz128KBitRateMonoMp3\";\n /**\n * audio-16khz-64kbitrate-mono-mp3\n * @member SpeechSynthesisOutputFormat.Audio16Khz64KBitRateMonoMp3\n */\n SpeechSynthesisOutputFormat[SpeechSynthesisOutputFormat[\"Audio16Khz64KBitRateMonoMp3\"] = 5] = \"Audio16Khz64KBitRateMonoMp3\";\n /**\n * audio-24khz-48kbitrate-mono-mp3\n * @member SpeechSynthesisOutputFormat.Audio24Khz48KBitRateMonoMp3\n */\n SpeechSynthesisOutputFormat[SpeechSynthesisOutputFormat[\"Audio24Khz48KBitRateMonoMp3\"] = 6] = \"Audio24Khz48KBitRateMonoMp3\";\n /**\n * audio-24khz-96kbitrate-mono-mp3\n * @member SpeechSynthesisOutputFormat.Audio24Khz96KBitRateMonoMp3\n */\n SpeechSynthesisOutputFormat[SpeechSynthesisOutputFormat[\"Audio24Khz96KBitRateMonoMp3\"] = 7] = \"Audio24Khz96KBitRateMonoMp3\";\n /**\n * audio-24khz-160kbitrate-mono-mp3\n * @member SpeechSynthesisOutputFormat.Audio24Khz160KBitRateMonoMp3\n */\n SpeechSynthesisOutputFormat[SpeechSynthesisOutputFormat[\"Audio24Khz160KBitRateMonoMp3\"] = 8] = \"Audio24Khz160KBitRateMonoMp3\";\n /**\n * raw-16khz-16bit-mono-truesilk\n * @member SpeechSynthesisOutputFormat.Raw16Khz16BitMonoTrueSilk\n */\n SpeechSynthesisOutputFormat[SpeechSynthesisOutputFormat[\"Raw16Khz16BitMonoTrueSilk\"] = 9] = \"Raw16Khz16BitMonoTrueSilk\";\n /**\n * riff-16khz-16bit-mono-pcm\n * @member SpeechSynthesisOutputFormat.Riff16Khz16BitMonoPcm\n */\n SpeechSynthesisOutputFormat[SpeechSynthesisOutputFormat[\"Riff16Khz16BitMonoPcm\"] = 10] = \"Riff16Khz16BitMonoPcm\";\n /**\n * riff-8khz-16bit-mono-pcm\n * @member SpeechSynthesisOutputFormat.Riff8Khz16BitMonoPcm\n */\n SpeechSynthesisOutputFormat[SpeechSynthesisOutputFormat[\"Riff8Khz16BitMonoPcm\"] = 11] = \"Riff8Khz16BitMonoPcm\";\n /**\n * riff-24khz-16bit-mono-pcm\n * @member SpeechSynthesisOutputFormat.Riff24Khz16BitMonoPcm\n */\n SpeechSynthesisOutputFormat[SpeechSynthesisOutputFormat[\"Riff24Khz16BitMonoPcm\"] = 12] = \"Riff24Khz16BitMonoPcm\";\n /**\n * riff-8khz-8bit-mono-mulaw\n * @member SpeechSynthesisOutputFormat.Riff8Khz8BitMonoMULaw\n */\n SpeechSynthesisOutputFormat[SpeechSynthesisOutputFormat[\"Riff8Khz8BitMonoMULaw\"] = 13] = \"Riff8Khz8BitMonoMULaw\";\n /**\n * raw-16khz-16bit-mono-pcm\n * @member SpeechSynthesisOutputFormat.Raw16Khz16BitMonoPcm\n */\n SpeechSynthesisOutputFormat[SpeechSynthesisOutputFormat[\"Raw16Khz16BitMonoPcm\"] = 14] = \"Raw16Khz16BitMonoPcm\";\n /**\n * raw-24khz-16bit-mono-pcm\n * @member SpeechSynthesisOutputFormat.Raw24Khz16BitMonoPcm\n */\n SpeechSynthesisOutputFormat[SpeechSynthesisOutputFormat[\"Raw24Khz16BitMonoPcm\"] = 15] = \"Raw24Khz16BitMonoPcm\";\n /**\n * raw-8khz-16bit-mono-pcm\n * @member SpeechSynthesisOutputFormat.Raw8Khz16BitMonoPcm\n */\n SpeechSynthesisOutputFormat[SpeechSynthesisOutputFormat[\"Raw8Khz16BitMonoPcm\"] = 16] = \"Raw8Khz16BitMonoPcm\";\n /**\n * ogg-16khz-16bit-mono-opus\n * @member SpeechSynthesisOutputFormat.Ogg16Khz16BitMonoOpus\n */\n SpeechSynthesisOutputFormat[SpeechSynthesisOutputFormat[\"Ogg16Khz16BitMonoOpus\"] = 17] = \"Ogg16Khz16BitMonoOpus\";\n /**\n * ogg-24khz-16bit-mono-opus\n * @member SpeechSynthesisOutputFormat.Ogg24Khz16BitMonoOpus\n */\n SpeechSynthesisOutputFormat[SpeechSynthesisOutputFormat[\"Ogg24Khz16BitMonoOpus\"] = 18] = \"Ogg24Khz16BitMonoOpus\";\n /**\n * raw-48khz-16bit-mono-pcm\n * @member SpeechSynthesisOutputFormat.Raw48Khz16BitMonoPcm\n */\n SpeechSynthesisOutputFormat[SpeechSynthesisOutputFormat[\"Raw48Khz16BitMonoPcm\"] = 19] = \"Raw48Khz16BitMonoPcm\";\n /**\n * riff-48khz-16bit-mono-pcm\n * @member SpeechSynthesisOutputFormat.Riff48Khz16BitMonoPcm\n */\n SpeechSynthesisOutputFormat[SpeechSynthesisOutputFormat[\"Riff48Khz16BitMonoPcm\"] = 20] = \"Riff48Khz16BitMonoPcm\";\n /**\n * audio-48khz-96kbitrate-mono-mp3\n * @member SpeechSynthesisOutputFormat.Audio48Khz96KBitRateMonoMp3\n */\n SpeechSynthesisOutputFormat[SpeechSynthesisOutputFormat[\"Audio48Khz96KBitRateMonoMp3\"] = 21] = \"Audio48Khz96KBitRateMonoMp3\";\n /**\n * audio-48khz-192kbitrate-mono-mp3\n * @member SpeechSynthesisOutputFormat.Audio48Khz192KBitRateMonoMp3\n */\n SpeechSynthesisOutputFormat[SpeechSynthesisOutputFormat[\"Audio48Khz192KBitRateMonoMp3\"] = 22] = \"Audio48Khz192KBitRateMonoMp3\";\n})(SpeechSynthesisOutputFormat || (SpeechSynthesisOutputFormat = {}));\n\n//# sourceMappingURL=SpeechSynthesisOutputFormat.js.map\n","// Copyright (c) Microsoft Corporation. All rights reserved.\n// Licensed under the MIT license.\nimport { Contracts } from \"./Contracts\";\n/**\n * Source Language configuration.\n * @class SourceLanguageConfig\n */\nexport class SourceLanguageConfig {\n constructor(language, endpointId) {\n Contracts.throwIfNullOrUndefined(language, \"language\");\n this.privLanguage = language;\n this.privEndpointId = endpointId;\n }\n /**\n * @member SourceLanguageConfig.fromLanguage\n * @function\n * @public\n * @param {string} language language (eg. \"en-US\") value of config.\n * @param {string?} endpointId endpointId of model bound to given language of config.\n * @return {SourceLanguageConfig} Instance of SourceLanguageConfig\n * @summary Creates an instance of the SourceLanguageConfig with the given language and optional endpointId.\n * Added in version 1.13.0.\n */\n static fromLanguage(language, endpointId) {\n return new SourceLanguageConfig(language, endpointId);\n }\n get language() {\n return this.privLanguage;\n }\n get endpointId() {\n return this.privEndpointId;\n }\n}\n\n//# sourceMappingURL=SourceLanguageConfig.js.map\n","// Copyright (c) Microsoft Corporation. All rights reserved.\n// Licensed under the MIT license.\n/**\n * Defines result of speech synthesis.\n * @class SpeechSynthesisResult\n * Added in version 1.11.0\n */\nexport class SpeechSynthesisResult {\n /**\n * Creates and initializes an instance of this class.\n * @constructor\n * @param {string} resultId - The result id.\n * @param {ResultReason} reason - The reason.\n * @param {number} audioData - The offset into the stream.\n * @param {string} errorDetails - Error details, if provided.\n * @param {PropertyCollection} properties - Additional properties, if provided.\n */\n constructor(resultId, reason, audioData, errorDetails, properties) {\n this.privResultId = resultId;\n this.privReason = reason;\n this.privAudioData = audioData;\n this.privErrorDetails = errorDetails;\n this.privProperties = properties;\n }\n /**\n * Specifies the result identifier.\n * @member SpeechSynthesisResult.prototype.resultId\n * @function\n * @public\n * @returns {string} Specifies the result identifier.\n */\n get resultId() {\n return this.privResultId;\n }\n /**\n * Specifies status of the result.\n * @member SpeechSynthesisResult.prototype.reason\n * @function\n * @public\n * @returns {ResultReason} Specifies status of the result.\n */\n get reason() {\n return this.privReason;\n }\n /**\n * The synthesized audio data\n * @member SpeechSynthesisResult.prototype.audioData\n * @function\n * @public\n * @returns {ArrayBuffer} The synthesized audio data.\n */\n get audioData() {\n return this.privAudioData;\n }\n /**\n * In case of an unsuccessful synthesis, provides details of the occurred error.\n * @member SpeechSynthesisResult.prototype.errorDetails\n * @function\n * @public\n * @returns {string} a brief description of an error.\n */\n get errorDetails() {\n return this.privErrorDetails;\n }\n /**\n * The set of properties exposed in the result.\n * @member SpeechSynthesisResult.prototype.properties\n * @function\n * @public\n * @returns {PropertyCollection} The set of properties exposed in the result.\n */\n get properties() {\n return this.privProperties;\n }\n}\n\n//# sourceMappingURL=SpeechSynthesisResult.js.map\n","// Copyright (c) Microsoft Corporation. All rights reserved.\n// Licensed under the MIT license.\n/**\n * Defines speech property ids.\n * @class PropertyId\n */\nexport var PropertyId;\n(function (PropertyId) {\n /**\n * The Cognitive Services Speech Service subscription Key. If you are using an intent recognizer, you need to specify\n * to specify the LUIS endpoint key for your particular LUIS app. Under normal circumstances, you shouldn't\n * have to use this property directly.\n * Instead, use [[SpeechConfig.fromSubscription]].\n * @member PropertyId.SpeechServiceConnection_Key\n */\n PropertyId[PropertyId[\"SpeechServiceConnection_Key\"] = 0] = \"SpeechServiceConnection_Key\";\n /**\n * The Cognitive Services Speech Service endpoint (url). Under normal circumstances, you shouldn't\n * have to use this property directly.\n * Instead, use [[SpeechConfig.fromEndpoint]].\n * NOTE: This endpoint is not the same as the endpoint used to obtain an access token.\n * @member PropertyId.SpeechServiceConnection_Endpoint\n */\n PropertyId[PropertyId[\"SpeechServiceConnection_Endpoint\"] = 1] = \"SpeechServiceConnection_Endpoint\";\n /**\n * The Cognitive Services Speech Service region. Under normal circumstances, you shouldn't have to\n * use this property directly.\n * Instead, use [[SpeechConfig.fromSubscription]], [[SpeechConfig.fromEndpoint]], [[SpeechConfig.fromAuthorizationToken]].\n * @member PropertyId.SpeechServiceConnection_Region\n */\n PropertyId[PropertyId[\"SpeechServiceConnection_Region\"] = 2] = \"SpeechServiceConnection_Region\";\n /**\n * The Cognitive Services Speech Service authorization token (aka access token). Under normal circumstances,\n * you shouldn't have to use this property directly.\n * Instead, use [[SpeechConfig.fromAuthorizationToken]], [[SpeechRecognizer.authorizationToken]],\n * [[IntentRecognizer.authorizationToken]], [[TranslationRecognizer.authorizationToken]], [[SpeakerRecognizer.authorizationToken]].\n * @member PropertyId.SpeechServiceAuthorization_Token\n */\n PropertyId[PropertyId[\"SpeechServiceAuthorization_Token\"] = 3] = \"SpeechServiceAuthorization_Token\";\n /**\n * The Cognitive Services Speech Service authorization type. Currently unused.\n * @member PropertyId.SpeechServiceAuthorization_Type\n */\n PropertyId[PropertyId[\"SpeechServiceAuthorization_Type\"] = 4] = \"SpeechServiceAuthorization_Type\";\n /**\n * The Cognitive Services Speech Service endpoint id. Under normal circumstances, you shouldn't\n * have to use this property directly.\n * Instead, use [[SpeechConfig.endpointId]].\n * NOTE: The endpoint id is available in the Speech Portal, listed under Endpoint Details.\n * @member PropertyId.SpeechServiceConnection_EndpointId\n */\n PropertyId[PropertyId[\"SpeechServiceConnection_EndpointId\"] = 5] = \"SpeechServiceConnection_EndpointId\";\n /**\n * The list of comma separated languages (BCP-47 format) used as target translation languages. Under normal circumstances,\n * you shouldn't have to use this property directly.\n * Instead use [[SpeechTranslationConfig.addTargetLanguage]],\n * [[SpeechTranslationConfig.targetLanguages]], [[TranslationRecognizer.targetLanguages]].\n * @member PropertyId.SpeechServiceConnection_TranslationToLanguages\n */\n PropertyId[PropertyId[\"SpeechServiceConnection_TranslationToLanguages\"] = 6] = \"SpeechServiceConnection_TranslationToLanguages\";\n /**\n * The name of the Cognitive Service Text to Speech Service Voice. Under normal circumstances, you shouldn't have to use this\n * property directly.\n * Instead, use [[SpeechTranslationConfig.voiceName]].\n * NOTE: Valid voice names can be found here.\n * @member PropertyId.SpeechServiceConnection_TranslationVoice\n */\n PropertyId[PropertyId[\"SpeechServiceConnection_TranslationVoice\"] = 7] = \"SpeechServiceConnection_TranslationVoice\";\n /**\n * Translation features.\n * @member PropertyId.SpeechServiceConnection_TranslationFeatures\n */\n PropertyId[PropertyId[\"SpeechServiceConnection_TranslationFeatures\"] = 8] = \"SpeechServiceConnection_TranslationFeatures\";\n /**\n * The Language Understanding Service Region. Under normal circumstances, you shouldn't have to use this property directly.\n * Instead, use [[LanguageUnderstandingModel]].\n * @member PropertyId.SpeechServiceConnection_IntentRegion\n */\n PropertyId[PropertyId[\"SpeechServiceConnection_IntentRegion\"] = 9] = \"SpeechServiceConnection_IntentRegion\";\n /**\n * The host name of the proxy server used to connect to the Cognitive Services Speech Service. Only relevant in Node.js environments.\n * You shouldn't have to use this property directly.\n * Instead use .\n * Added in version 1.4.0.\n */\n PropertyId[PropertyId[\"SpeechServiceConnection_ProxyHostName\"] = 10] = \"SpeechServiceConnection_ProxyHostName\";\n /**\n * The port of the proxy server used to connect to the Cognitive Services Speech Service. Only relevant in Node.js environments.\n * You shouldn't have to use this property directly.\n * Instead use .\n * Added in version 1.4.0.\n */\n PropertyId[PropertyId[\"SpeechServiceConnection_ProxyPort\"] = 11] = \"SpeechServiceConnection_ProxyPort\";\n /**\n * The user name of the proxy server used to connect to the Cognitive Services Speech Service. Only relevant in Node.js environments.\n * You shouldn't have to use this property directly.\n * Instead use .\n * Added in version 1.4.0.\n */\n PropertyId[PropertyId[\"SpeechServiceConnection_ProxyUserName\"] = 12] = \"SpeechServiceConnection_ProxyUserName\";\n /**\n * The password of the proxy server used to connect to the Cognitive Services Speech Service. Only relevant in Node.js environments.\n * You shouldn't have to use this property directly.\n * Instead use .\n * Added in version 1.4.0.\n */\n PropertyId[PropertyId[\"SpeechServiceConnection_ProxyPassword\"] = 13] = \"SpeechServiceConnection_ProxyPassword\";\n /**\n * The Cognitive Services Speech Service recognition Mode. Can be \"INTERACTIVE\", \"CONVERSATION\", \"DICTATION\".\n * This property is intended to be read-only. The SDK is using it internally.\n * @member PropertyId.SpeechServiceConnection_RecoMode\n */\n PropertyId[PropertyId[\"SpeechServiceConnection_RecoMode\"] = 14] = \"SpeechServiceConnection_RecoMode\";\n /**\n * The spoken language to be recognized (in BCP-47 format). Under normal circumstances, you shouldn't have to use this property\n * directly.\n * Instead, use [[SpeechConfig.speechRecognitionLanguage]].\n * @member PropertyId.SpeechServiceConnection_RecoLanguage\n */\n PropertyId[PropertyId[\"SpeechServiceConnection_RecoLanguage\"] = 15] = \"SpeechServiceConnection_RecoLanguage\";\n /**\n * The session id. This id is a universally unique identifier (aka UUID) representing a specific binding of an audio input stream\n * and the underlying speech recognition instance to which it is bound. Under normal circumstances, you shouldn't have to use this\n * property directly.\n * Instead use [[SessionEventArgs.sessionId]].\n * @member PropertyId.Speech_SessionId\n */\n PropertyId[PropertyId[\"Speech_SessionId\"] = 16] = \"Speech_SessionId\";\n /**\n * The spoken language to be synthesized (e.g. en-US)\n * @member PropertyId.SpeechServiceConnection_SynthLanguage\n */\n PropertyId[PropertyId[\"SpeechServiceConnection_SynthLanguage\"] = 17] = \"SpeechServiceConnection_SynthLanguage\";\n /**\n * The name of the TTS voice to be used for speech synthesis\n * @member PropertyId.SpeechServiceConnection_SynthVoice\n */\n PropertyId[PropertyId[\"SpeechServiceConnection_SynthVoice\"] = 18] = \"SpeechServiceConnection_SynthVoice\";\n /**\n * The string to specify TTS output audio format\n * @member PropertyId.SpeechServiceConnection_SynthOutputFormat\n */\n PropertyId[PropertyId[\"SpeechServiceConnection_SynthOutputFormat\"] = 19] = \"SpeechServiceConnection_SynthOutputFormat\";\n /**\n * The list of comma separated languages used as possible source languages\n * Added in version 1.13.0\n * @member PropertyId.SpeechServiceConnection_AutoDetectSourceLanguages\n */\n PropertyId[PropertyId[\"SpeechServiceConnection_AutoDetectSourceLanguages\"] = 20] = \"SpeechServiceConnection_AutoDetectSourceLanguages\";\n /**\n * The requested Cognitive Services Speech Service response output format (simple or detailed). Under normal circumstances, you shouldn't have\n * to use this property directly.\n * Instead use [[SpeechConfig.outputFormat]].\n * @member PropertyId.SpeechServiceResponse_RequestDetailedResultTrueFalse\n */\n PropertyId[PropertyId[\"SpeechServiceResponse_RequestDetailedResultTrueFalse\"] = 21] = \"SpeechServiceResponse_RequestDetailedResultTrueFalse\";\n /**\n * The requested Cognitive Services Speech Service response output profanity level. Currently unused.\n * @member PropertyId.SpeechServiceResponse_RequestProfanityFilterTrueFalse\n */\n PropertyId[PropertyId[\"SpeechServiceResponse_RequestProfanityFilterTrueFalse\"] = 22] = \"SpeechServiceResponse_RequestProfanityFilterTrueFalse\";\n /**\n * The Cognitive Services Speech Service response output (in JSON format). This property is available on recognition result objects only.\n * @member PropertyId.SpeechServiceResponse_JsonResult\n */\n PropertyId[PropertyId[\"SpeechServiceResponse_JsonResult\"] = 23] = \"SpeechServiceResponse_JsonResult\";\n /**\n * The Cognitive Services Speech Service error details (in JSON format). Under normal circumstances, you shouldn't have to\n * use this property directly. Instead use [[CancellationDetails.errorDetails]].\n * @member PropertyId.SpeechServiceResponse_JsonErrorDetails\n */\n PropertyId[PropertyId[\"SpeechServiceResponse_JsonErrorDetails\"] = 24] = \"SpeechServiceResponse_JsonErrorDetails\";\n /**\n * The cancellation reason. Currently unused.\n * @member PropertyId.CancellationDetails_Reason\n */\n PropertyId[PropertyId[\"CancellationDetails_Reason\"] = 25] = \"CancellationDetails_Reason\";\n /**\n * The cancellation text. Currently unused.\n * @member PropertyId.CancellationDetails_ReasonText\n */\n PropertyId[PropertyId[\"CancellationDetails_ReasonText\"] = 26] = \"CancellationDetails_ReasonText\";\n /**\n * The Cancellation detailed text. Currently unused.\n * @member PropertyId.CancellationDetails_ReasonDetailedText\n */\n PropertyId[PropertyId[\"CancellationDetails_ReasonDetailedText\"] = 27] = \"CancellationDetails_ReasonDetailedText\";\n /**\n * The Language Understanding Service response output (in JSON format). Available via [[IntentRecognitionResult]]\n * @member PropertyId.LanguageUnderstandingServiceResponse_JsonResult\n */\n PropertyId[PropertyId[\"LanguageUnderstandingServiceResponse_JsonResult\"] = 28] = \"LanguageUnderstandingServiceResponse_JsonResult\";\n /**\n * The URL string built from speech configuration.\n * This property is intended to be read-only. The SDK is using it internally.\n * NOTE: Added in version 1.7.0.\n */\n PropertyId[PropertyId[\"SpeechServiceConnection_Url\"] = 29] = \"SpeechServiceConnection_Url\";\n /**\n * The initial silence timeout value (in milliseconds) used by the service.\n * Added in version 1.7.0\n */\n PropertyId[PropertyId[\"SpeechServiceConnection_InitialSilenceTimeoutMs\"] = 30] = \"SpeechServiceConnection_InitialSilenceTimeoutMs\";\n /**\n * The end silence timeout value (in milliseconds) used by the service.\n * Added in version 1.7.0\n */\n PropertyId[PropertyId[\"SpeechServiceConnection_EndSilenceTimeoutMs\"] = 31] = \"SpeechServiceConnection_EndSilenceTimeoutMs\";\n /**\n * A boolean value specifying whether audio logging is enabled in the service or not.\n * Added in version 1.7.0\n */\n PropertyId[PropertyId[\"SpeechServiceConnection_EnableAudioLogging\"] = 32] = \"SpeechServiceConnection_EnableAudioLogging\";\n /**\n * The requested Cognitive Services Speech Service response output profanity setting.\n * Allowed values are \"masked\", \"removed\", and \"raw\".\n * Added in version 1.7.0.\n */\n PropertyId[PropertyId[\"SpeechServiceResponse_ProfanityOption\"] = 33] = \"SpeechServiceResponse_ProfanityOption\";\n /**\n * A string value specifying which post processing option should be used by service.\n * Allowed values are \"TrueText\".\n * Added in version 1.7.0\n */\n PropertyId[PropertyId[\"SpeechServiceResponse_PostProcessingOption\"] = 34] = \"SpeechServiceResponse_PostProcessingOption\";\n /**\n * A boolean value specifying whether to include word-level timestamps in the response result.\n * Added in version 1.7.0\n */\n PropertyId[PropertyId[\"SpeechServiceResponse_RequestWordLevelTimestamps\"] = 35] = \"SpeechServiceResponse_RequestWordLevelTimestamps\";\n /**\n * The number of times a word has to be in partial results to be returned.\n * Added in version 1.7.0\n */\n PropertyId[PropertyId[\"SpeechServiceResponse_StablePartialResultThreshold\"] = 36] = \"SpeechServiceResponse_StablePartialResultThreshold\";\n /**\n * A string value specifying the output format option in the response result. Internal use only.\n * Added in version 1.7.0.\n */\n PropertyId[PropertyId[\"SpeechServiceResponse_OutputFormatOption\"] = 37] = \"SpeechServiceResponse_OutputFormatOption\";\n /**\n * A boolean value to request for stabilizing translation partial results by omitting words in the end.\n * Added in version 1.7.0.\n */\n PropertyId[PropertyId[\"SpeechServiceResponse_TranslationRequestStablePartialResult\"] = 38] = \"SpeechServiceResponse_TranslationRequestStablePartialResult\";\n /**\n * Identifier used to connect to the backend service.\n * @member PropertyId.Conversation_ApplicationId\n */\n PropertyId[PropertyId[\"Conversation_ApplicationId\"] = 39] = \"Conversation_ApplicationId\";\n /**\n * Type of dialog backend to connect to.\n * @member PropertyId.Conversation_DialogType\n */\n PropertyId[PropertyId[\"Conversation_DialogType\"] = 40] = \"Conversation_DialogType\";\n /**\n * Silence timeout for listening\n * @member PropertyId.Conversation_Initial_Silence_Timeout\n */\n PropertyId[PropertyId[\"Conversation_Initial_Silence_Timeout\"] = 41] = \"Conversation_Initial_Silence_Timeout\";\n /**\n * From Id to add to speech recognition activities.\n * @member PropertyId.Conversation_From_Id\n */\n PropertyId[PropertyId[\"Conversation_From_Id\"] = 42] = \"Conversation_From_Id\";\n /**\n * ConversationId for the session.\n * @member PropertyId.Conversation_Conversation_Id\n */\n PropertyId[PropertyId[\"Conversation_Conversation_Id\"] = 43] = \"Conversation_Conversation_Id\";\n /**\n * Comma separated list of custom voice deployment ids.\n * @member PropertyId.Conversation_Custom_Voice_Deployment_Ids\n */\n PropertyId[PropertyId[\"Conversation_Custom_Voice_Deployment_Ids\"] = 44] = \"Conversation_Custom_Voice_Deployment_Ids\";\n /**\n * Speech activity template, stamp properties from the template on the activity generated by the service for speech.\n * @member PropertyId.Conversation_Speech_Activity_Template\n * Added in version 1.10.0.\n */\n PropertyId[PropertyId[\"Conversation_Speech_Activity_Template\"] = 45] = \"Conversation_Speech_Activity_Template\";\n /**\n * Enables or disables the receipt of turn status messages as obtained on the turnStatusReceived event.\n * @member PropertyId.Conversation_Request_Bot_Status_Messages\n * Added in version 1.15.0.\n */\n PropertyId[PropertyId[\"Conversation_Request_Bot_Status_Messages\"] = 46] = \"Conversation_Request_Bot_Status_Messages\";\n /**\n * Specifies the connection ID to be provided in the Agent configuration message, e.g. a Direct Line token for\n * channel authentication.\n * Added in version 1.15.1.\n */\n PropertyId[PropertyId[\"Conversation_Agent_Connection_Id\"] = 47] = \"Conversation_Agent_Connection_Id\";\n /**\n * The Cognitive Services Speech Service host (url). Under normal circumstances, you shouldn't have to use this property directly.\n * Instead, use [[SpeechConfig.fromHost]].\n */\n PropertyId[PropertyId[\"SpeechServiceConnection_Host\"] = 48] = \"SpeechServiceConnection_Host\";\n /**\n * Set the host for service calls to the Conversation Translator REST management and websocket calls.\n */\n PropertyId[PropertyId[\"ConversationTranslator_Host\"] = 49] = \"ConversationTranslator_Host\";\n /**\n * Optionally set the the host's display name.\n * Used when joining a conversation.\n */\n PropertyId[PropertyId[\"ConversationTranslator_Name\"] = 50] = \"ConversationTranslator_Name\";\n /**\n * Optionally set a value for the X-CorrelationId request header.\n * Used for troubleshooting errors in the server logs. It should be a valid guid.\n */\n PropertyId[PropertyId[\"ConversationTranslator_CorrelationId\"] = 51] = \"ConversationTranslator_CorrelationId\";\n /**\n * Set the conversation token to be sent to the speech service. This enables the\n * service to service call from the speech service to the Conversation Translator service for relaying\n * recognitions. For internal use.\n */\n PropertyId[PropertyId[\"ConversationTranslator_Token\"] = 52] = \"ConversationTranslator_Token\";\n /**\n * The reference text of the audio for pronunciation evaluation.\n * For this and the following pronunciation assessment parameters, see\n * https://docs.microsoft.com/azure/cognitive-services/speech-service/rest-speech-to-text#pronunciation-assessment-parameters for details.\n * Under normal circumstances, you shouldn't have to use this property directly.\n * Added in version 1.15.0\n */\n PropertyId[PropertyId[\"PronunciationAssessment_ReferenceText\"] = 53] = \"PronunciationAssessment_ReferenceText\";\n /**\n * The point system for pronunciation score calibration (FivePoint or HundredMark).\n * Under normal circumstances, you shouldn't have to use this property directly.\n * Added in version 1.15.0\n */\n PropertyId[PropertyId[\"PronunciationAssessment_GradingSystem\"] = 54] = \"PronunciationAssessment_GradingSystem\";\n /**\n * The pronunciation evaluation granularity (Phoneme, Word, or FullText).\n * Under normal circumstances, you shouldn't have to use this property directly.\n * Added in version 1.15.0\n */\n PropertyId[PropertyId[\"PronunciationAssessment_Granularity\"] = 55] = \"PronunciationAssessment_Granularity\";\n /**\n * Defines if enable miscue calculation.\n * With this enabled, the pronounced words will be compared to the reference text,\n * and will be marked with omission/insertion based on the comparison. The default setting is False.\n * Under normal circumstances, you shouldn't have to use this property directly.\n * Added in version 1.15.0\n */\n PropertyId[PropertyId[\"PronunciationAssessment_EnableMiscue\"] = 56] = \"PronunciationAssessment_EnableMiscue\";\n /**\n * The json string of pronunciation assessment parameters\n * Under normal circumstances, you shouldn't have to use this property directly.\n * Added in version 1.15.0\n */\n PropertyId[PropertyId[\"PronunciationAssessment_Json\"] = 57] = \"PronunciationAssessment_Json\";\n /**\n * Pronunciation assessment parameters.\n * This property is intended to be read-only. The SDK is using it internally.\n * Added in version 1.15.0\n */\n PropertyId[PropertyId[\"PronunciationAssessment_Params\"] = 58] = \"PronunciationAssessment_Params\";\n})(PropertyId || (PropertyId = {}));\n\n//# sourceMappingURL=PropertyId.js.map\n","// Copyright (c) Microsoft Corporation. All rights reserved.\n// Licensed under the MIT license.\n// Multi-device Conversation is a Preview feature.\nimport { SessionEventArgs } from \"../Exports\";\nexport class ConversationExpirationEventArgs extends SessionEventArgs {\n constructor(expirationTime, sessionId) {\n super(sessionId);\n this.privExpirationTime = expirationTime;\n }\n /** How much longer until the conversation expires (in minutes). */\n get expirationTime() {\n return this.privExpirationTime;\n }\n}\n\n//# sourceMappingURL=ConversationExpirationEventArgs.js.map\n","// Copyright (c) Microsoft Corporation. All rights reserved.\n// Licensed under the MIT license.\n/**\n * Defines translation synthesis result, i.e. the voice output of the translated\n * text in the target language.\n * @class TranslationSynthesisResult\n */\nexport class TranslationSynthesisResult {\n /**\n * Creates and initializes an instance of this class.\n * @constructor\n * @param {ResultReason} reason - The synthesis reason.\n * @param {ArrayBuffer} audio - The audio data.\n */\n constructor(reason, audio) {\n this.privReason = reason;\n this.privAudio = audio;\n }\n /**\n * Translated text in the target language.\n * @member TranslationSynthesisResult.prototype.audio\n * @function\n * @public\n * @returns {ArrayBuffer} Translated audio in the target language.\n */\n get audio() {\n return this.privAudio;\n }\n /**\n * The synthesis status.\n * @member TranslationSynthesisResult.prototype.reason\n * @function\n * @public\n * @returns {ResultReason} The synthesis status.\n */\n get reason() {\n return this.privReason;\n }\n}\n\n//# sourceMappingURL=TranslationSynthesisResult.js.map\n","// Copyright (c) Microsoft Corporation. All rights reserved.\n// Licensed under the MIT license.\n/**\n * Allows additions of new phrases to improve speech recognition.\n *\n * Phrases added to the recognizer are effective at the start of the next recognition, or the next time the SpeechSDK must reconnect\n * to the speech service.\n */\nexport class PhraseListGrammar {\n constructor(recogBase) {\n this.privGrammerBuilder = recogBase.dynamicGrammar;\n }\n /**\n * Creates a PhraseListGrammar from a given speech recognizer. Will accept any recognizer that derives from @class Recognizer.\n * @param recognizer The recognizer to add phrase lists to.\n */\n static fromRecognizer(recognizer) {\n const recoBase = recognizer.internalData;\n return new PhraseListGrammar(recoBase);\n }\n /**\n * Adds a single phrase to the current recognizer.\n * @param phrase Phrase to add.\n */\n addPhrase(phrase) {\n this.privGrammerBuilder.addPhrase(phrase);\n }\n /**\n * Adds multiple phrases to the current recognizer.\n * @param phrases Array of phrases to add.\n */\n addPhrases(phrases) {\n this.privGrammerBuilder.addPhrase(phrases);\n }\n /**\n * Clears all phrases added to the current recognizer.\n */\n clear() {\n this.privGrammerBuilder.clearPhrases();\n }\n}\n\n//# sourceMappingURL=PhraseListGrammar.js.map\n","//\n// Copyright (c) Microsoft. All rights reserved.\n// Licensed under the MIT license. See LICENSE.md file in the project root for full license information.\n//\nimport { SessionEventArgs } from \"./Exports\";\n/**\n * Defines payload for any Service message event\n * Added in version 1.9.0\n */\nexport class ServiceEventArgs extends SessionEventArgs {\n /**\n * Creates and initializes an instance of this class.\n * @constructor\n * @param {string} json - json payload of the USP message.\n */\n constructor(json, name, sessionId) {\n super(sessionId);\n this.privJsonResult = json;\n this.privEventName = name;\n }\n get jsonString() {\n return this.privJsonResult;\n }\n get eventName() {\n return this.privEventName;\n }\n}\n\n//# sourceMappingURL=ServiceEventArgs.js.map\n","// Copyright (c) Microsoft Corporation. All rights reserved.\n// Licensed under the MIT license.\n// Multi-device Conversation is a Preview feature.\nimport { SessionEventArgs } from \"../Exports\";\nexport class ConversationParticipantsChangedEventArgs extends SessionEventArgs {\n constructor(reason, participants, sessionId) {\n super(sessionId);\n this.privReason = reason;\n this.privParticipant = participants;\n }\n get reason() {\n return this.privReason;\n }\n get participants() {\n return this.privParticipant;\n }\n}\n\n//# sourceMappingURL=ConversationParticipantsChangedEventArgs.js.map\n","// Copyright (c) Microsoft Corporation. All rights reserved.\n// Licensed under the MIT license.\nexport class ConversationCommon {\n constructor(audioConfig) {\n this.privAudioConfig = audioConfig;\n }\n handleCallback(cb, err) {\n if (!!cb) {\n try {\n cb();\n }\n catch (e) {\n if (!!err) {\n err(e);\n }\n }\n cb = undefined;\n }\n }\n handleError(error, err) {\n if (!!err) {\n if (error instanceof Error) {\n const typedError = error;\n err(typedError.name + \": \" + typedError.message);\n }\n else {\n err(error);\n }\n }\n }\n}\n\n//# sourceMappingURL=ConversationCommon.js.map\n","// Copyright (c) Microsoft Corporation. All rights reserved.\n// Licensed under the MIT license.\n// Multi-device Conversation is a Preview feature.\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nimport { ConversationConnectionConfig } from \"../../common.speech/Exports\";\nimport { marshalPromiseToCallbacks } from \"../../common/Exports\";\nimport { Contracts } from \"../Contracts\";\nimport { AudioConfig, CancellationErrorCode, CancellationReason, Connection, ProfanityOption, PropertyCollection, PropertyId, SpeechTranslationConfig, TranslationRecognizer } from \"../Exports\";\nimport { ConversationImpl } from \"./Conversation\";\nimport { ConversationCommon, ConversationTranslationCanceledEventArgs, } from \"./Exports\";\nexport var SpeechState;\n(function (SpeechState) {\n SpeechState[SpeechState[\"Inactive\"] = 0] = \"Inactive\";\n SpeechState[SpeechState[\"Connecting\"] = 1] = \"Connecting\";\n SpeechState[SpeechState[\"Connected\"] = 2] = \"Connected\";\n})(SpeechState || (SpeechState = {}));\n/***\n * Join, leave or connect to a conversation.\n */\nexport class ConversationTranslator extends ConversationCommon {\n constructor(audioConfig) {\n super(audioConfig);\n this.privIsDisposed = false;\n this.privIsSpeaking = false;\n this.privSpeechState = SpeechState.Inactive;\n this.privErrors = ConversationConnectionConfig.restErrors;\n this.privPlaceholderKey = \"abcdefghijklmnopqrstuvwxyz012345\";\n this.privPlaceholderRegion = \"westus\";\n /** Recognizer callbacks */\n this.onSpeechConnected = (e) => {\n this.privSpeechState = SpeechState.Connected;\n };\n this.onSpeechRecognizing = (r, e) => {\n // TODO: add support for getting recognitions from here if own speech\n };\n this.onSpeechSessionStarted = (r, e) => {\n this.privSpeechState = SpeechState.Connected;\n };\n this.onSpeechSessionStopped = (r, e) => {\n this.privSpeechState = SpeechState.Inactive;\n };\n this.privProperties = new PropertyCollection();\n }\n get properties() {\n return this.privProperties;\n }\n get speechRecognitionLanguage() {\n return this.privSpeechRecognitionLanguage;\n }\n get participants() {\n var _a;\n return (_a = this.privConversation) === null || _a === void 0 ? void 0 : _a.participants;\n }\n joinConversationAsync(conversation, nickname, param1, param2, param3) {\n try {\n if (typeof conversation === \"string\") {\n Contracts.throwIfNullOrUndefined(conversation, this.privErrors.invalidArgs.replace(\"{arg}\", \"conversation id\"));\n Contracts.throwIfNullOrWhitespace(nickname, this.privErrors.invalidArgs.replace(\"{arg}\", \"nickname\"));\n if (!!this.privConversation) {\n this.handleError(new Error(this.privErrors.permissionDeniedStart), param3);\n }\n let lang = param1;\n if (lang === undefined || lang === null || lang === \"\") {\n lang = ConversationConnectionConfig.defaultLanguageCode;\n }\n // create a placeholder config\n this.privSpeechTranslationConfig = SpeechTranslationConfig.fromSubscription(this.privPlaceholderKey, this.privPlaceholderRegion);\n this.privSpeechTranslationConfig.setProfanity(ProfanityOption.Masked);\n this.privSpeechTranslationConfig.addTargetLanguage(lang);\n this.privSpeechTranslationConfig.setProperty(PropertyId[PropertyId.SpeechServiceConnection_RecoLanguage], lang);\n this.privSpeechTranslationConfig.setProperty(PropertyId[PropertyId.ConversationTranslator_Name], nickname);\n const endpoint = this.privProperties.getProperty(PropertyId.ConversationTranslator_Host);\n if (endpoint) {\n this.privSpeechTranslationConfig.setProperty(PropertyId[PropertyId.ConversationTranslator_Host], endpoint);\n }\n const speechEndpointHost = this.privProperties.getProperty(PropertyId.SpeechServiceConnection_Host);\n if (speechEndpointHost) {\n this.privSpeechTranslationConfig.setProperty(PropertyId[PropertyId.SpeechServiceConnection_Host], speechEndpointHost);\n }\n // join the conversation\n this.privConversation = new ConversationImpl(this.privSpeechTranslationConfig);\n this.privConversation.conversationTranslator = this;\n this.privConversation.joinConversationAsync(conversation, nickname, lang, ((result) => {\n if (!result) {\n this.handleError(new Error(this.privErrors.permissionDeniedConnect), param3);\n }\n this.privSpeechTranslationConfig.authorizationToken = result;\n // connect to the ws\n this.privConversation.startConversationAsync((() => {\n this.handleCallback(param2, param3);\n }), ((error) => {\n this.handleError(error, param3);\n }));\n }), ((error) => {\n this.handleError(error, param3);\n }));\n }\n else if (typeof conversation === \"object\") {\n Contracts.throwIfNullOrUndefined(conversation, this.privErrors.invalidArgs.replace(\"{arg}\", \"conversation id\"));\n Contracts.throwIfNullOrWhitespace(nickname, this.privErrors.invalidArgs.replace(\"{arg}\", \"nickname\"));\n // save the nickname\n this.privProperties.setProperty(PropertyId.ConversationTranslator_Name, nickname);\n // ref the conversation object\n this.privConversation = conversation;\n // ref the conversation translator object\n this.privConversation.conversationTranslator = this;\n Contracts.throwIfNullOrUndefined(this.privConversation, this.privErrors.permissionDeniedConnect);\n Contracts.throwIfNullOrUndefined(this.privConversation.room.token, this.privErrors.permissionDeniedConnect);\n this.privSpeechTranslationConfig = conversation.config;\n this.handleCallback(param1, param2);\n }\n else {\n this.handleError(new Error(this.privErrors.invalidArgs.replace(\"{arg}\", \"invalid conversation type\")), param2);\n }\n }\n catch (error) {\n this.handleError(error, typeof param1 === \"string\" ? param3 : param2);\n }\n }\n /**\n * Leave the conversation\n * @param cb\n * @param err\n */\n leaveConversationAsync(cb, err) {\n marshalPromiseToCallbacks((() => __awaiter(this, void 0, void 0, function* () {\n // stop the speech websocket\n yield this.cancelSpeech();\n // stop the websocket\n yield this.privConversation.endConversationImplAsync();\n // https delete request\n yield this.privConversation.deleteConversationImplAsync();\n this.dispose();\n }))(), cb, err);\n }\n /**\n * Send a text message\n * @param message\n * @param cb\n * @param err\n */\n sendTextMessageAsync(message, cb, err) {\n var _a;\n try {\n Contracts.throwIfNullOrUndefined(this.privConversation, this.privErrors.permissionDeniedSend);\n Contracts.throwIfNullOrWhitespace(message, this.privErrors.invalidArgs.replace(\"{arg}\", message));\n (_a = this.privConversation) === null || _a === void 0 ? void 0 : _a.sendTextMessageAsync(message, cb, err);\n }\n catch (error) {\n this.handleError(error, err);\n }\n }\n /**\n * Start speaking\n * @param cb\n * @param err\n */\n startTranscribingAsync(cb, err) {\n marshalPromiseToCallbacks((() => __awaiter(this, void 0, void 0, function* () {\n try {\n Contracts.throwIfNullOrUndefined(this.privConversation, this.privErrors.permissionDeniedSend);\n Contracts.throwIfNullOrUndefined(this.privConversation.room.token, this.privErrors.permissionDeniedConnect);\n if (!this.canSpeak) {\n this.handleError(new Error(this.privErrors.permissionDeniedSend), err);\n }\n if (this.privTranslationRecognizer === undefined) {\n yield this.connectTranslatorRecognizer();\n }\n yield this.startContinuousRecognition();\n this.privIsSpeaking = true;\n }\n catch (error) {\n this.privIsSpeaking = false;\n // this.fireCancelEvent(error);\n yield this.cancelSpeech();\n throw error;\n }\n }))(), cb, err);\n }\n /**\n * Stop speaking\n * @param cb\n * @param err\n */\n stopTranscribingAsync(cb, err) {\n marshalPromiseToCallbacks((() => __awaiter(this, void 0, void 0, function* () {\n try {\n if (!this.privIsSpeaking) {\n // stop speech\n yield this.cancelSpeech();\n return;\n }\n // stop the recognition but leave the websocket open\n this.privIsSpeaking = false;\n yield new Promise((resolve, reject) => {\n var _a;\n (_a = this.privTranslationRecognizer) === null || _a === void 0 ? void 0 : _a.stopContinuousRecognitionAsync(resolve, reject);\n });\n }\n catch (error) {\n yield this.cancelSpeech();\n }\n }))(), cb, err);\n }\n isDisposed() {\n return this.privIsDisposed;\n }\n dispose(reason, success, err) {\n marshalPromiseToCallbacks((() => __awaiter(this, void 0, void 0, function* () {\n var _a, _b;\n if (this.isDisposed && !this.privIsSpeaking) {\n return;\n }\n yield this.cancelSpeech();\n this.privIsDisposed = true;\n (_a = this.privSpeechTranslationConfig) === null || _a === void 0 ? void 0 : _a.close();\n this.privSpeechRecognitionLanguage = undefined;\n this.privProperties = undefined;\n this.privAudioConfig = undefined;\n this.privSpeechTranslationConfig = undefined;\n (_b = this.privConversation) === null || _b === void 0 ? void 0 : _b.dispose();\n this.privConversation = undefined;\n }))(), success, err);\n }\n /**\n * Cancel the speech websocket\n */\n cancelSpeech() {\n var _a, _b;\n return __awaiter(this, void 0, void 0, function* () {\n try {\n this.privIsSpeaking = false;\n (_a = this.privTranslationRecognizer) === null || _a === void 0 ? void 0 : _a.stopContinuousRecognitionAsync();\n yield ((_b = this.privTranslationRecognizerConnection) === null || _b === void 0 ? void 0 : _b.closeConnection());\n this.privTranslationRecognizerConnection = undefined;\n this.privTranslationRecognizer = undefined;\n this.privSpeechState = SpeechState.Inactive;\n }\n catch (e) {\n // ignore the error\n }\n });\n }\n /**\n * Connect to the speech translation recognizer.\n * Currently there is no language validation performed before sending the SpeechLanguage code to the service.\n * If it's an invalid language the raw error will be: 'Error during WebSocket handshake: Unexpected response code: 400'\n * e.g. pass in 'fr' instead of 'fr-FR', or a text-only language 'cy'\n * @param cb\n * @param err\n */\n connectTranslatorRecognizer() {\n return __awaiter(this, void 0, void 0, function* () {\n try {\n if (this.privAudioConfig === undefined) {\n this.privAudioConfig = AudioConfig.fromDefaultMicrophoneInput();\n }\n // clear the temp subscription key if it's a participant joining\n if (this.privSpeechTranslationConfig.getProperty(PropertyId[PropertyId.SpeechServiceConnection_Key])\n === this.privPlaceholderKey) {\n this.privSpeechTranslationConfig.setProperty(PropertyId[PropertyId.SpeechServiceConnection_Key], \"\");\n }\n // TODO\n const token = encodeURIComponent(this.privConversation.room.token);\n let endpointHost = this.privSpeechTranslationConfig.getProperty(PropertyId[PropertyId.SpeechServiceConnection_Host], ConversationConnectionConfig.speechHost);\n endpointHost = endpointHost.replace(\"{region}\", this.privConversation.room.cognitiveSpeechRegion);\n const url = `wss://${endpointHost}${ConversationConnectionConfig.speechPath}?${ConversationConnectionConfig.configParams.token}=${token}`;\n this.privSpeechTranslationConfig.setProperty(PropertyId[PropertyId.SpeechServiceConnection_Endpoint], url);\n this.privTranslationRecognizer = new TranslationRecognizer(this.privSpeechTranslationConfig, this.privAudioConfig);\n this.privTranslationRecognizerConnection = Connection.fromRecognizer(this.privTranslationRecognizer);\n this.privTranslationRecognizerConnection.connected = this.onSpeechConnected;\n this.privTranslationRecognizerConnection.disconnected = this.onSpeechDisconnected;\n this.privTranslationRecognizer.recognized = this.onSpeechRecognized;\n this.privTranslationRecognizer.recognizing = this.onSpeechRecognizing;\n this.privTranslationRecognizer.canceled = this.onSpeechCanceled;\n this.privTranslationRecognizer.sessionStarted = this.onSpeechSessionStarted;\n this.privTranslationRecognizer.sessionStopped = this.onSpeechSessionStopped;\n }\n catch (error) {\n yield this.cancelSpeech();\n throw error;\n }\n });\n }\n /**\n * Handle the start speaking request\n * @param cb\n * @param err\n */\n startContinuousRecognition() {\n return new Promise((resolve, reject) => {\n this.privTranslationRecognizer.startContinuousRecognitionAsync(resolve, reject);\n });\n }\n onSpeechDisconnected(e) {\n return __awaiter(this, void 0, void 0, function* () {\n this.privSpeechState = SpeechState.Inactive;\n yield this.cancelSpeech();\n });\n }\n onSpeechRecognized(r, e) {\n var _a;\n return __awaiter(this, void 0, void 0, function* () {\n // TODO: add support for getting recognitions from here if own speech\n // if there is an error connecting to the conversation service from the speech service the error will be returned in the ErrorDetails field.\n if ((_a = e.result) === null || _a === void 0 ? void 0 : _a.errorDetails) {\n yield this.cancelSpeech();\n // TODO: format the error message contained in 'errorDetails'\n this.fireCancelEvent(e.result.errorDetails);\n }\n });\n }\n onSpeechCanceled(r, e) {\n return __awaiter(this, void 0, void 0, function* () {\n if (this.privSpeechState !== SpeechState.Inactive) {\n try {\n yield this.cancelSpeech();\n }\n catch (error) {\n this.privSpeechState = SpeechState.Inactive;\n }\n }\n });\n }\n /**\n * Fire a cancel event\n * @param error\n */\n fireCancelEvent(error) {\n var _a, _b, _c;\n try {\n if (!!this.canceled) {\n const cancelEvent = new ConversationTranslationCanceledEventArgs((_a = error === null || error === void 0 ? void 0 : error.reason) !== null && _a !== void 0 ? _a : CancellationReason.Error, (_b = error === null || error === void 0 ? void 0 : error.errorDetails) !== null && _b !== void 0 ? _b : error, (_c = error === null || error === void 0 ? void 0 : error.errorCode) !== null && _c !== void 0 ? _c : CancellationErrorCode.RuntimeError, undefined, error === null || error === void 0 ? void 0 : error.sessionId);\n this.canceled(this, cancelEvent);\n }\n }\n catch (e) {\n //\n }\n }\n get canSpeak() {\n // is there a Conversation websocket available\n if (!this.privConversation.isConnected) {\n return false;\n }\n // is the user already speaking\n if (this.privIsSpeaking || this.privSpeechState === SpeechState.Connected || this.privSpeechState === SpeechState.Connecting) {\n return false;\n }\n // is the user muted\n if (this.privConversation.isMutedByHost) {\n return false;\n }\n return true;\n }\n}\n\n//# sourceMappingURL=ConversationTranslator.js.map\n","// Copyright (c) Microsoft Corporation. All rights reserved.\n// Licensed under the MIT license.\nimport { Contracts } from \"./Contracts\";\nimport { PronunciationAssessmentGradingSystem, PronunciationAssessmentGranularity, PropertyCollection, PropertyId } from \"./Exports\";\n/**\n * Pronunciation assessment configuration.\n * @class PronunciationAssessmentConfig\n * Added in version 1.15.0.\n */\nexport class PronunciationAssessmentConfig {\n /**\n * PronunciationAssessmentConfig constructor.\n * @constructor\n * @param {string} referenceText\n * @param gradingSystem\n * @param granularity\n * @param enableMiscue\n */\n constructor(referenceText, gradingSystem = PronunciationAssessmentGradingSystem.FivePoint, granularity = PronunciationAssessmentGranularity.Phoneme, enableMiscue = false) {\n Contracts.throwIfNullOrUndefined(referenceText, \"referenceText\");\n this.privProperties = new PropertyCollection();\n this.privProperties.setProperty(PropertyId.PronunciationAssessment_ReferenceText, referenceText);\n this.privProperties.setProperty(PropertyId.PronunciationAssessment_GradingSystem, PronunciationAssessmentGradingSystem[gradingSystem]);\n this.privProperties.setProperty(PropertyId.PronunciationAssessment_Granularity, PronunciationAssessmentGranularity[gradingSystem]);\n this.privProperties.setProperty(PropertyId.PronunciationAssessment_EnableMiscue, String(enableMiscue));\n }\n /**\n * @member PronunciationAssessmentConfig.fromJSON\n * @function\n * @public\n * @param {string} json The json string containing the pronunciation assessment parameters.\n * @return {PronunciationAssessmentConfig} Instance of PronunciationAssessmentConfig\n * @summary Creates an instance of the PronunciationAssessmentConfig from json.\n */\n static fromJSON(json) {\n Contracts.throwIfNullOrUndefined(json, \"json\");\n const config = new PronunciationAssessmentConfig(\"\");\n config.privProperties = new PropertyCollection();\n config.properties.setProperty(PropertyId.PronunciationAssessment_Json, json);\n return config;\n }\n toJSON() {\n this.updateJson();\n return this.privProperties.getProperty(PropertyId.PronunciationAssessment_Params);\n }\n applyTo(recognizer) {\n this.updateJson();\n const recoBase = recognizer.internalData;\n recoBase.speechContext.setPronunciationAssessmentParams(this.properties.getProperty(PropertyId.PronunciationAssessment_Params));\n }\n /**\n * Gets the reference text.\n * @member PronunciationAssessmentConfig.prototype.referenceText\n * @function\n * @public\n * @returns {string} Reference text.\n */\n get referenceText() {\n return this.properties.getProperty(PropertyId.PronunciationAssessment_ReferenceText);\n }\n /**\n * Gets/Sets the reference text.\n * @member PronunciationAssessmentConfig.prototype.referenceText\n * @function\n * @public\n * @param {string} referenceText - Reference text.\n */\n set referenceText(referenceText) {\n Contracts.throwIfNullOrWhitespace(referenceText, \"referenceText\");\n this.properties.setProperty(PropertyId.PronunciationAssessment_ReferenceText, referenceText);\n }\n /**\n * @member PronunciationAssessmentConfig.prototype.properties\n * @function\n * @public\n * @return {PropertyCollection} Properties of the config.\n * @summary Gets a pronunciation assessment config properties\n */\n get properties() {\n return this.privProperties;\n }\n updateJson() {\n const jsonString = this.privProperties.getProperty(PropertyId.PronunciationAssessment_Json, \"{}\");\n const paramsJson = JSON.parse(jsonString);\n const referenceText = this.privProperties.getProperty(PropertyId.PronunciationAssessment_ReferenceText);\n if (referenceText) {\n paramsJson.referenceText = referenceText;\n }\n const gradingSystem = this.privProperties.getProperty(PropertyId.PronunciationAssessment_GradingSystem);\n if (gradingSystem) {\n paramsJson.gradingSystem = gradingSystem;\n }\n const granularity = this.privProperties.getProperty(PropertyId.PronunciationAssessment_Granularity);\n if (granularity) {\n paramsJson.granularity = granularity;\n }\n // always set dimension to Comprehensive\n paramsJson.dimension = \"Comprehensive\";\n const enableMiscueString = this.privProperties.getProperty(PropertyId.PronunciationAssessment_EnableMiscue);\n if (enableMiscueString === \"true\") {\n paramsJson.enableMiscue = true;\n }\n else if (enableMiscueString === \"false\") {\n paramsJson.enableMiscue = false;\n }\n this.privProperties.setProperty(PropertyId.PronunciationAssessment_Params, JSON.stringify(paramsJson));\n }\n}\n\n//# sourceMappingURL=PronunciationAssessmentConfig.js.map\n","// Copyright (c) Microsoft Corporation. All rights reserved.\n// Licensed under the MIT license.\n/**\n * Define Speech Recognizer output formats.\n * @class OutputFormat\n */\nexport var OutputFormat;\n(function (OutputFormat) {\n /**\n * @member OutputFormat.Simple\n */\n OutputFormat[OutputFormat[\"Simple\"] = 0] = \"Simple\";\n /**\n * @member OutputFormat.Detailed\n */\n OutputFormat[OutputFormat[\"Detailed\"] = 1] = \"Detailed\";\n})(OutputFormat || (OutputFormat = {}));\n\n//# sourceMappingURL=OutputFormat.js.map\n","// Copyright (c) Microsoft Corporation. All rights reserved.\n// Licensed under the MIT license.\nimport { CancellationErrorCodePropertyName } from \"../common.speech/Exports\";\nimport { Contracts } from \"./Contracts\";\nimport { CancellationDetailsBase, CancellationErrorCode, CancellationReason, PropertyCollection, ResultReason, } from \"./Exports\";\n/**\n * Output format\n * @class VoiceProfileResult\n */\nexport class VoiceProfileResult {\n constructor(reason, statusText) {\n this.privReason = reason;\n this.privProperties = new PropertyCollection();\n if (reason === ResultReason.Canceled) {\n Contracts.throwIfNullOrUndefined(statusText, \"statusText\");\n this.privErrorDetails = statusText;\n this.privProperties.setProperty(CancellationErrorCodePropertyName, CancellationErrorCode[CancellationErrorCode.ServiceError]);\n }\n }\n get reason() {\n return this.privReason;\n }\n get properties() {\n return this.privProperties;\n }\n get errorDetails() {\n return this.privErrorDetails;\n }\n}\n/**\n * @class VoiceProfileCancellationDetails\n */\n// tslint:disable-next-line:max-classes-per-file\nexport class VoiceProfileCancellationDetails extends CancellationDetailsBase {\n constructor(reason, errorDetails, errorCode) {\n super(reason, errorDetails, errorCode);\n }\n /**\n * Creates an instance of VoiceProfileCancellationDetails object for the canceled VoiceProfileResult.\n * @member VoiceProfileCancellationDetails.fromResult\n * @function\n * @public\n * @param {VoiceProfileResult} result - The result that was canceled.\n * @returns {VoiceProfileCancellationDetails} The cancellation details object being created.\n */\n static fromResult(result) {\n const reason = CancellationReason.Error;\n let errorCode = CancellationErrorCode.NoError;\n if (!!result.properties) {\n errorCode = CancellationErrorCode[result.properties.getProperty(CancellationErrorCodePropertyName, CancellationErrorCode[CancellationErrorCode.NoError])];\n }\n return new VoiceProfileCancellationDetails(reason, result.errorDetails, errorCode);\n }\n}\n\n//# sourceMappingURL=VoiceProfileResult.js.map\n","// Copyright (c) Microsoft Corporation. All rights reserved.\n// Licensed under the MIT license.\nimport { Contracts } from \"./Contracts\";\nimport { VoiceProfileType, } from \"./Exports\";\n/**\n * Defines SpeakerIdentificationModel class for Speaker Recognition\n * Model contains a set of profiles against which to identify speaker(s)\n * @class SpeakerIdentificationModel\n */\nexport class SpeakerIdentificationModel {\n constructor(profiles) {\n this.privVoiceProfiles = [];\n Contracts.throwIfNullOrUndefined(profiles, \"VoiceProfiles\");\n if (profiles.length === 0) {\n throw new Error(\"Empty Voice Profiles array\");\n }\n profiles.forEach((profile) => {\n if (profile.profileType !== VoiceProfileType.TextIndependentIdentification) {\n throw new Error(\"Identification model can only be created from Identification profile: \" + profile.profileId);\n }\n this.privVoiceProfiles.push(profile);\n });\n }\n static fromProfiles(profiles) {\n return new SpeakerIdentificationModel(profiles);\n }\n get voiceProfileIds() {\n return this.privVoiceProfiles.map((profile) => profile.profileId).join(\",\");\n }\n}\n\n//# sourceMappingURL=SpeakerIdentificationModel.js.map\n","// Copyright (c) Microsoft Corporation. All rights reserved.\n// Licensed under the MIT license.\nimport { PropertyId } from \"./Exports\";\n/**\n * Represents collection of properties and their values.\n * @class PropertyCollection\n */\nexport class PropertyCollection {\n constructor() {\n this.privKeys = [];\n this.privValues = [];\n }\n /**\n * Returns the property value in type String. The parameter must have the same type as String.\n * Currently only String, int and bool are allowed.\n * If the name is not available, the specified defaultValue is returned.\n * @member PropertyCollection.prototype.getProperty\n * @function\n * @public\n * @param {string} key - The parameter name.\n * @param {string} def - The default value which is returned if the parameter\n * is not available in the collection.\n * @returns {string} value of the parameter.\n */\n getProperty(key, def) {\n let keyToUse;\n if (typeof key === \"string\") {\n keyToUse = key;\n }\n else {\n keyToUse = PropertyId[key];\n }\n for (let n = 0; n < this.privKeys.length; n++) {\n if (this.privKeys[n] === keyToUse) {\n return this.privValues[n];\n }\n }\n return def;\n }\n /**\n * Sets the String value of the parameter specified by name.\n * @member PropertyCollection.prototype.setProperty\n * @function\n * @public\n * @param {string} key - The parameter name.\n * @param {string} value - The value of the parameter.\n */\n setProperty(key, value) {\n let keyToUse;\n if (typeof key === \"string\") {\n keyToUse = key;\n }\n else {\n keyToUse = PropertyId[key];\n }\n for (let n = 0; n < this.privKeys.length; n++) {\n if (this.privKeys[n] === keyToUse) {\n this.privValues[n] = value;\n return;\n }\n }\n this.privKeys.push(keyToUse);\n this.privValues.push(value);\n }\n /**\n * Clones the collection.\n * @member PropertyCollection.prototype.clone\n * @function\n * @public\n * @returns {PropertyCollection} A copy of the collection.\n */\n clone() {\n const clonedMap = new PropertyCollection();\n for (let n = 0; n < this.privKeys.length; n++) {\n clonedMap.privKeys.push(this.privKeys[n]);\n clonedMap.privValues.push(this.privValues[n]);\n }\n return clonedMap;\n }\n /**\n * Merges this set of properties into another, no overwrites.\n * @member PropertyCollection.prototype.mergeTo\n * @function\n * @public\n * @param {PropertyCollection} The collection to merge into.\n */\n mergeTo(destinationCollection) {\n this.privKeys.forEach((key) => {\n if (destinationCollection.getProperty(key, undefined) === undefined) {\n const value = this.getProperty(key);\n destinationCollection.setProperty(key, value);\n }\n });\n }\n}\n\n//# sourceMappingURL=PropertyCollection.js.map\n","// Copyright (c) Microsoft Corporation. All rights reserved.\n// Licensed under the MIT license.\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nimport { CognitiveSubscriptionKeyAuthentication, CognitiveTokenAuthentication, Context, OS, ServiceRecognizerBase, SpeechServiceConfig, } from \"../common.speech/Exports\";\nimport { Deferred, marshalPromiseToCallbacks } from \"../common/Exports\";\nimport { Contracts } from \"./Contracts\";\nimport { AudioConfig, PropertyId, } from \"./Exports\";\n/**\n * Defines the base class Recognizer which mainly contains common event handlers.\n * @class Recognizer\n */\nexport class Recognizer {\n /**\n * Creates and initializes an instance of a Recognizer\n * @constructor\n * @param {AudioConfig} audioInput - An optional audio input stream associated with the recognizer\n */\n constructor(audioConfig, properties, connectionFactory) {\n this.audioConfig = (audioConfig !== undefined) ? audioConfig : AudioConfig.fromDefaultMicrophoneInput();\n this.privDisposed = false;\n this.privProperties = properties.clone();\n this.privConnectionFactory = connectionFactory;\n this.implCommonRecognizerSetup();\n }\n /**\n * Dispose of associated resources.\n * @member Recognizer.prototype.close\n * @function\n * @public\n */\n close(cb, errorCb) {\n Contracts.throwIfDisposed(this.privDisposed);\n marshalPromiseToCallbacks(this.dispose(true), cb, errorCb);\n }\n /**\n * @Internal\n * Internal data member to support fromRecognizer* pattern methods on other classes.\n * Do not use externally, object returned will change without warning or notice.\n */\n get internalData() {\n return this.privReco;\n }\n /**\n * This method performs cleanup of resources.\n * The Boolean parameter disposing indicates whether the method is called\n * from Dispose (if disposing is true) or from the finalizer (if disposing is false).\n * Derived classes should override this method to dispose resource if needed.\n * @member Recognizer.prototype.dispose\n * @function\n * @public\n * @param {boolean} disposing - Flag to request disposal.\n */\n dispose(disposing) {\n return __awaiter(this, void 0, void 0, function* () {\n if (this.privDisposed) {\n return;\n }\n this.privDisposed = true;\n if (disposing) {\n if (this.privReco) {\n yield this.privReco.audioSource.turnOff();\n yield this.privReco.dispose();\n }\n }\n });\n }\n /**\n * This method returns the current state of the telemetry setting.\n * @member Recognizer.prototype.telemetryEnabled\n * @function\n * @public\n * @returns true if the telemetry is enabled, false otherwise.\n */\n static get telemetryEnabled() {\n return ServiceRecognizerBase.telemetryDataEnabled;\n }\n /**\n * This method globally enables or disables telemetry.\n * @member Recognizer.prototype.enableTelemetry\n * @function\n * @public\n * @param enabled - Global setting for telemetry collection.\n * If set to true, telemetry information like microphone errors,\n * recognition errors are collected and sent to Microsoft.\n * If set to false, no telemetry is sent to Microsoft.\n */\n /* tslint:disable:member-ordering */\n static enableTelemetry(enabled) {\n ServiceRecognizerBase.telemetryDataEnabled = enabled;\n }\n // Does the generic recognizer setup that is common across all recognizer types.\n implCommonRecognizerSetup() {\n let osPlatform = (typeof window !== \"undefined\") ? \"Browser\" : \"Node\";\n let osName = \"unknown\";\n let osVersion = \"unknown\";\n if (typeof navigator !== \"undefined\") {\n osPlatform = osPlatform + \"/\" + navigator.platform;\n osName = navigator.userAgent;\n osVersion = navigator.appVersion;\n }\n const recognizerConfig = this.createRecognizerConfig(new SpeechServiceConfig(new Context(new OS(osPlatform, osName, osVersion))));\n this.privReco = this.createServiceRecognizer(Recognizer.getAuthFromProperties(this.privProperties), this.privConnectionFactory, this.audioConfig, recognizerConfig);\n }\n recognizeOnceAsyncImpl(recognitionMode) {\n return __awaiter(this, void 0, void 0, function* () {\n Contracts.throwIfDisposed(this.privDisposed);\n const ret = new Deferred();\n yield this.implRecognizerStop();\n yield this.privReco.recognize(recognitionMode, ret.resolve, ret.reject);\n const result = yield ret.promise;\n yield this.implRecognizerStop();\n return result;\n });\n }\n startContinuousRecognitionAsyncImpl(recognitionMode) {\n return __awaiter(this, void 0, void 0, function* () {\n Contracts.throwIfDisposed(this.privDisposed);\n yield this.implRecognizerStop();\n yield this.privReco.recognize(recognitionMode, undefined, undefined);\n });\n }\n stopContinuousRecognitionAsyncImpl() {\n return __awaiter(this, void 0, void 0, function* () {\n Contracts.throwIfDisposed(this.privDisposed);\n yield this.implRecognizerStop();\n });\n }\n implRecognizerStop() {\n return __awaiter(this, void 0, void 0, function* () {\n if (this.privReco) {\n yield this.privReco.stopRecognizing();\n }\n return;\n });\n }\n static getAuthFromProperties(properties) {\n const subscriptionKey = properties.getProperty(PropertyId.SpeechServiceConnection_Key, undefined);\n const authentication = (subscriptionKey && subscriptionKey !== \"\") ?\n new CognitiveSubscriptionKeyAuthentication(subscriptionKey) :\n new CognitiveTokenAuthentication((authFetchEventId) => {\n const authorizationToken = properties.getProperty(PropertyId.SpeechServiceAuthorization_Token, undefined);\n return Promise.resolve(authorizationToken);\n }, (authFetchEventId) => {\n const authorizationToken = properties.getProperty(PropertyId.SpeechServiceAuthorization_Token, undefined);\n return Promise.resolve(authorizationToken);\n });\n return authentication;\n }\n}\n\n//# sourceMappingURL=Recognizer.js.map\n","// Copyright (c) Microsoft Corporation. All rights reserved.\n// Licensed under the MIT license.\n/**\n * Defines Voice Profile class for Speaker Recognition\n * @class VoiceProfile\n */\nexport class VoiceProfile {\n /**\n * Creates and initializes an instance of this class.\n * @constructor\n * @param {string} profileId - profileId of this Voice Profile.\n * @param {VoiceProfileType} profileType - profileType of this Voice Profile.\n */\n constructor(profileId, profileType) {\n this.privId = profileId;\n this.privProfileType = profileType;\n }\n /**\n * profileId of this Voice Profile instance\n * @member VoiceProfile.prototype.profileId\n * @function\n * @public\n * @returns {string} profileId of this Voice Profile instance.\n */\n get profileId() {\n return this.privId;\n }\n /**\n * profileType of this Voice Profile instance\n * @member VoiceProfile.prototype.profileType\n * @function\n * @public\n * @returns {VoiceProfileType} profile type of this Voice Profile instance.\n */\n get profileType() {\n return this.privProfileType;\n }\n}\n\n//# sourceMappingURL=VoiceProfile.js.map\n","// Copyright (c) Microsoft Corporation. All rights reserved.\n// Licensed under the MIT license.\n/**\n * Defines contents of speech synthesis word boundary event.\n * @class SpeechSynthesisWordBoundaryEventArgs\n * Added in version 1.11.0\n */\nexport class SpeechSynthesisWordBoundaryEventArgs {\n /**\n * Creates and initializes an instance of this class.\n * @constructor\n * @param {number} audioOffset - The audio offset.\n * @param {string} text - The text.\n * @param {number} wordLength - The length of the word.\n * @param {number} textOffset - The text offset.\n */\n constructor(audioOffset, text, wordLength, textOffset) {\n this.privAudioOffset = audioOffset;\n this.privText = text;\n this.privWordLength = wordLength;\n this.privTextOffset = textOffset;\n }\n /**\n * Specifies the audio offset.\n * @member SpeechSynthesisWordBoundaryEventArgs.prototype.audioOffset\n * @function\n * @public\n * @returns {number} the audio offset.\n */\n get audioOffset() {\n return this.privAudioOffset;\n }\n /**\n * Specifies the text of the word boundary event.\n * @member SpeechSynthesisWordBoundaryEventArgs.prototype.text\n * @function\n * @public\n * @returns {string} the text.\n */\n get text() {\n return this.privText;\n }\n /**\n * Specifies the word length\n * @member SpeechSynthesisWordBoundaryEventArgs.prototype.wordLength\n * @function\n * @public\n * @returns {number} the word length\n */\n get wordLength() {\n return this.privWordLength;\n }\n /**\n * Specifies the text offset.\n * @member SpeechSynthesisWordBoundaryEventArgs.prototype.textOffset\n * @function\n * @public\n * @returns {number} the text offset.\n */\n get textOffset() {\n return this.privTextOffset;\n }\n}\n\n//# sourceMappingURL=SpeechSynthesisWordBoundaryEventArgs.js.map\n","// Copyright (c) Microsoft Corporation. All rights reserved.\n// Licensed under the MIT license.\n/**\n * Defines the point system for pronunciation score calibration; default value is FivePoint.\n * Added in version 1.15.0\n * @class PronunciationAssessmentGradingSystem\n */\nexport var PronunciationAssessmentGradingSystem;\n(function (PronunciationAssessmentGradingSystem) {\n /**\n * Five point calibration\n * @member PronunciationAssessmentGradingSystem.FivePoint\n */\n PronunciationAssessmentGradingSystem[PronunciationAssessmentGradingSystem[\"FivePoint\"] = 1] = \"FivePoint\";\n /**\n * Hundred mark\n * @member PronunciationAssessmentGradingSystem.HundredMark\n */\n PronunciationAssessmentGradingSystem[PronunciationAssessmentGradingSystem[\"HundredMark\"] = 2] = \"HundredMark\";\n})(PronunciationAssessmentGradingSystem || (PronunciationAssessmentGradingSystem = {}));\n\n//# sourceMappingURL=PronunciationAssessmentGradingSystem.js.map\n","// Copyright (c) Microsoft Corporation. All rights reserved.\n// Licensed under the MIT license.\nimport { SessionEventArgs } from \"./Exports\";\n/**\n * Defines payload for session events like Speech Start/End Detected\n * @class\n */\nexport class RecognitionEventArgs extends SessionEventArgs {\n /**\n * Creates and initializes an instance of this class.\n * @constructor\n * @param {number} offset - The offset.\n * @param {string} sessionId - The session id.\n */\n constructor(offset, sessionId) {\n super(sessionId);\n this.privOffset = offset;\n }\n /**\n * Represents the message offset\n * @member RecognitionEventArgs.prototype.offset\n * @function\n * @public\n */\n get offset() {\n return this.privOffset;\n }\n}\n\n//# sourceMappingURL=RecognitionEventArgs.js.map\n","// Copyright (c) Microsoft Corporation. All rights reserved.\n// Licensed under the MIT license.\n// Multi-device Conversation is a Preview feature.\nimport { TranslationRecognitionResult } from \"../TranslationRecognitionResult\";\nexport class ConversationTranslationResult extends TranslationRecognitionResult {\n constructor(participantId, translations, originalLanguage, resultId, reason, text, duration, offset, errorDetails, json, properties) {\n super(translations, resultId, reason, text, duration, offset, errorDetails, json, properties);\n this.privId = participantId;\n this.privOrigLang = originalLanguage;\n }\n /**\n * The unique identifier for the participant this result is for.\n */\n get participantId() {\n return this.privId;\n }\n /**\n * The original language this result was in.\n */\n get originalLang() {\n return this.privOrigLang;\n }\n}\n\n//# sourceMappingURL=ConversationTranslationResult.js.map\n","// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n/**\n * Profanity option.\n * Added in version 1.7.0.\n */\nexport var ProfanityOption;\n(function (ProfanityOption) {\n ProfanityOption[ProfanityOption[\"Masked\"] = 0] = \"Masked\";\n ProfanityOption[ProfanityOption[\"Removed\"] = 1] = \"Removed\";\n ProfanityOption[ProfanityOption[\"Raw\"] = 2] = \"Raw\";\n})(ProfanityOption || (ProfanityOption = {}));\n\n//# sourceMappingURL=ProfanityOption.js.map\n","// Copyright (c) Microsoft Corporation. All rights reserved.\n// Licensed under the MIT license.\n/**\n * Output format\n * @class VoiceProfileType\n */\nexport var VoiceProfileType;\n(function (VoiceProfileType) {\n /**\n * Text independent speaker identification\n * @member VoiceProfileType.TextIndependentIdentification\n */\n VoiceProfileType[VoiceProfileType[\"TextIndependentIdentification\"] = 0] = \"TextIndependentIdentification\";\n /**\n * Text dependent speaker verification\n * @member VoiceProfileType.TextDependentVerification\n */\n VoiceProfileType[VoiceProfileType[\"TextDependentVerification\"] = 1] = \"TextDependentVerification\";\n /**\n * Text independent speaker verification\n * @member VoiceProfileType.TextIndependentVerification\n */\n VoiceProfileType[VoiceProfileType[\"TextIndependentVerification\"] = 2] = \"TextIndependentVerification\";\n})(VoiceProfileType || (VoiceProfileType = {}));\n\n//# sourceMappingURL=VoiceProfileType.js.map\n","module.exports = __webpack_public_path__ + \"img/keyBoard.a00c73db.png\";","// Copyright (c) Microsoft Corporation. All rights reserved.\n// Licensed under the MIT license.\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nimport { RecognitionMode, RecognizerConfig, TranslationConnectionFactory, TranslationServiceRecognizer, } from \"../common.speech/Exports\";\nimport { marshalPromiseToCallbacks } from \"../common/Exports\";\nimport { Contracts } from \"./Contracts\";\nimport { PropertyId, Recognizer, } from \"./Exports\";\n/**\n * Translation recognizer\n * @class TranslationRecognizer\n */\nexport class TranslationRecognizer extends Recognizer {\n /**\n * Initializes an instance of the TranslationRecognizer.\n * @constructor\n * @param {SpeechTranslationConfig} speechConfig - Set of properties to configure this recognizer.\n * @param {AudioConfig} audioConfig - An optional audio config associated with the recognizer\n */\n constructor(speechConfig, audioConfig) {\n const configImpl = speechConfig;\n Contracts.throwIfNull(configImpl, \"speechConfig\");\n super(audioConfig, configImpl.properties, new TranslationConnectionFactory());\n this.privDisposedTranslationRecognizer = false;\n this.privProperties = configImpl.properties.clone();\n if (this.properties.getProperty(PropertyId.SpeechServiceConnection_TranslationVoice, undefined) !== undefined) {\n Contracts.throwIfNullOrWhitespace(this.properties.getProperty(PropertyId.SpeechServiceConnection_TranslationVoice), PropertyId[PropertyId.SpeechServiceConnection_TranslationVoice]);\n }\n Contracts.throwIfNullOrWhitespace(this.properties.getProperty(PropertyId.SpeechServiceConnection_TranslationToLanguages), PropertyId[PropertyId.SpeechServiceConnection_TranslationToLanguages]);\n Contracts.throwIfNullOrWhitespace(this.properties.getProperty(PropertyId.SpeechServiceConnection_RecoLanguage), PropertyId[PropertyId.SpeechServiceConnection_RecoLanguage]);\n }\n /**\n * Gets the language name that was set when the recognizer was created.\n * @member TranslationRecognizer.prototype.speechRecognitionLanguage\n * @function\n * @public\n * @returns {string} Gets the language name that was set when the recognizer was created.\n */\n get speechRecognitionLanguage() {\n Contracts.throwIfDisposed(this.privDisposedTranslationRecognizer);\n return this.properties.getProperty(PropertyId.SpeechServiceConnection_RecoLanguage);\n }\n /**\n * Gets target languages for translation that were set when the recognizer was created.\n * The language is specified in BCP-47 format. The translation will provide translated text for each of language.\n * @member TranslationRecognizer.prototype.targetLanguages\n * @function\n * @public\n * @returns {string[]} Gets target languages for translation that were set when the recognizer was created.\n */\n get targetLanguages() {\n Contracts.throwIfDisposed(this.privDisposedTranslationRecognizer);\n return this.properties.getProperty(PropertyId.SpeechServiceConnection_TranslationToLanguages).split(\",\");\n }\n /**\n * Gets the name of output voice.\n * @member TranslationRecognizer.prototype.voiceName\n * @function\n * @public\n * @returns {string} the name of output voice.\n */\n get voiceName() {\n Contracts.throwIfDisposed(this.privDisposedTranslationRecognizer);\n return this.properties.getProperty(PropertyId.SpeechServiceConnection_TranslationVoice, undefined);\n }\n /**\n * Gets the authorization token used to communicate with the service.\n * @member TranslationRecognizer.prototype.authorizationToken\n * @function\n * @public\n * @returns {string} Authorization token.\n */\n get authorizationToken() {\n return this.properties.getProperty(PropertyId.SpeechServiceAuthorization_Token);\n }\n /**\n * Gets/Sets the authorization token used to communicate with the service.\n * @member TranslationRecognizer.prototype.authorizationToken\n * @function\n * @public\n * @param {string} value - Authorization token.\n */\n set authorizationToken(value) {\n this.properties.setProperty(PropertyId.SpeechServiceAuthorization_Token, value);\n }\n /**\n * The collection of properties and their values defined for this TranslationRecognizer.\n * @member TranslationRecognizer.prototype.properties\n * @function\n * @public\n * @returns {PropertyCollection} The collection of properties and their values defined for this TranslationRecognizer.\n */\n get properties() {\n return this.privProperties;\n }\n /**\n * Starts recognition and translation, and stops after the first utterance is recognized.\n * The task returns the translation text as result.\n * Note: recognizeOnceAsync returns when the first utterance has been recognized, so it is suitableonly\n * for single shot recognition like command or query. For long-running recognition,\n * use startContinuousRecognitionAsync() instead.\n * @member TranslationRecognizer.prototype.recognizeOnceAsync\n * @function\n * @public\n * @param cb - Callback that received the result when the translation has completed.\n * @param err - Callback invoked in case of an error.\n */\n recognizeOnceAsync(cb, err) {\n Contracts.throwIfDisposed(this.privDisposedTranslationRecognizer);\n marshalPromiseToCallbacks(this.recognizeOnceAsyncImpl(RecognitionMode.Conversation), cb, err);\n }\n /**\n * Starts recognition and translation, until stopContinuousRecognitionAsync() is called.\n * User must subscribe to events to receive translation results.\n * @member TranslationRecognizer.prototype.startContinuousRecognitionAsync\n * @function\n * @public\n * @param cb - Callback that received the translation has started.\n * @param err - Callback invoked in case of an error.\n */\n startContinuousRecognitionAsync(cb, err) {\n marshalPromiseToCallbacks(this.startContinuousRecognitionAsyncImpl(RecognitionMode.Conversation), cb, err);\n }\n /**\n * Stops continuous recognition and translation.\n * @member TranslationRecognizer.prototype.stopContinuousRecognitionAsync\n * @function\n * @public\n * @param cb - Callback that received the translation has stopped.\n * @param err - Callback invoked in case of an error.\n */\n stopContinuousRecognitionAsync(cb, err) {\n marshalPromiseToCallbacks(this.stopContinuousRecognitionAsyncImpl(), cb, err);\n }\n /**\n * closes all external resources held by an instance of this class.\n * @member TranslationRecognizer.prototype.close\n * @function\n * @public\n */\n close(cb, errorCb) {\n Contracts.throwIfDisposed(this.privDisposedTranslationRecognizer);\n marshalPromiseToCallbacks(this.dispose(true), cb, errorCb);\n }\n dispose(disposing) {\n const _super = Object.create(null, {\n dispose: { get: () => super.dispose }\n });\n return __awaiter(this, void 0, void 0, function* () {\n if (this.privDisposedTranslationRecognizer) {\n return;\n }\n this.privDisposedTranslationRecognizer = true;\n if (disposing) {\n yield this.implRecognizerStop();\n yield _super.dispose.call(this, disposing);\n }\n });\n }\n createRecognizerConfig(speechConfig) {\n return new RecognizerConfig(speechConfig, this.properties);\n }\n createServiceRecognizer(authentication, connectionFactory, audioConfig, recognizerConfig) {\n const configImpl = audioConfig;\n return new TranslationServiceRecognizer(authentication, connectionFactory, configImpl, recognizerConfig, this);\n }\n}\n\n//# sourceMappingURL=TranslationRecognizer.js.map\n","// Copyright (c) Microsoft Corporation. All rights reserved.\n// Licensed under the MIT license.\nimport { ForceDictationPropertyName, OutputFormatPropertyName, ServicePropertiesPropertyName } from \"../common.speech/Exports\";\nimport { Contracts } from \"./Contracts\";\nimport { OutputFormat, ProfanityOption, PropertyCollection, PropertyId, SpeechConfig, SpeechSynthesisOutputFormat, } from \"./Exports\";\n/**\n * Speech translation configuration.\n * @class SpeechTranslationConfig\n */\nexport class SpeechTranslationConfig extends SpeechConfig {\n /**\n * Creates an instance of recognizer config.\n */\n constructor() {\n super();\n }\n /**\n * Static instance of SpeechTranslationConfig returned by passing a subscription key and service region.\n * @member SpeechTranslationConfig.fromSubscription\n * @function\n * @public\n * @param {string} subscriptionKey - The subscription key.\n * @param {string} region - The region name (see the region page).\n * @returns {SpeechTranslationConfig} The speech translation config.\n */\n static fromSubscription(subscriptionKey, region) {\n Contracts.throwIfNullOrWhitespace(subscriptionKey, \"subscriptionKey\");\n Contracts.throwIfNullOrWhitespace(region, \"region\");\n const ret = new SpeechTranslationConfigImpl();\n ret.properties.setProperty(PropertyId.SpeechServiceConnection_Key, subscriptionKey);\n ret.properties.setProperty(PropertyId.SpeechServiceConnection_Region, region);\n return ret;\n }\n /**\n * Static instance of SpeechTranslationConfig returned by passing authorization token and service region.\n * Note: The caller needs to ensure that the authorization token is valid. Before the authorization token\n * expires, the caller needs to refresh it by setting the property authorizationToken with a new\n * valid token. Otherwise, all the recognizers created by this SpeechTranslationConfig instance\n * will encounter errors during recognition.\n * As configuration values are copied when creating a new recognizer, the new token value will not apply\n * to recognizers that have already been created.\n * For recognizers that have been created before, you need to set authorization token of the corresponding recognizer\n * to refresh the token. Otherwise, the recognizers will encounter errors during recognition.\n * @member SpeechTranslationConfig.fromAuthorizationToken\n * @function\n * @public\n * @param {string} authorizationToken - The authorization token.\n * @param {string} region - The region name (see the region page).\n * @returns {SpeechTranslationConfig} The speech translation config.\n */\n static fromAuthorizationToken(authorizationToken, region) {\n Contracts.throwIfNullOrWhitespace(authorizationToken, \"authorizationToken\");\n Contracts.throwIfNullOrWhitespace(region, \"region\");\n const ret = new SpeechTranslationConfigImpl();\n ret.properties.setProperty(PropertyId.SpeechServiceAuthorization_Token, authorizationToken);\n ret.properties.setProperty(PropertyId.SpeechServiceConnection_Region, region);\n return ret;\n }\n /**\n * Creates an instance of the speech config with specified host and subscription key.\n * This method is intended only for users who use a non-default service host. Standard resource path will be assumed.\n * For services with a non-standard resource path or no path at all, use fromEndpoint instead.\n * Note: Query parameters are not allowed in the host URI and must be set by other APIs.\n * Note: To use an authorization token with fromHost, use fromHost(URL),\n * and then set the AuthorizationToken property on the created SpeechConfig instance.\n * Note: Added in version 1.9.0.\n * @member SpeechConfig.fromHost\n * @function\n * @public\n * @param {URL} host - The service endpoint to connect to. Format is \"protocol://host:port\" where \":port\" is optional.\n * @param {string} subscriptionKey - The subscription key. If a subscription key is not specified, an authorization token must be set.\n * @returns {SpeechConfig} A speech factory instance.\n */\n static fromHost(hostName, subscriptionKey) {\n Contracts.throwIfNull(hostName, \"hostName\");\n const speechImpl = new SpeechTranslationConfigImpl();\n speechImpl.setProperty(PropertyId.SpeechServiceConnection_Host, hostName.protocol + \"//\" + hostName.hostname + (hostName.port === \"\" ? \"\" : \":\" + hostName.port));\n if (undefined !== subscriptionKey) {\n speechImpl.setProperty(PropertyId.SpeechServiceConnection_Key, subscriptionKey);\n }\n return speechImpl;\n }\n /**\n * Creates an instance of the speech translation config with specified endpoint and subscription key.\n * This method is intended only for users who use a non-standard service endpoint or paramters.\n * Note: The query properties specified in the endpoint URL are not changed, even if they are\n * set by any other APIs. For example, if language is defined in the uri as query parameter\n * \"language=de-DE\", and also set by the speechRecognitionLanguage property, the language\n * setting in uri takes precedence, and the effective language is \"de-DE\".\n * Only the properties that are not specified in the endpoint URL can be set by other APIs.\n * Note: To use authorization token with fromEndpoint, pass an empty string to the subscriptionKey in the\n * fromEndpoint method, and then set authorizationToken=\"token\" on the created SpeechConfig instance to\n * use the authorization token.\n * @member SpeechTranslationConfig.fromEndpoint\n * @function\n * @public\n * @param {URL} endpoint - The service endpoint to connect to.\n * @param {string} subscriptionKey - The subscription key.\n * @returns {SpeechTranslationConfig} A speech config instance.\n */\n static fromEndpoint(endpoint, subscriptionKey) {\n Contracts.throwIfNull(endpoint, \"endpoint\");\n Contracts.throwIfNull(subscriptionKey, \"subscriptionKey\");\n const ret = new SpeechTranslationConfigImpl();\n ret.properties.setProperty(PropertyId.SpeechServiceConnection_Endpoint, endpoint.href);\n ret.properties.setProperty(PropertyId.SpeechServiceConnection_Key, subscriptionKey);\n return ret;\n }\n}\n/**\n * @private\n * @class SpeechTranslationConfigImpl\n */\n// tslint:disable-next-line:max-classes-per-file\nexport class SpeechTranslationConfigImpl extends SpeechTranslationConfig {\n constructor() {\n super();\n this.privSpeechProperties = new PropertyCollection();\n this.outputFormat = OutputFormat.Simple;\n }\n /**\n * Gets/Sets the authorization token.\n * If this is set, subscription key is ignored.\n * User needs to make sure the provided authorization token is valid and not expired.\n * @member SpeechTranslationConfigImpl.prototype.authorizationToken\n * @function\n * @public\n * @param {string} value - The authorization token.\n */\n set authorizationToken(value) {\n Contracts.throwIfNullOrWhitespace(value, \"value\");\n this.privSpeechProperties.setProperty(PropertyId.SpeechServiceAuthorization_Token, value);\n }\n /**\n * Sets the speech recognition language.\n * @member SpeechTranslationConfigImpl.prototype.speechRecognitionLanguage\n * @function\n * @public\n * @param {string} value - The authorization token.\n */\n set speechRecognitionLanguage(value) {\n Contracts.throwIfNullOrWhitespace(value, \"value\");\n this.privSpeechProperties.setProperty(PropertyId.SpeechServiceConnection_RecoLanguage, value);\n }\n /**\n * Gets the speech recognition language.\n * @member SpeechTranslationConfigImpl.prototype.speechRecognitionLanguage\n * @function\n * @public\n * @return {string} The speechRecognitionLanguage.\n */\n get speechRecognitionLanguage() {\n return this.privSpeechProperties.getProperty(PropertyId[PropertyId.SpeechServiceConnection_RecoLanguage]);\n }\n /**\n * @member SpeechTranslationConfigImpl.prototype.subscriptionKey\n * @function\n * @public\n */\n get subscriptionKey() {\n return this.privSpeechProperties.getProperty(PropertyId[PropertyId.SpeechServiceConnection_Key]);\n }\n /**\n * Gets the output format\n * @member SpeechTranslationConfigImpl.prototype.outputFormat\n * @function\n * @public\n */\n get outputFormat() {\n return OutputFormat[this.privSpeechProperties.getProperty(OutputFormatPropertyName, undefined)];\n }\n /**\n * Gets/Sets the output format\n * @member SpeechTranslationConfigImpl.prototype.outputFormat\n * @function\n * @public\n */\n set outputFormat(value) {\n this.privSpeechProperties.setProperty(OutputFormatPropertyName, OutputFormat[value]);\n }\n /**\n * Gets the endpoint id.\n * @member SpeechTranslationConfigImpl.prototype.endpointId\n * @function\n * @public\n */\n get endpointId() {\n return this.privSpeechProperties.getProperty(PropertyId.SpeechServiceConnection_EndpointId);\n }\n /**\n * Gets/Sets the endpoint id.\n * @member SpeechTranslationConfigImpl.prototype.endpointId\n * @function\n * @public\n */\n set endpointId(value) {\n this.privSpeechProperties.setProperty(PropertyId.SpeechServiceConnection_EndpointId, value);\n }\n /**\n * Add a (text) target language to translate into.\n * @member SpeechTranslationConfigImpl.prototype.addTargetLanguage\n * @function\n * @public\n * @param {string} value - The language such as de-DE\n */\n addTargetLanguage(value) {\n Contracts.throwIfNullOrWhitespace(value, \"value\");\n const languages = this.targetLanguages;\n languages.push(value);\n this.privSpeechProperties.setProperty(PropertyId.SpeechServiceConnection_TranslationToLanguages, languages.join(\",\"));\n }\n /**\n * Gets the (text) target language to translate into.\n * @member SpeechTranslationConfigImpl.prototype.targetLanguages\n * @function\n * @public\n * @param {string} value - The language such as de-DE\n */\n get targetLanguages() {\n if (this.privSpeechProperties.getProperty(PropertyId.SpeechServiceConnection_TranslationToLanguages, undefined) !== undefined) {\n return this.privSpeechProperties.getProperty(PropertyId.SpeechServiceConnection_TranslationToLanguages).split(\",\");\n }\n else {\n return [];\n }\n }\n /**\n * Gets the voice name.\n * @member SpeechTranslationConfigImpl.prototype.voiceName\n * @function\n * @public\n */\n get voiceName() {\n return this.getProperty(PropertyId[PropertyId.SpeechServiceConnection_TranslationVoice]);\n }\n /**\n * Gets/Sets the voice of the translated language, enable voice synthesis output.\n * @member SpeechTranslationConfigImpl.prototype.voiceName\n * @function\n * @public\n * @param {string} value - The name of the voice.\n */\n set voiceName(value) {\n Contracts.throwIfNullOrWhitespace(value, \"value\");\n this.privSpeechProperties.setProperty(PropertyId.SpeechServiceConnection_TranslationVoice, value);\n }\n /**\n * Provides the region.\n * @member SpeechTranslationConfigImpl.prototype.region\n * @function\n * @public\n * @returns {string} The region.\n */\n get region() {\n return this.privSpeechProperties.getProperty(PropertyId.SpeechServiceConnection_Region);\n }\n setProxy(proxyHostName, proxyPort, proxyUserName, proxyPassword) {\n this.setProperty(PropertyId[PropertyId.SpeechServiceConnection_ProxyHostName], proxyHostName);\n this.setProperty(PropertyId[PropertyId.SpeechServiceConnection_ProxyPort], proxyPort);\n this.setProperty(PropertyId[PropertyId.SpeechServiceConnection_ProxyUserName], proxyUserName);\n this.setProperty(PropertyId[PropertyId.SpeechServiceConnection_ProxyPassword], proxyPassword);\n }\n /**\n * Gets an arbitrary property value.\n * @member SpeechTranslationConfigImpl.prototype.getProperty\n * @function\n * @public\n * @param {string} name - The name of the property.\n * @param {string} def - The default value of the property in case it is not set.\n * @returns {string} The value of the property.\n */\n getProperty(name, def) {\n return this.privSpeechProperties.getProperty(name, def);\n }\n /**\n * Gets/Sets an arbitrary property value.\n * @member SpeechTranslationConfigImpl.prototype.setProperty\n * @function\n * @public\n * @param {string} name - The name of the property.\n * @param {string} value - The value of the property.\n */\n setProperty(name, value) {\n this.privSpeechProperties.setProperty(name, value);\n }\n /**\n * Provides access to custom properties.\n * @member SpeechTranslationConfigImpl.prototype.properties\n * @function\n * @public\n * @returns {PropertyCollection} The properties.\n */\n get properties() {\n return this.privSpeechProperties;\n }\n /**\n * Dispose of associated resources.\n * @member SpeechTranslationConfigImpl.prototype.close\n * @function\n * @public\n */\n close() {\n return;\n }\n setServiceProperty(name, value, channel) {\n const currentProperties = JSON.parse(this.privSpeechProperties.getProperty(ServicePropertiesPropertyName, \"{}\"));\n currentProperties[name] = value;\n this.privSpeechProperties.setProperty(ServicePropertiesPropertyName, JSON.stringify(currentProperties));\n }\n setProfanity(profanity) {\n this.privSpeechProperties.setProperty(PropertyId.SpeechServiceResponse_ProfanityOption, ProfanityOption[profanity]);\n }\n enableAudioLogging() {\n this.privSpeechProperties.setProperty(PropertyId.SpeechServiceConnection_EnableAudioLogging, \"true\");\n }\n requestWordLevelTimestamps() {\n this.privSpeechProperties.setProperty(PropertyId.SpeechServiceResponse_RequestWordLevelTimestamps, \"true\");\n }\n enableDictation() {\n this.privSpeechProperties.setProperty(ForceDictationPropertyName, \"true\");\n }\n get speechSynthesisLanguage() {\n return this.privSpeechProperties.getProperty(PropertyId.SpeechServiceConnection_SynthLanguage);\n }\n set speechSynthesisLanguage(language) {\n this.privSpeechProperties.setProperty(PropertyId.SpeechServiceConnection_SynthLanguage, language);\n }\n get speechSynthesisVoiceName() {\n return this.privSpeechProperties.getProperty(PropertyId.SpeechServiceConnection_SynthVoice);\n }\n set speechSynthesisVoiceName(voice) {\n this.privSpeechProperties.setProperty(PropertyId.SpeechServiceConnection_SynthVoice, voice);\n }\n get speechSynthesisOutputFormat() {\n return SpeechSynthesisOutputFormat[this.privSpeechProperties.getProperty(PropertyId.SpeechServiceConnection_SynthOutputFormat, undefined)];\n }\n set speechSynthesisOutputFormat(format) {\n this.privSpeechProperties.setProperty(PropertyId.SpeechServiceConnection_SynthOutputFormat, SpeechSynthesisOutputFormat[format]);\n }\n}\n\n//# sourceMappingURL=SpeechTranslationConfig.js.map\n","// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n/**\n * Defines channels used to pass property settings to service.\n * Added in version 1.7.0.\n */\nexport var ServicePropertyChannel;\n(function (ServicePropertyChannel) {\n /**\n * Uses URI query parameter to pass property settings to service.\n */\n ServicePropertyChannel[ServicePropertyChannel[\"UriQueryParameter\"] = 0] = \"UriQueryParameter\";\n})(ServicePropertyChannel || (ServicePropertyChannel = {}));\n\n//# sourceMappingURL=ServicePropertyChannel.js.map\n","// Copyright (c) Microsoft Corporation. All rights reserved.\n// Licensed under the MIT license.\nimport { ForceDictationPropertyName, OutputFormatPropertyName, ServicePropertiesPropertyName } from \"../common.speech/Exports\";\nimport { Contracts } from \"./Contracts\";\nimport { OutputFormat, ProfanityOption, PropertyCollection, PropertyId, SpeechSynthesisOutputFormat, } from \"./Exports\";\n/**\n * Speech configuration.\n * @class SpeechConfig\n */\nexport class SpeechConfig {\n /**\n * Creates and initializes an instance.\n * @constructor\n */\n constructor() { }\n /**\n * Static instance of SpeechConfig returned by passing subscriptionKey and service region.\n * Note: Please use your LanguageUnderstanding subscription key in case you want to use the Intent recognizer.\n * @member SpeechConfig.fromSubscription\n * @function\n * @public\n * @param {string} subscriptionKey - The subscription key.\n * @param {string} region - The region name (see the region page).\n * @returns {SpeechConfig} The speech factory\n */\n static fromSubscription(subscriptionKey, region) {\n Contracts.throwIfNullOrWhitespace(subscriptionKey, \"subscriptionKey\");\n Contracts.throwIfNullOrWhitespace(region, \"region\");\n const speechImpl = new SpeechConfigImpl();\n speechImpl.setProperty(PropertyId.SpeechServiceConnection_Region, region);\n speechImpl.setProperty(PropertyId.SpeechServiceConnection_IntentRegion, region);\n speechImpl.setProperty(PropertyId.SpeechServiceConnection_Key, subscriptionKey);\n return speechImpl;\n }\n /**\n * Creates an instance of the speech config with specified endpoint and subscription key.\n * This method is intended only for users who use a non-standard service endpoint or parameters.\n * Note: Please use your LanguageUnderstanding subscription key in case you want to use the Intent recognizer.\n * Note: The query parameters specified in the endpoint URL are not changed, even if they are set by any other APIs.\n * For example, if language is defined in the uri as query parameter \"language=de-DE\", and also set by\n * SpeechConfig.speechRecognitionLanguage = \"en-US\", the language setting in uri takes precedence,\n * and the effective language is \"de-DE\". Only the parameters that are not specified in the\n * endpoint URL can be set by other APIs.\n * Note: To use authorization token with fromEndpoint, pass an empty string to the subscriptionKey in the\n * fromEndpoint method, and then set authorizationToken=\"token\" on the created SpeechConfig instance to\n * use the authorization token.\n * @member SpeechConfig.fromEndpoint\n * @function\n * @public\n * @param {URL} endpoint - The service endpoint to connect to.\n * @param {string} subscriptionKey - The subscription key. If a subscription key is not specified, an authorization token must be set.\n * @returns {SpeechConfig} A speech factory instance.\n */\n static fromEndpoint(endpoint, subscriptionKey) {\n Contracts.throwIfNull(endpoint, \"endpoint\");\n const speechImpl = new SpeechConfigImpl();\n speechImpl.setProperty(PropertyId.SpeechServiceConnection_Endpoint, endpoint.href);\n if (undefined !== subscriptionKey) {\n speechImpl.setProperty(PropertyId.SpeechServiceConnection_Key, subscriptionKey);\n }\n return speechImpl;\n }\n /**\n * Creates an instance of the speech config with specified host and subscription key.\n * This method is intended only for users who use a non-default service host. Standard resource path will be assumed.\n * For services with a non-standard resource path or no path at all, use fromEndpoint instead.\n * Note: Query parameters are not allowed in the host URI and must be set by other APIs.\n * Note: To use an authorization token with fromHost, use fromHost(URL),\n * and then set the AuthorizationToken property on the created SpeechConfig instance.\n * Note: Added in version 1.9.0.\n * @member SpeechConfig.fromHost\n * @function\n * @public\n * @param {URL} host - The service endpoint to connect to. Format is \"protocol://host:port\" where \":port\" is optional.\n * @param {string} subscriptionKey - The subscription key. If a subscription key is not specified, an authorization token must be set.\n * @returns {SpeechConfig} A speech factory instance.\n */\n static fromHost(hostName, subscriptionKey) {\n Contracts.throwIfNull(hostName, \"hostName\");\n const speechImpl = new SpeechConfigImpl();\n speechImpl.setProperty(PropertyId.SpeechServiceConnection_Host, hostName.protocol + \"//\" + hostName.hostname + (hostName.port === \"\" ? \"\" : \":\" + hostName.port));\n if (undefined !== subscriptionKey) {\n speechImpl.setProperty(PropertyId.SpeechServiceConnection_Key, subscriptionKey);\n }\n return speechImpl;\n }\n /**\n * Creates an instance of the speech factory with specified initial authorization token and region.\n * Note: The caller needs to ensure that the authorization token is valid. Before the authorization token\n * expires, the caller needs to refresh it by calling this setter with a new valid token.\n * Note: Please use a token derived from your LanguageUnderstanding subscription key in case you want\n * to use the Intent recognizer. As configuration values are copied when creating a new recognizer,\n * the new token value will not apply to recognizers that have already been created. For recognizers\n * that have been created before, you need to set authorization token of the corresponding recognizer\n * to refresh the token. Otherwise, the recognizers will encounter errors during recognition.\n * @member SpeechConfig.fromAuthorizationToken\n * @function\n * @public\n * @param {string} authorizationToken - The initial authorization token.\n * @param {string} region - The region name (see the region page).\n * @returns {SpeechConfig} A speech factory instance.\n */\n static fromAuthorizationToken(authorizationToken, region) {\n Contracts.throwIfNull(authorizationToken, \"authorizationToken\");\n Contracts.throwIfNullOrWhitespace(region, \"region\");\n const speechImpl = new SpeechConfigImpl();\n speechImpl.setProperty(PropertyId.SpeechServiceConnection_Region, region);\n speechImpl.setProperty(PropertyId.SpeechServiceConnection_IntentRegion, region);\n speechImpl.authorizationToken = authorizationToken;\n return speechImpl;\n }\n /**\n * Closes the configuration.\n * @member SpeechConfig.prototype.close\n * @function\n * @public\n */\n /* tslint:disable:no-empty */\n close() { }\n}\n/**\n * @public\n * @class SpeechConfigImpl\n */\n// tslint:disable-next-line:max-classes-per-file\nexport class SpeechConfigImpl extends SpeechConfig {\n constructor() {\n super();\n this.privProperties = new PropertyCollection();\n this.speechRecognitionLanguage = \"en-US\"; // Should we have a default?\n this.outputFormat = OutputFormat.Simple;\n }\n get properties() {\n return this.privProperties;\n }\n get endPoint() {\n return new URL(this.privProperties.getProperty(PropertyId.SpeechServiceConnection_Endpoint));\n }\n get subscriptionKey() {\n return this.privProperties.getProperty(PropertyId.SpeechServiceConnection_Key);\n }\n get region() {\n return this.privProperties.getProperty(PropertyId.SpeechServiceConnection_Region);\n }\n get authorizationToken() {\n return this.privProperties.getProperty(PropertyId.SpeechServiceAuthorization_Token);\n }\n set authorizationToken(value) {\n this.privProperties.setProperty(PropertyId.SpeechServiceAuthorization_Token, value);\n }\n get speechRecognitionLanguage() {\n return this.privProperties.getProperty(PropertyId.SpeechServiceConnection_RecoLanguage);\n }\n set speechRecognitionLanguage(value) {\n this.privProperties.setProperty(PropertyId.SpeechServiceConnection_RecoLanguage, value);\n }\n get autoDetectSourceLanguages() {\n return this.privProperties.getProperty(PropertyId.SpeechServiceConnection_AutoDetectSourceLanguages);\n }\n set autoDetectSourceLanguages(value) {\n this.privProperties.setProperty(PropertyId.SpeechServiceConnection_AutoDetectSourceLanguages, value);\n }\n get outputFormat() {\n return OutputFormat[this.privProperties.getProperty(OutputFormatPropertyName, undefined)];\n }\n set outputFormat(value) {\n this.privProperties.setProperty(OutputFormatPropertyName, OutputFormat[value]);\n }\n get endpointId() {\n return this.privProperties.getProperty(PropertyId.SpeechServiceConnection_EndpointId);\n }\n set endpointId(value) {\n this.privProperties.setProperty(PropertyId.SpeechServiceConnection_EndpointId, value);\n }\n setProperty(name, value) {\n Contracts.throwIfNull(value, \"value\");\n this.privProperties.setProperty(name, value);\n }\n getProperty(name, def) {\n return this.privProperties.getProperty(name, def);\n }\n setProxy(proxyHostName, proxyPort, proxyUserName, proxyPassword) {\n this.setProperty(PropertyId[PropertyId.SpeechServiceConnection_ProxyHostName], proxyHostName);\n this.setProperty(PropertyId[PropertyId.SpeechServiceConnection_ProxyPort], proxyPort);\n this.setProperty(PropertyId[PropertyId.SpeechServiceConnection_ProxyUserName], proxyUserName);\n this.setProperty(PropertyId[PropertyId.SpeechServiceConnection_ProxyPassword], proxyPassword);\n }\n setServiceProperty(name, value, channel) {\n const currentProperties = JSON.parse(this.privProperties.getProperty(ServicePropertiesPropertyName, \"{}\"));\n currentProperties[name] = value;\n this.privProperties.setProperty(ServicePropertiesPropertyName, JSON.stringify(currentProperties));\n }\n setProfanity(profanity) {\n this.privProperties.setProperty(PropertyId.SpeechServiceResponse_ProfanityOption, ProfanityOption[profanity]);\n }\n enableAudioLogging() {\n this.privProperties.setProperty(PropertyId.SpeechServiceConnection_EnableAudioLogging, \"true\");\n }\n requestWordLevelTimestamps() {\n this.privProperties.setProperty(PropertyId.SpeechServiceResponse_RequestWordLevelTimestamps, \"true\");\n }\n enableDictation() {\n this.privProperties.setProperty(ForceDictationPropertyName, \"true\");\n }\n clone() {\n const ret = new SpeechConfigImpl();\n ret.privProperties = this.privProperties.clone();\n return ret;\n }\n get speechSynthesisLanguage() {\n return this.privProperties.getProperty(PropertyId.SpeechServiceConnection_SynthLanguage);\n }\n set speechSynthesisLanguage(language) {\n this.privProperties.setProperty(PropertyId.SpeechServiceConnection_SynthLanguage, language);\n }\n get speechSynthesisVoiceName() {\n return this.privProperties.getProperty(PropertyId.SpeechServiceConnection_SynthVoice);\n }\n set speechSynthesisVoiceName(voice) {\n this.privProperties.setProperty(PropertyId.SpeechServiceConnection_SynthVoice, voice);\n }\n get speechSynthesisOutputFormat() {\n return SpeechSynthesisOutputFormat[this.privProperties.getProperty(PropertyId.SpeechServiceConnection_SynthOutputFormat, undefined)];\n }\n set speechSynthesisOutputFormat(format) {\n this.privProperties.setProperty(PropertyId.SpeechServiceConnection_SynthOutputFormat, SpeechSynthesisOutputFormat[format]);\n }\n}\n\n//# sourceMappingURL=SpeechConfig.js.map\n","// Copyright (c) Microsoft Corporation. All rights reserved.\n// Licensed under the MIT license.\nimport { RecognitionResult } from \"./Exports\";\n/**\n * Defines result of speech recognition.\n * @class SpeechRecognitionResult\n */\nexport class SpeechRecognitionResult extends RecognitionResult {\n /**\n * Creates and initializes an instance of this class.\n * @constructor\n * @public\n * @param {string} resultId - The result id.\n * @param {ResultReason} reason - The reason.\n * @param {string} text - The recognized text.\n * @param {number} duration - The duration.\n * @param {number} offset - The offset into the stream.\n * @param {string} language - Primary Language detected, if provided.\n * @param {string} languageDetectionConfidence - Primary Language confidence (\"Unknown,\" \"Low,\" \"Medium,\" \"High\"...), if provided.\n * @param {string} speakerId - speaker id for conversation transcription, if provided.\n * @param {string} errorDetails - Error details, if provided.\n * @param {string} json - Additional Json, if provided.\n * @param {PropertyCollection} properties - Additional properties, if provided.\n */\n constructor(resultId, reason, text, duration, offset, language, languageDetectionConfidence, speakerId, errorDetails, json, properties) {\n super(resultId, reason, text, duration, offset, language, languageDetectionConfidence, errorDetails, json, properties);\n this.privSpeakerId = speakerId;\n }\n /**\n * speaker id from conversation transcription/id scenarios\n * @member SpeechRecognitionResult.prototype.speakerId\n * @function\n * @public\n * @returns {string} id of speaker in given result\n */\n get speakerId() {\n return this.privSpeakerId;\n }\n}\n\n//# sourceMappingURL=SpeechRecognitionResult.js.map\n","// Copyright (c) Microsoft Corporation. All rights reserved.\n// Licensed under the MIT license.\nimport { Contracts } from \"./Contracts\";\nimport { VoiceProfileType, } from \"./Exports\";\n/**\n * Defines SpeakerVerificationModel class for Speaker Recognition\n * Model contains a profile against which to verify a speaker\n * @class SpeakerVerificationModel\n */\nexport class SpeakerVerificationModel {\n constructor(profile) {\n Contracts.throwIfNullOrUndefined(profile, \"VoiceProfile\");\n if (profile.profileType === VoiceProfileType.TextIndependentIdentification) {\n throw new Error(\"Verification model cannot be created from Identification profile\");\n }\n this.privVoiceProfile = profile;\n }\n static fromProfile(profile) {\n return new SpeakerVerificationModel(profile);\n }\n get voiceProfile() {\n return this.privVoiceProfile;\n }\n}\n\n//# sourceMappingURL=SpeakerVerificationModel.js.map\n","// Copyright (c) Microsoft Corporation. All rights reserved.\n// Licensed under the MIT license.\nimport { SessionEventArgs } from \"./Exports\";\n/**\n * Translation Synthesis event arguments\n * @class TranslationSynthesisEventArgs\n */\nexport class TranslationSynthesisEventArgs extends SessionEventArgs {\n /**\n * Creates and initializes an instance of this class.\n * @constructor\n * @param {TranslationSynthesisResult} result - The translation synthesis result.\n * @param {string} sessionId - The session id.\n */\n constructor(result, sessionId) {\n super(sessionId);\n this.privResult = result;\n }\n /**\n * Specifies the translation synthesis result.\n * @member TranslationSynthesisEventArgs.prototype.result\n * @function\n * @public\n * @returns {TranslationSynthesisResult} Specifies the translation synthesis result.\n */\n get result() {\n return this.privResult;\n }\n}\n\n//# sourceMappingURL=TranslationSynthesisEventArgs.js.map\n","// Copyright (c) Microsoft Corporation. All rights reserved.\n// Licensed under the MIT license.\n/**\n * Define payload of speech recognition canceled result events.\n * @class TranslationRecognitionCanceledEventArgs\n */\nexport class TranslationRecognitionCanceledEventArgs {\n /**\n * Creates and initializes an instance of this class.\n * @constructor\n * @param {string} sessionid - The session id.\n * @param {CancellationReason} cancellationReason - The cancellation reason.\n * @param {string} errorDetails - Error details, if provided.\n * @param {TranslationRecognitionResult} result - The result.\n */\n constructor(sessionid, cancellationReason, errorDetails, errorCode, result) {\n this.privCancelReason = cancellationReason;\n this.privErrorDetails = errorDetails;\n this.privResult = result;\n this.privSessionId = sessionid;\n this.privErrorCode = errorCode;\n }\n /**\n * Specifies the recognition result.\n * @member TranslationRecognitionCanceledEventArgs.prototype.result\n * @function\n * @public\n * @returns {TranslationRecognitionResult} the recognition result.\n */\n get result() {\n return this.privResult;\n }\n /**\n * Specifies the session identifier.\n * @member TranslationRecognitionCanceledEventArgs.prototype.sessionId\n * @function\n * @public\n * @returns {string} the session identifier.\n */\n get sessionId() {\n return this.privSessionId;\n }\n /**\n * The reason the recognition was canceled.\n * @member TranslationRecognitionCanceledEventArgs.prototype.reason\n * @function\n * @public\n * @returns {CancellationReason} Specifies the reason canceled.\n */\n get reason() {\n return this.privCancelReason;\n }\n /**\n * The error code in case of an unsuccessful recognition.\n * Added in version 1.1.0.\n * @return An error code that represents the error reason.\n */\n get errorCode() {\n return this.privErrorCode;\n }\n /**\n * In case of an unsuccessful recognition, provides details of the occurred error.\n * @member TranslationRecognitionCanceledEventArgs.prototype.errorDetails\n * @function\n * @public\n * @returns {string} A String that represents the error details.\n */\n get errorDetails() {\n return this.privErrorDetails;\n }\n}\n\n//# sourceMappingURL=TranslationRecognitionCanceledEventArgs.js.map\n","// Copyright (c) Microsoft Corporation. All rights reserved.\n// Licensed under the MIT license.\n/**\n * Defines result of speech recognition.\n * @class RecognitionResult\n */\nexport class RecognitionResult {\n /**\n * Creates and initializes an instance of this class.\n * @constructor\n * @param {string} resultId - The result id.\n * @param {ResultReason} reason - The reason.\n * @param {string} text - The recognized text.\n * @param {number} duration - The duration.\n * @param {number} offset - The offset into the stream.\n * @param {string} language - Primary Language detected, if provided.\n * @param {string} languageDetectionConfidence - Primary Language confidence (\"Unknown,\" \"Low,\" \"Medium,\" \"High\"...), if provided.\n * @param {string} errorDetails - Error details, if provided.\n * @param {string} json - Additional Json, if provided.\n * @param {PropertyCollection} properties - Additional properties, if provided.\n */\n constructor(resultId, reason, text, duration, offset, language, languageDetectionConfidence, errorDetails, json, properties) {\n this.privResultId = resultId;\n this.privReason = reason;\n this.privText = text;\n this.privDuration = duration;\n this.privOffset = offset;\n this.privLanguage = language;\n this.privLanguageDetectionConfidence = languageDetectionConfidence;\n this.privErrorDetails = errorDetails;\n this.privJson = json;\n this.privProperties = properties;\n }\n /**\n * Specifies the result identifier.\n * @member RecognitionResult.prototype.resultId\n * @function\n * @public\n * @returns {string} Specifies the result identifier.\n */\n get resultId() {\n return this.privResultId;\n }\n /**\n * Specifies status of the result.\n * @member RecognitionResult.prototype.reason\n * @function\n * @public\n * @returns {ResultReason} Specifies status of the result.\n */\n get reason() {\n return this.privReason;\n }\n /**\n * Presents the recognized text in the result.\n * @member RecognitionResult.prototype.text\n * @function\n * @public\n * @returns {string} Presents the recognized text in the result.\n */\n get text() {\n return this.privText;\n }\n /**\n * Duration of recognized speech in 100 nano second incements.\n * @member RecognitionResult.prototype.duration\n * @function\n * @public\n * @returns {number} Duration of recognized speech in 100 nano second incements.\n */\n get duration() {\n return this.privDuration;\n }\n /**\n * Offset of recognized speech in 100 nano second incements.\n * @member RecognitionResult.prototype.offset\n * @function\n * @public\n * @returns {number} Offset of recognized speech in 100 nano second incements.\n */\n get offset() {\n return this.privOffset;\n }\n /**\n * Primary Language detected.\n * @member RecognitionResult.prototype.language\n * @function\n * @public\n * @returns {string} language detected.\n */\n get language() {\n return this.privLanguage;\n }\n /**\n * Primary Language detection confidence (Unknown, Low, Medium, High).\n * @member RecognitionResult.prototype.languageDetectionConfidence\n * @function\n * @public\n * @returns {string} detection confidence strength.\n */\n get languageDetectionConfidence() {\n return this.privLanguageDetectionConfidence;\n }\n /**\n * In case of an unsuccessful recognition, provides details of the occurred error.\n * @member RecognitionResult.prototype.errorDetails\n * @function\n * @public\n * @returns {string} a brief description of an error.\n */\n get errorDetails() {\n return this.privErrorDetails;\n }\n /**\n * A string containing Json serialized recognition result as it was received from the service.\n * @member RecognitionResult.prototype.json\n * @function\n * @private\n * @returns {string} Json serialized representation of the result.\n */\n get json() {\n return this.privJson;\n }\n /**\n * The set of properties exposed in the result.\n * @member RecognitionResult.prototype.properties\n * @function\n * @public\n * @returns {PropertyCollection} The set of properties exposed in the result.\n */\n get properties() {\n return this.privProperties;\n }\n}\n\n//# sourceMappingURL=RecognitionResult.js.map\n","// Copyright (c) Microsoft Corporation. All rights reserved.\n// Licensed under the MIT license.\n/**\n * Defines the possible reasons a recognition result might be generated.\n * @class ResultReason\n */\nexport var ResultReason;\n(function (ResultReason) {\n /**\n * Indicates speech could not be recognized. More details\n * can be found in the NoMatchDetails object.\n * @member ResultReason.NoMatch\n */\n ResultReason[ResultReason[\"NoMatch\"] = 0] = \"NoMatch\";\n /**\n * Indicates that the recognition was canceled. More details\n * can be found using the CancellationDetails object.\n * @member ResultReason.Canceled\n */\n ResultReason[ResultReason[\"Canceled\"] = 1] = \"Canceled\";\n /**\n * Indicates the speech result contains hypothesis text.\n * @member ResultReason.RecognizedSpeech\n */\n ResultReason[ResultReason[\"RecognizingSpeech\"] = 2] = \"RecognizingSpeech\";\n /**\n * Indicates the speech result contains final text that has been recognized.\n * Speech Recognition is now complete for this phrase.\n * @member ResultReason.RecognizedSpeech\n */\n ResultReason[ResultReason[\"RecognizedSpeech\"] = 3] = \"RecognizedSpeech\";\n /**\n * Indicates the intent result contains hypothesis text and intent.\n * @member ResultReason.RecognizingIntent\n */\n ResultReason[ResultReason[\"RecognizingIntent\"] = 4] = \"RecognizingIntent\";\n /**\n * Indicates the intent result contains final text and intent.\n * Speech Recognition and Intent determination are now complete for this phrase.\n * @member ResultReason.RecognizedIntent\n */\n ResultReason[ResultReason[\"RecognizedIntent\"] = 5] = \"RecognizedIntent\";\n /**\n * Indicates the translation result contains hypothesis text and its translation(s).\n * @member ResultReason.TranslatingSpeech\n */\n ResultReason[ResultReason[\"TranslatingSpeech\"] = 6] = \"TranslatingSpeech\";\n /**\n * Indicates the translation result contains final text and corresponding translation(s).\n * Speech Recognition and Translation are now complete for this phrase.\n * @member ResultReason.TranslatedSpeech\n */\n ResultReason[ResultReason[\"TranslatedSpeech\"] = 7] = \"TranslatedSpeech\";\n /**\n * Indicates the synthesized audio result contains a non-zero amount of audio data\n * @member ResultReason.SynthesizingAudio\n */\n ResultReason[ResultReason[\"SynthesizingAudio\"] = 8] = \"SynthesizingAudio\";\n /**\n * Indicates the synthesized audio is now complete for this phrase.\n * @member ResultReason.SynthesizingAudioCompleted\n */\n ResultReason[ResultReason[\"SynthesizingAudioCompleted\"] = 9] = \"SynthesizingAudioCompleted\";\n /**\n * Indicates the speech synthesis is now started\n * @member ResultReason.SynthesizingAudioStarted\n */\n ResultReason[ResultReason[\"SynthesizingAudioStarted\"] = 10] = \"SynthesizingAudioStarted\";\n /**\n * Indicates the voice profile is being enrolled and customers need to send more audio to create a voice profile.\n * @member ResultReason.EnrollingVoiceProfile\n */\n ResultReason[ResultReason[\"EnrollingVoiceProfile\"] = 11] = \"EnrollingVoiceProfile\";\n /**\n * Indicates the voice profile has been enrolled.\n * @member ResultReason.EnrolledVoiceProfile\n */\n ResultReason[ResultReason[\"EnrolledVoiceProfile\"] = 12] = \"EnrolledVoiceProfile\";\n /**\n * Indicates successful identification of some speakers.\n * @member ResultReason.RecognizedSpeakers\n */\n ResultReason[ResultReason[\"RecognizedSpeakers\"] = 13] = \"RecognizedSpeakers\";\n /**\n * Indicates successfully verified one speaker.\n * @member ResultReason.RecognizedSpeaker\n */\n ResultReason[ResultReason[\"RecognizedSpeaker\"] = 14] = \"RecognizedSpeaker\";\n /**\n * Indicates a voice profile has been reset successfully.\n * @member ResultReason.ResetVoiceProfile\n */\n ResultReason[ResultReason[\"ResetVoiceProfile\"] = 15] = \"ResetVoiceProfile\";\n /**\n * Indicates a voice profile has been deleted successfully.\n * @member ResultReason.DeletedVoiceProfile\n */\n ResultReason[ResultReason[\"DeletedVoiceProfile\"] = 16] = \"DeletedVoiceProfile\";\n})(ResultReason || (ResultReason = {}));\n\n//# sourceMappingURL=ResultReason.js.map\n","// Copyright (c) Microsoft Corporation. All rights reserved.\n// Licensed under the MIT license.\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nimport { TranscriberRecognizer } from \"../../common.speech/Exports\";\nimport { marshalPromiseToCallbacks } from \"../../common/Exports\";\nimport { Contracts } from \"../Contracts\";\nimport { PropertyCollection, PropertyId, } from \"../Exports\";\nexport class ConversationTranscriber {\n /**\n * ConversationTranscriber constructor.\n * @constructor\n * @param {AudioConfig} audioConfig - An optional audio configuration associated with the recognizer\n */\n constructor(audioConfig) {\n this.privAudioConfig = audioConfig;\n this.privProperties = new PropertyCollection();\n this.privRecognizer = undefined;\n this.privDisposedRecognizer = false;\n }\n /**\n * @param {Conversation} converation - conversation to be recognized\n */\n joinConversationAsync(conversation, cb, err) {\n const conversationImpl = conversation;\n Contracts.throwIfNullOrUndefined(conversationImpl, \"Conversation\");\n // ref the conversation object\n // create recognizer and subscribe to recognizer events\n this.privRecognizer = new TranscriberRecognizer(conversation.config, this.privAudioConfig);\n Contracts.throwIfNullOrUndefined(this.privRecognizer, \"Recognizer\");\n this.privRecognizer.connectCallbacks(this);\n marshalPromiseToCallbacks(conversationImpl.connectTranscriberRecognizer(this.privRecognizer), cb, err);\n }\n /**\n * Gets the authorization token used to communicate with the service.\n * @member ConversationTranscriber.prototype.authorizationToken\n * @function\n * @public\n * @returns {string} Authorization token.\n */\n get authorizationToken() {\n return this.properties.getProperty(PropertyId.SpeechServiceAuthorization_Token);\n }\n /**\n * Gets/Sets the authorization token used to communicate with the service.\n * @member ConversationTranscriber.prototype.authorizationToken\n * @function\n * @public\n * @param {string} token - Authorization token.\n */\n set authorizationToken(token) {\n Contracts.throwIfNullOrWhitespace(token, \"token\");\n this.properties.setProperty(PropertyId.SpeechServiceAuthorization_Token, token);\n }\n /**\n * Gets the spoken language of recognition.\n * @member ConversationTranscriber.prototype.speechRecognitionLanguage\n * @function\n * @public\n * @returns {string} The spoken language of recognition.\n */\n get speechRecognitionLanguage() {\n Contracts.throwIfDisposed(this.privDisposedRecognizer);\n return this.properties.getProperty(PropertyId.SpeechServiceConnection_RecoLanguage);\n }\n /**\n * The collection of properties and their values defined for this ConversationTranscriber.\n * @member ConversationTranscriber.prototype.properties\n * @function\n * @public\n * @returns {PropertyCollection} The collection of properties and their values defined for this ConversationTranscriber.\n */\n get properties() {\n return this.privProperties;\n }\n /**\n * Starts conversation transcription, until stopTranscribingAsync() is called.\n * User must subscribe to events to receive transcription results.\n * @member ConversationTranscriber.prototype.startTranscribingAsync\n * @function\n * @public\n * @param cb - Callback invoked once the transcription has started.\n * @param err - Callback invoked in case of an error.\n */\n startTranscribingAsync(cb, err) {\n this.privRecognizer.startContinuousRecognitionAsync(cb, err);\n }\n /**\n * Starts conversation transcription, until stopTranscribingAsync() is called.\n * User must subscribe to events to receive transcription results.\n * @member ConversationTranscriber.prototype.stopTranscribingAsync\n * @function\n * @public\n * @param cb - Callback invoked once the transcription has started.\n * @param err - Callback invoked in case of an error.\n */\n stopTranscribingAsync(cb, err) {\n this.privRecognizer.stopContinuousRecognitionAsync(cb, err);\n }\n /**\n * Leave the current conversation. After this is called, you will no longer receive any events.\n */\n leaveConversationAsync(cb, err) {\n this.privRecognizer.disconnectCallbacks();\n marshalPromiseToCallbacks((() => __awaiter(this, void 0, void 0, function* () { return; }))(), cb, err);\n }\n /**\n * closes all external resources held by an instance of this class.\n * @member ConversationTranscriber.prototype.close\n * @function\n * @public\n */\n close(cb, errorCb) {\n Contracts.throwIfDisposed(this.privDisposedRecognizer);\n marshalPromiseToCallbacks(this.dispose(true), cb, errorCb);\n }\n /**\n * Disposes any resources held by the object.\n * @member ConversationTranscriber.prototype.dispose\n * @function\n * @public\n * @param {boolean} disposing - true if disposing the object.\n */\n dispose(disposing) {\n return __awaiter(this, void 0, void 0, function* () {\n if (this.privDisposedRecognizer) {\n return;\n }\n if (disposing) {\n this.privDisposedRecognizer = true;\n }\n });\n }\n}\n\n//# sourceMappingURL=ConversationTranscriber.js.map\n","// Copyright (c) Microsoft Corporation. All rights reserved.\n// Licensed under the MIT license.\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nimport { Context, OS, SpeakerIdMessageAdapter, SpeakerRecognitionConfig, } from \"../common.speech/Exports\";\nimport { marshalPromiseToCallbacks } from \"../common/Exports\";\nimport { Contracts } from \"./Contracts\";\nimport { PropertyId, ResultReason, VoiceProfile, VoiceProfileEnrollmentResult, VoiceProfileResult, } from \"./Exports\";\n/**\n * Defines VoiceProfileClient class for Speaker Recognition\n * Handles operations from user for Voice Profile operations (e.g. createProfile, deleteProfile)\n * @class VoiceProfileClient\n */\nexport class VoiceProfileClient {\n /**\n * VoiceProfileClient constructor.\n * @constructor\n * @param {SpeechConfig} speechConfig - An set of initial properties for this synthesizer (authentication key, region, &c)\n */\n constructor(speechConfig) {\n const speechConfigImpl = speechConfig;\n Contracts.throwIfNull(speechConfigImpl, \"speechConfig\");\n this.privProperties = speechConfigImpl.properties.clone();\n this.implClientSetup();\n }\n /**\n * Gets the authorization token used to communicate with the service.\n * @member VoiceProfileClient.prototype.authorizationToken\n * @function\n * @public\n * @returns {string} Authorization token.\n */\n get authorizationToken() {\n return this.properties.getProperty(PropertyId.SpeechServiceAuthorization_Token);\n }\n /**\n * Gets/Sets the authorization token used to communicate with the service.\n * @member VoiceProfileClient.prototype.authorizationToken\n * @function\n * @public\n * @param {string} token - Authorization token.\n */\n set authorizationToken(token) {\n Contracts.throwIfNullOrWhitespace(token, \"token\");\n this.properties.setProperty(PropertyId.SpeechServiceAuthorization_Token, token);\n }\n /**\n * The collection of properties and their values defined for this VoiceProfileClient.\n * @member VoiceProfileClient.prototype.properties\n * @function\n * @public\n * @returns {PropertyCollection} The collection of properties and their values defined for this VoiceProfileClient.\n */\n get properties() {\n return this.privProperties;\n }\n /**\n * Create a speaker recognition voice profile\n * @member VoiceProfileClient.prototype.createProfileAsync\n * @function\n * @public\n * @param {VoiceProfileType} profileType Type of Voice Profile to be created\n * specifies the keyword to be recognized.\n * @param {string} lang Language string (locale) for Voice Profile\n * @param cb - Callback invoked once Voice Profile has been created.\n * @param err - Callback invoked in case of an error.\n */\n createProfileAsync(profileType, lang, cb, err) {\n marshalPromiseToCallbacks((() => __awaiter(this, void 0, void 0, function* () {\n const result = yield this.privAdapter.createProfile(profileType, lang);\n const response = result.json();\n const profile = new VoiceProfile(response.profileId, profileType);\n return profile;\n }))(), cb, err);\n }\n /**\n * Create a speaker recognition voice profile\n * @member VoiceProfileClient.prototype.enrollProfileAsync\n * @function\n * @public\n * @param {VoiceProfile} profile Voice Profile to create enrollment for\n * @param {AudioConfig} audioConfig source info from which to create enrollment\n * @param cb - Callback invoked once Enrollment request has been submitted.\n * @param err - Callback invoked in case of an error.\n */\n enrollProfileAsync(profile, audioConfig, cb, err) {\n const configImpl = audioConfig;\n Contracts.throwIfNullOrUndefined(configImpl, \"audioConfig\");\n marshalPromiseToCallbacks((() => __awaiter(this, void 0, void 0, function* () {\n const result = yield this.privAdapter.createEnrollment(profile, configImpl);\n const ret = new VoiceProfileEnrollmentResult(result.ok ? ResultReason.EnrolledVoiceProfile : ResultReason.Canceled, result.data, result.statusText);\n return ret;\n }))(), cb, err);\n }\n /**\n * Delete a speaker recognition voice profile\n * @member VoiceProfileClient.prototype.deleteProfileAsync\n * @function\n * @public\n * @param {VoiceProfile} profile Voice Profile to be deleted\n * @param cb - Callback invoked once Voice Profile has been deleted.\n * @param err - Callback invoked in case of an error.\n */\n deleteProfileAsync(profile, cb, err) {\n marshalPromiseToCallbacks((() => __awaiter(this, void 0, void 0, function* () {\n const result = yield this.privAdapter.deleteProfile(profile);\n return this.getResult(result, ResultReason.DeletedVoiceProfile);\n }))(), cb, err);\n }\n /**\n * Remove all enrollments for a speaker recognition voice profile\n * @member VoiceProfileClient.prototype.resetProfileAsync\n * @function\n * @public\n * @param {VoiceProfile} profile Voice Profile to be reset\n * @param cb - Callback invoked once Voice Profile has been reset.\n * @param err - Callback invoked in case of an error.\n */\n resetProfileAsync(profile, cb, err) {\n marshalPromiseToCallbacks((() => __awaiter(this, void 0, void 0, function* () {\n const result = yield this.privAdapter.resetProfile(profile);\n return this.getResult(result, ResultReason.ResetVoiceProfile);\n }))(), cb, err);\n }\n /**\n * Included for compatibility\n * @member VoiceProfileClient.prototype.close\n * @function\n * @public\n */\n close() {\n return;\n }\n // Does class setup, swiped from Recognizer.\n implClientSetup() {\n let osPlatform = (typeof window !== \"undefined\") ? \"Browser\" : \"Node\";\n let osName = \"unknown\";\n let osVersion = \"unknown\";\n if (typeof navigator !== \"undefined\") {\n osPlatform = osPlatform + \"/\" + navigator.platform;\n osName = navigator.userAgent;\n osVersion = navigator.appVersion;\n }\n const recognizerConfig = new SpeakerRecognitionConfig(new Context(new OS(osPlatform, osName, osVersion)), this.privProperties);\n this.privAdapter = new SpeakerIdMessageAdapter(recognizerConfig);\n }\n getResult(result, successReason, cb) {\n const response = new VoiceProfileResult(result.ok ? successReason : ResultReason.Canceled, result.statusText);\n return (response);\n }\n}\n\n//# sourceMappingURL=VoiceProfileClient.js.map\n","// Unique ID creation requires a high quality random # generator. In the browser we therefore\n// require the crypto API and do not support built-in fallback to lower quality random number\n// generators (like Math.random()).\nvar getRandomValues;\nvar rnds8 = new Uint8Array(16);\nexport default function rng() {\n // lazy load so that environments that need to polyfill have a chance to do so\n if (!getRandomValues) {\n // getRandomValues needs to be invoked in a context where \"this\" is a Crypto implementation. Also,\n // find the complete implementation of crypto (msCrypto) on IE11.\n getRandomValues = typeof crypto !== 'undefined' && crypto.getRandomValues && crypto.getRandomValues.bind(crypto) || typeof msCrypto !== 'undefined' && typeof msCrypto.getRandomValues === 'function' && msCrypto.getRandomValues.bind(msCrypto);\n\n if (!getRandomValues) {\n throw new Error('crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported');\n }\n }\n\n return getRandomValues(rnds8);\n}","export default /^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;","import REGEX from './regex.js';\n\nfunction validate(uuid) {\n return typeof uuid === 'string' && REGEX.test(uuid);\n}\n\nexport default validate;","import validate from './validate.js';\n/**\n * Convert array of 16 byte values to UUID string format of the form:\n * XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX\n */\n\nvar byteToHex = [];\n\nfor (var i = 0; i < 256; ++i) {\n byteToHex.push((i + 0x100).toString(16).substr(1));\n}\n\nfunction stringify(arr) {\n var offset = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;\n // Note: Be careful editing this code! It's been tuned for performance\n // and works in ways you may not expect. See https://github.com/uuidjs/uuid/pull/434\n var uuid = (byteToHex[arr[offset + 0]] + byteToHex[arr[offset + 1]] + byteToHex[arr[offset + 2]] + byteToHex[arr[offset + 3]] + '-' + byteToHex[arr[offset + 4]] + byteToHex[arr[offset + 5]] + '-' + byteToHex[arr[offset + 6]] + byteToHex[arr[offset + 7]] + '-' + byteToHex[arr[offset + 8]] + byteToHex[arr[offset + 9]] + '-' + byteToHex[arr[offset + 10]] + byteToHex[arr[offset + 11]] + byteToHex[arr[offset + 12]] + byteToHex[arr[offset + 13]] + byteToHex[arr[offset + 14]] + byteToHex[arr[offset + 15]]).toLowerCase(); // Consistency check for valid UUID. If this throws, it's likely due to one\n // of the following:\n // - One or more input array values don't map to a hex octet (leading to\n // \"undefined\" in the uuid)\n // - Invalid input values for the RFC `version` or `variant` fields\n\n if (!validate(uuid)) {\n throw TypeError('Stringified UUID is invalid');\n }\n\n return uuid;\n}\n\nexport default stringify;","import rng from './rng.js';\nimport stringify from './stringify.js';\n\nfunction v4(options, buf, offset) {\n options = options || {};\n var rnds = options.random || (options.rng || rng)(); // Per 4.4, set bits for version and `clock_seq_hi_and_reserved`\n\n rnds[6] = rnds[6] & 0x0f | 0x40;\n rnds[8] = rnds[8] & 0x3f | 0x80; // Copy bytes to buffer, if provided\n\n if (buf) {\n offset = offset || 0;\n\n for (var i = 0; i < 16; ++i) {\n buf[offset + i] = rnds[i];\n }\n\n return buf;\n }\n\n return stringify(rnds);\n}\n\nexport default v4;","// Copyright (c) Microsoft Corporation. All rights reserved.\n// Licensed under the MIT license.\nimport { RecognitionEventArgs } from \"./Exports\";\n/**\n * Translation text result event arguments.\n * @class TranslationRecognitionEventArgs\n */\nexport class TranslationRecognitionEventArgs extends RecognitionEventArgs {\n /**\n * Creates and initializes an instance of this class.\n * @constructor\n * @param {TranslationRecognitionResult} result - The translation recognition result.\n * @param {number} offset - The offset.\n * @param {string} sessionId - The session id.\n */\n constructor(result, offset, sessionId) {\n super(offset, sessionId);\n this.privResult = result;\n }\n /**\n * Specifies the recognition result.\n * @member TranslationRecognitionEventArgs.prototype.result\n * @function\n * @public\n * @returns {TranslationRecognitionResult} the recognition result.\n */\n get result() {\n return this.privResult;\n }\n}\n\n//# sourceMappingURL=TranslationRecognitionEventArgs.js.map\n","// Copyright (c) Microsoft Corporation. All rights reserved.\n// Licensed under the MIT license.\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nimport { OutputFormatPropertyName, RecognitionMode, RecognizerConfig, SpeechConnectionFactory, SpeechServiceRecognizer, } from \"../common.speech/Exports\";\nimport { marshalPromiseToCallbacks } from \"../common/Exports\";\nimport { Contracts } from \"./Contracts\";\nimport { OutputFormat, PropertyId, Recognizer, } from \"./Exports\";\n/**\n * Performs speech recognition from microphone, file, or other audio input streams, and gets transcribed text as result.\n * @class SpeechRecognizer\n */\nexport class SpeechRecognizer extends Recognizer {\n /**\n * SpeechRecognizer constructor.\n * @constructor\n * @param {SpeechConfig} speechConfig - an set of initial properties for this recognizer\n * @param {AudioConfig} audioConfig - An optional audio configuration associated with the recognizer\n */\n constructor(speechConfig, audioConfig) {\n const speechConfigImpl = speechConfig;\n Contracts.throwIfNull(speechConfigImpl, \"speechConfig\");\n Contracts.throwIfNullOrWhitespace(speechConfigImpl.properties.getProperty(PropertyId.SpeechServiceConnection_RecoLanguage), PropertyId[PropertyId.SpeechServiceConnection_RecoLanguage]);\n super(audioConfig, speechConfigImpl.properties, new SpeechConnectionFactory());\n this.privDisposedRecognizer = false;\n }\n /**\n * SpeechRecognizer constructor.\n * @constructor\n * @param {SpeechConfig} speechConfig - an set of initial properties for this recognizer\n * @param {AutoDetectSourceLanguageConfig} autoDetectSourceLanguageConfig - An source language detection configuration associated with the recognizer\n * @param {AudioConfig} audioConfig - An optional audio configuration associated with the recognizer\n */\n static FromConfig(speechConfig, autoDetectSourceLanguageConfig, audioConfig) {\n const speechConfigImpl = speechConfig;\n autoDetectSourceLanguageConfig.properties.mergeTo(speechConfigImpl.properties);\n const recognizer = new SpeechRecognizer(speechConfig, audioConfig);\n return recognizer;\n }\n /**\n * Gets the endpoint id of a customized speech model that is used for speech recognition.\n * @member SpeechRecognizer.prototype.endpointId\n * @function\n * @public\n * @returns {string} the endpoint id of a customized speech model that is used for speech recognition.\n */\n get endpointId() {\n Contracts.throwIfDisposed(this.privDisposedRecognizer);\n return this.properties.getProperty(PropertyId.SpeechServiceConnection_EndpointId, \"00000000-0000-0000-0000-000000000000\");\n }\n /**\n * Gets the authorization token used to communicate with the service.\n * @member SpeechRecognizer.prototype.authorizationToken\n * @function\n * @public\n * @returns {string} Authorization token.\n */\n get authorizationToken() {\n return this.properties.getProperty(PropertyId.SpeechServiceAuthorization_Token);\n }\n /**\n * Gets/Sets the authorization token used to communicate with the service.\n * @member SpeechRecognizer.prototype.authorizationToken\n * @function\n * @public\n * @param {string} token - Authorization token.\n */\n set authorizationToken(token) {\n Contracts.throwIfNullOrWhitespace(token, \"token\");\n this.properties.setProperty(PropertyId.SpeechServiceAuthorization_Token, token);\n }\n /**\n * Gets the spoken language of recognition.\n * @member SpeechRecognizer.prototype.speechRecognitionLanguage\n * @function\n * @public\n * @returns {string} The spoken language of recognition.\n */\n get speechRecognitionLanguage() {\n Contracts.throwIfDisposed(this.privDisposedRecognizer);\n return this.properties.getProperty(PropertyId.SpeechServiceConnection_RecoLanguage);\n }\n /**\n * Gets the output format of recognition.\n * @member SpeechRecognizer.prototype.outputFormat\n * @function\n * @public\n * @returns {OutputFormat} The output format of recognition.\n */\n get outputFormat() {\n Contracts.throwIfDisposed(this.privDisposedRecognizer);\n if (this.properties.getProperty(OutputFormatPropertyName, OutputFormat[OutputFormat.Simple]) === OutputFormat[OutputFormat.Simple]) {\n return OutputFormat.Simple;\n }\n else {\n return OutputFormat.Detailed;\n }\n }\n /**\n * The collection of properties and their values defined for this SpeechRecognizer.\n * @member SpeechRecognizer.prototype.properties\n * @function\n * @public\n * @returns {PropertyCollection} The collection of properties and their values defined for this SpeechRecognizer.\n */\n get properties() {\n return this.privProperties;\n }\n /**\n * Starts speech recognition, and stops after the first utterance is recognized.\n * The task returns the recognition text as result.\n * Note: RecognizeOnceAsync() returns when the first utterance has been recognized,\n * so it is suitable only for single shot recognition\n * like command or query. For long-running recognition, use StartContinuousRecognitionAsync() instead.\n * @member SpeechRecognizer.prototype.recognizeOnceAsync\n * @function\n * @public\n * @param cb - Callback that received the SpeechRecognitionResult.\n * @param err - Callback invoked in case of an error.\n */\n recognizeOnceAsync(cb, err) {\n marshalPromiseToCallbacks(this.recognizeOnceAsyncImpl(RecognitionMode.Interactive), cb, err);\n }\n /**\n * Starts speech recognition, until stopContinuousRecognitionAsync() is called.\n * User must subscribe to events to receive recognition results.\n * @member SpeechRecognizer.prototype.startContinuousRecognitionAsync\n * @function\n * @public\n * @param cb - Callback invoked once the recognition has started.\n * @param err - Callback invoked in case of an error.\n */\n startContinuousRecognitionAsync(cb, err) {\n marshalPromiseToCallbacks(this.startContinuousRecognitionAsyncImpl(RecognitionMode.Conversation), cb, err);\n }\n /**\n * Stops continuous speech recognition.\n * @member SpeechRecognizer.prototype.stopContinuousRecognitionAsync\n * @function\n * @public\n * @param cb - Callback invoked once the recognition has stopped.\n * @param err - Callback invoked in case of an error.\n */\n stopContinuousRecognitionAsync(cb, err) {\n marshalPromiseToCallbacks(this.stopContinuousRecognitionAsyncImpl(), cb, err);\n }\n /**\n * Starts speech recognition with keyword spotting, until\n * stopKeywordRecognitionAsync() is called.\n * User must subscribe to events to receive recognition results.\n * Note: Key word spotting functionality is only available on the\n * Speech Devices SDK. This functionality is currently not included in the SDK itself.\n * @member SpeechRecognizer.prototype.startKeywordRecognitionAsync\n * @function\n * @public\n * @param {KeywordRecognitionModel} model The keyword recognition model that\n * specifies the keyword to be recognized.\n * @param cb - Callback invoked once the recognition has started.\n * @param err - Callback invoked in case of an error.\n */\n startKeywordRecognitionAsync(model, cb, err) {\n Contracts.throwIfNull(model, \"model\");\n if (!!err) {\n err(\"Not yet implemented.\");\n }\n }\n /**\n * Stops continuous speech recognition.\n * Note: Key word spotting functionality is only available on the\n * Speech Devices SDK. This functionality is currently not included in the SDK itself.\n * @member SpeechRecognizer.prototype.stopKeywordRecognitionAsync\n * @function\n * @public\n * @param cb - Callback invoked once the recognition has stopped.\n * @param err - Callback invoked in case of an error.\n */\n stopKeywordRecognitionAsync(cb, err) {\n if (!!cb) {\n cb();\n }\n }\n /**\n * closes all external resources held by an instance of this class.\n * @member SpeechRecognizer.prototype.close\n * @function\n * @public\n */\n close(cb, errorCb) {\n Contracts.throwIfDisposed(this.privDisposedRecognizer);\n marshalPromiseToCallbacks(this.dispose(true), cb, errorCb);\n }\n /**\n * Disposes any resources held by the object.\n * @member SpeechRecognizer.prototype.dispose\n * @function\n * @public\n * @param {boolean} disposing - true if disposing the object.\n */\n dispose(disposing) {\n const _super = Object.create(null, {\n dispose: { get: () => super.dispose }\n });\n return __awaiter(this, void 0, void 0, function* () {\n if (this.privDisposedRecognizer) {\n return;\n }\n if (disposing) {\n this.privDisposedRecognizer = true;\n yield this.implRecognizerStop();\n }\n yield _super.dispose.call(this, disposing);\n });\n }\n createRecognizerConfig(speechConfig) {\n return new RecognizerConfig(speechConfig, this.properties);\n }\n createServiceRecognizer(authentication, connectionFactory, audioConfig, recognizerConfig) {\n const configImpl = audioConfig;\n return new SpeechServiceRecognizer(authentication, connectionFactory, configImpl, recognizerConfig, this);\n }\n}\n\n//# sourceMappingURL=SpeechRecognizer.js.map\n","// Copyright (c) Microsoft Corporation. All rights reserved.\n// Licensed under the MIT license.\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nimport { AutoDetectSourceLanguagesOpenRangeOptionName, CognitiveSubscriptionKeyAuthentication, CognitiveTokenAuthentication, Context, OS, SpeechServiceConfig, SpeechSynthesisConnectionFactory, SynthesisAdapterBase, SynthesizerConfig, } from \"../common.speech/Exports\";\nimport { createNoDashGuid, marshalPromiseToCallbacks, Queue } from \"../common/Exports\";\nimport { AudioFileWriter } from \"./Audio/AudioFileWriter\";\nimport { AudioOutputFormatImpl } from \"./Audio/AudioOutputFormat\";\nimport { PushAudioOutputStreamImpl } from \"./Audio/AudioOutputStream\";\nimport { Contracts } from \"./Contracts\";\nimport { AudioConfig, PropertyId, PullAudioOutputStream, PushAudioOutputStreamCallback, SpeechSynthesisOutputFormat, } from \"./Exports\";\n/**\n * Defines the class SpeechSynthesizer for text to speech.\n * Added in version 1.11.0\n * @class SpeechSynthesizer\n */\nexport class SpeechSynthesizer {\n /**\n * SpeechSynthesizer constructor.\n * @constructor\n * @param {SpeechConfig} speechConfig - An set of initial properties for this synthesizer.\n * @param {AudioConfig} audioConfig - An optional audio configuration associated with the synthesizer.\n */\n constructor(speechConfig, audioConfig) {\n const speechConfigImpl = speechConfig;\n Contracts.throwIfNull(speechConfigImpl, \"speechConfig\");\n if (audioConfig !== null) {\n if (audioConfig === undefined) {\n this.audioConfig = (typeof window === \"undefined\") ? undefined : AudioConfig.fromDefaultSpeakerOutput();\n }\n else {\n this.audioConfig = audioConfig;\n }\n }\n this.privProperties = speechConfigImpl.properties.clone();\n this.privDisposed = false;\n this.privSynthesizing = false;\n this.privConnectionFactory = new SpeechSynthesisConnectionFactory();\n this.synthesisRequestQueue = new Queue();\n this.implCommonSynthesizeSetup();\n }\n /**\n * Gets the authorization token used to communicate with the service.\n * @member SpeechSynthesizer.prototype.authorizationToken\n * @function\n * @public\n * @returns {string} Authorization token.\n */\n get authorizationToken() {\n return this.properties.getProperty(PropertyId.SpeechServiceAuthorization_Token);\n }\n /**\n * Gets/Sets the authorization token used to communicate with the service.\n * @member SpeechSynthesizer.prototype.authorizationToken\n * @function\n * @public\n * @param {string} token - Authorization token.\n */\n set authorizationToken(token) {\n Contracts.throwIfNullOrWhitespace(token, \"token\");\n this.properties.setProperty(PropertyId.SpeechServiceAuthorization_Token, token);\n }\n /**\n * The collection of properties and their values defined for this SpeechSynthesizer.\n * @member SpeechSynthesizer.prototype.properties\n * @function\n * @public\n * @returns {PropertyCollection} The collection of properties and their values defined for this SpeechSynthesizer.\n */\n get properties() {\n return this.privProperties;\n }\n /**\n * Indicates if auto detect source language is enabled\n * @member SpeechSynthesizer.prototype.properties\n * @function\n * @public\n * @returns {boolean} if auto detect source language is enabled\n */\n get autoDetectSourceLanguage() {\n return this.properties.getProperty(PropertyId.SpeechServiceConnection_AutoDetectSourceLanguages) === AutoDetectSourceLanguagesOpenRangeOptionName;\n }\n /**\n * SpeechSynthesizer constructor.\n * @constructor\n * @param {SpeechConfig} speechConfig - an set of initial properties for this synthesizer\n * @param {AutoDetectSourceLanguageConfig} autoDetectSourceLanguageConfig - An source language detection configuration associated with the synthesizer\n * @param {AudioConfig} audioConfig - An optional audio configuration associated with the synthesizer\n */\n static FromConfig(speechConfig, autoDetectSourceLanguageConfig, audioConfig) {\n const speechConfigImpl = speechConfig;\n autoDetectSourceLanguageConfig.properties.mergeTo(speechConfigImpl.properties);\n return new SpeechSynthesizer(speechConfig, audioConfig);\n }\n buildSsml(text) {\n const languageToDefaultVoice = {\n [\"ar-EG\"]: \"Microsoft Server Speech Text to Speech Voice (ar-EG, Hoda)\",\n [\"ar-SA\"]: \"Microsoft Server Speech Text to Speech Voice (ar-SA, Naayf)\",\n [\"bg-BG\"]: \"Microsoft Server Speech Text to Speech Voice (bg-BG, Ivan)\",\n [\"ca-ES\"]: \"Microsoft Server Speech Text to Speech Voice (ca-ES, HerenaRUS)\",\n [\"cs-CZ\"]: \"Microsoft Server Speech Text to Speech Voice (cs-CZ, Jakub)\",\n [\"da-DK\"]: \"Microsoft Server Speech Text to Speech Voice (da-DK, HelleRUS)\",\n [\"de-AT\"]: \"Microsoft Server Speech Text to Speech Voice (de-AT, Michael)\",\n [\"de-CH\"]: \"Microsoft Server Speech Text to Speech Voice (de-CH, Karsten)\",\n [\"de-DE\"]: \"Microsoft Server Speech Text to Speech Voice (de-DE, HeddaRUS)\",\n [\"el-GR\"]: \"Microsoft Server Speech Text to Speech Voice (el-GR, Stefanos)\",\n [\"en-AU\"]: \"Microsoft Server Speech Text to Speech Voice (en-AU, HayleyRUS)\",\n [\"en-CA\"]: \"Microsoft Server Speech Text to Speech Voice (en-CA, HeatherRUS)\",\n [\"en-GB\"]: \"Microsoft Server Speech Text to Speech Voice (en-GB, HazelRUS)\",\n [\"en-IE\"]: \"Microsoft Server Speech Text to Speech Voice (en-IE, Sean)\",\n [\"en-IN\"]: \"Microsoft Server Speech Text to Speech Voice (en-IN, PriyaRUS)\",\n [\"en-US\"]: \"Microsoft Server Speech Text to Speech Voice (en-US, AriaRUS)\",\n [\"es-ES\"]: \"Microsoft Server Speech Text to Speech Voice (es-ES, HelenaRUS)\",\n [\"es-MX\"]: \"Microsoft Server Speech Text to Speech Voice (es-MX, HildaRUS)\",\n [\"fi-FI\"]: \"Microsoft Server Speech Text to Speech Voice (fi-FI, HeidiRUS)\",\n [\"fr-CA\"]: \"Microsoft Server Speech Text to Speech Voice (fr-CA, HarmonieRUS)\",\n [\"fr-CH\"]: \"Microsoft Server Speech Text to Speech Voice (fr-CH, Guillaume)\",\n [\"fr-FR\"]: \"Microsoft Server Speech Text to Speech Voice (fr-FR, HortenseRUS)\",\n [\"he-IL\"]: \"Microsoft Server Speech Text to Speech Voice (he-IL, Asaf)\",\n [\"hi-IN\"]: \"Microsoft Server Speech Text to Speech Voice (hi-IN, Kalpana)\",\n [\"hr-HR\"]: \"Microsoft Server Speech Text to Speech Voice (hr-HR, Matej)\",\n [\"hu-HU\"]: \"Microsoft Server Speech Text to Speech Voice (hu-HU, Szabolcs)\",\n [\"id-ID\"]: \"Microsoft Server Speech Text to Speech Voice (id-ID, Andika)\",\n [\"it-IT\"]: \"Microsoft Server Speech Text to Speech Voice (it-IT, LuciaRUS)\",\n [\"ja-JP\"]: \"Microsoft Server Speech Text to Speech Voice (ja-JP, HarukaRUS)\",\n [\"ko-KR\"]: \"Microsoft Server Speech Text to Speech Voice (ko-KR, HeamiRUS)\",\n [\"ms-MY\"]: \"Microsoft Server Speech Text to Speech Voice (ms-MY, Rizwan)\",\n [\"nb-NO\"]: \"Microsoft Server Speech Text to Speech Voice (nb-NO, HuldaRUS)\",\n [\"nl-NL\"]: \"Microsoft Server Speech Text to Speech Voice (nl-NL, HannaRUS)\",\n [\"pl-PL\"]: \"Microsoft Server Speech Text to Speech Voice (pl-PL, PaulinaRUS)\",\n [\"pt-BR\"]: \"Microsoft Server Speech Text to Speech Voice (pt-BR, HeloisaRUS)\",\n [\"pt-PT\"]: \"Microsoft Server Speech Text to Speech Voice (pt-PT, HeliaRUS)\",\n [\"ro-RO\"]: \"Microsoft Server Speech Text to Speech Voice (ro-RO, Andrei)\",\n [\"ru-RU\"]: \"Microsoft Server Speech Text to Speech Voice (ru-RU, EkaterinaRUS)\",\n [\"sk-SK\"]: \"Microsoft Server Speech Text to Speech Voice (sk-SK, Filip)\",\n [\"sl-SI\"]: \"Microsoft Server Speech Text to Speech Voice (sl-SI, Lado)\",\n [\"sv-SE\"]: \"Microsoft Server Speech Text to Speech Voice (sv-SE, HedvigRUS)\",\n [\"ta-IN\"]: \"Microsoft Server Speech Text to Speech Voice (ta-IN, Valluvar)\",\n [\"te-IN\"]: \"Microsoft Server Speech Text to Speech Voice (te-IN, Chitra)\",\n [\"th-TH\"]: \"Microsoft Server Speech Text to Speech Voice (th-TH, Pattara)\",\n [\"tr-TR\"]: \"Microsoft Server Speech Text to Speech Voice (tr-TR, SedaRUS)\",\n [\"vi-VN\"]: \"Microsoft Server Speech Text to Speech Voice (vi-VN, An)\",\n [\"zh-CN\"]: \"Microsoft Server Speech Text to Speech Voice (zh-CN, HuihuiRUS)\",\n [\"zh-HK\"]: \"Microsoft Server Speech Text to Speech Voice (zh-HK, TracyRUS)\",\n [\"zh-TW\"]: \"Microsoft Server Speech Text to Speech Voice (zh-TW, HanHanRUS)\",\n };\n let language = this.properties.getProperty(PropertyId.SpeechServiceConnection_SynthLanguage, \"en-US\");\n let voice = this.properties.getProperty(PropertyId.SpeechServiceConnection_SynthVoice, \"\");\n let ssml = SpeechSynthesizer.XMLEncode(text);\n if (this.autoDetectSourceLanguage) {\n language = \"en-US\";\n }\n else {\n voice = voice || languageToDefaultVoice[language];\n }\n if (voice) {\n ssml = `${ssml}`;\n }\n ssml = `${ssml}`;\n return ssml;\n }\n /**\n * Executes speech synthesis on plain text.\n * The task returns the synthesis result.\n * @member SpeechSynthesizer.prototype.speakTextAsync\n * @function\n * @public\n * @param text - Text to be synthesized.\n * @param cb - Callback that received the SpeechSynthesisResult.\n * @param err - Callback invoked in case of an error.\n * @param stream - AudioOutputStream to receive the synthesized audio.\n */\n speakTextAsync(text, cb, err, stream) {\n this.speakImpl(text, false, cb, err, stream);\n }\n /**\n * Executes speech synthesis on SSML.\n * The task returns the synthesis result.\n * @member SpeechSynthesizer.prototype.speakSsmlAsync\n * @function\n * @public\n * @param ssml - SSML to be synthesized.\n * @param cb - Callback that received the SpeechSynthesisResult.\n * @param err - Callback invoked in case of an error.\n * @param stream - AudioOutputStream to receive the synthesized audio.\n */\n speakSsmlAsync(ssml, cb, err, stream) {\n this.speakImpl(ssml, true, cb, err, stream);\n }\n /**\n * Dispose of associated resources.\n * @member SpeechSynthesizer.prototype.close\n * @function\n * @public\n */\n close(cb, err) {\n Contracts.throwIfDisposed(this.privDisposed);\n marshalPromiseToCallbacks(this.dispose(true), cb, err);\n }\n /**\n * @Internal\n * Do not use externally, object returned will change without warning or notice.\n */\n get internalData() {\n return this.privAdapter;\n }\n /**\n * This method performs cleanup of resources.\n * The Boolean parameter disposing indicates whether the method is called\n * from Dispose (if disposing is true) or from the finalizer (if disposing is false).\n * Derived classes should override this method to dispose resource if needed.\n * @member SpeechSynthesizer.prototype.dispose\n * @function\n * @public\n * @param {boolean} disposing - Flag to request disposal.\n */\n dispose(disposing) {\n return __awaiter(this, void 0, void 0, function* () {\n if (this.privDisposed) {\n return;\n }\n if (disposing) {\n if (this.privAdapter) {\n yield this.privAdapter.dispose();\n }\n }\n this.privDisposed = true;\n });\n }\n //\n // ################################################################################################################\n // IMPLEMENTATION.\n // Move to independent class\n // ################################################################################################################\n //\n createSynthesizerConfig(speechConfig) {\n return new SynthesizerConfig(speechConfig, this.privProperties);\n }\n // Creates the synthesis adapter\n createSynthesisAdapter(authentication, connectionFactory, audioConfig, synthesizerConfig) {\n return new SynthesisAdapterBase(authentication, connectionFactory, synthesizerConfig, this, this.audioConfig);\n }\n implCommonSynthesizeSetup() {\n let osPlatform = (typeof window !== \"undefined\") ? \"Browser\" : \"Node\";\n let osName = \"unknown\";\n let osVersion = \"unknown\";\n if (typeof navigator !== \"undefined\") {\n osPlatform = osPlatform + \"/\" + navigator.platform;\n osName = navigator.userAgent;\n osVersion = navigator.appVersion;\n }\n const synthesizerConfig = this.createSynthesizerConfig(new SpeechServiceConfig(new Context(new OS(osPlatform, osName, osVersion))));\n const subscriptionKey = this.privProperties.getProperty(PropertyId.SpeechServiceConnection_Key, undefined);\n const authentication = (subscriptionKey && subscriptionKey !== \"\") ?\n new CognitiveSubscriptionKeyAuthentication(subscriptionKey) :\n new CognitiveTokenAuthentication((authFetchEventId) => {\n const authorizationToken = this.privProperties.getProperty(PropertyId.SpeechServiceAuthorization_Token, undefined);\n return Promise.resolve(authorizationToken);\n }, (authFetchEventId) => {\n const authorizationToken = this.privProperties.getProperty(PropertyId.SpeechServiceAuthorization_Token, undefined);\n return Promise.resolve(authorizationToken);\n });\n this.privAdapter = this.createSynthesisAdapter(authentication, this.privConnectionFactory, this.audioConfig, synthesizerConfig);\n this.privAdapter.audioOutputFormat = AudioOutputFormatImpl.fromSpeechSynthesisOutputFormat(SpeechSynthesisOutputFormat[this.properties.getProperty(PropertyId.SpeechServiceConnection_SynthOutputFormat, undefined)]);\n }\n speakImpl(text, IsSsml, cb, err, dataStream) {\n try {\n Contracts.throwIfDisposed(this.privDisposed);\n const requestId = createNoDashGuid();\n let audioDestination;\n if (dataStream instanceof PushAudioOutputStreamCallback) {\n audioDestination = new PushAudioOutputStreamImpl(dataStream);\n }\n else if (dataStream instanceof PullAudioOutputStream) {\n audioDestination = dataStream;\n }\n else if (dataStream !== undefined) {\n audioDestination = new AudioFileWriter(dataStream);\n }\n else {\n audioDestination = undefined;\n }\n this.synthesisRequestQueue.enqueue(new SynthesisRequest(requestId, text, IsSsml, (e) => {\n this.privSynthesizing = false;\n if (!!cb) {\n try {\n cb(e);\n }\n catch (e) {\n if (!!err) {\n err(e);\n }\n }\n }\n cb = undefined;\n /* tslint:disable:no-empty */\n this.adapterSpeak().catch(() => { });\n }, (e) => {\n if (!!err) {\n err(e);\n }\n }, audioDestination));\n /* tslint:disable:no-empty */\n this.adapterSpeak().catch(() => { });\n }\n catch (error) {\n if (!!err) {\n if (error instanceof Error) {\n const typedError = error;\n err(typedError.name + \": \" + typedError.message);\n }\n else {\n err(error);\n }\n }\n // Destroy the synthesizer.\n /* tslint:disable:no-empty */\n this.dispose(true).catch(() => { });\n }\n }\n adapterSpeak() {\n return __awaiter(this, void 0, void 0, function* () {\n if (!this.privDisposed && !this.privSynthesizing) {\n this.privSynthesizing = true;\n const request = yield this.synthesisRequestQueue.dequeue();\n return this.privAdapter.Speak(request.text, request.isSSML, request.requestId, request.cb, request.err, request.dataStream);\n }\n });\n }\n static XMLEncode(text) {\n return text.replace(/&/g, \"&\")\n .replace(//g, \">\")\n .replace(/\"/g, \""\")\n .replace(/'/g, \"'\");\n }\n}\n// tslint:disable-next-line:max-classes-per-file\nexport class SynthesisRequest {\n constructor(requestId, text, isSSML, cb, err, dataStream) {\n this.requestId = requestId;\n this.text = text;\n this.isSSML = isSSML;\n this.cb = cb;\n this.err = err;\n this.dataStream = dataStream;\n }\n}\n\n//# sourceMappingURL=SpeechSynthesizer.js.map\n","// Copyright (c) Microsoft Corporation. All rights reserved.\n// Licensed under the MIT license.\n// Multi-device Conversation is a Preview feature.\nexport var ParticipantChangedReason;\n(function (ParticipantChangedReason) {\n /** Participant has joined the conversation. */\n ParticipantChangedReason[ParticipantChangedReason[\"JoinedConversation\"] = 0] = \"JoinedConversation\";\n /** Participant has left the conversation. This could be voluntary, or involuntary\n * (e.g. they are experiencing networking issues).\n */\n ParticipantChangedReason[ParticipantChangedReason[\"LeftConversation\"] = 1] = \"LeftConversation\";\n /** The participants' state has changed (e.g. they became muted, changed their nickname). */\n ParticipantChangedReason[ParticipantChangedReason[\"Updated\"] = 2] = \"Updated\";\n})(ParticipantChangedReason || (ParticipantChangedReason = {}));\n\n//# sourceMappingURL=ParticipantChangedReason.js.map\n","// Copyright (c) Microsoft Corporation. All rights reserved.\n// Licensed under the MIT license.\nimport { PropertyCollection } from \"./Exports\";\n/**\n * Represents collection of parameters and their values.\n * @class Translation\n */\nexport class Translations {\n constructor() {\n // Use an PropertyCollection internally, just wrapping it to hide the | enum syntax it has.\n this.privMap = new PropertyCollection();\n }\n /**\n * Returns the parameter value in type String. The parameter must have the same type as String.\n * Currently only String, int and bool are allowed.\n * If the name is not available, the specified defaultValue is returned.\n * @member Translation.prototype.get\n * @function\n * @public\n * @param {string} key - The parameter name.\n * @param {string} def - The default value which is returned if the parameter is not available in the collection.\n * @returns {string} value of the parameter.\n */\n get(key, def) {\n return this.privMap.getProperty(key, def);\n }\n /**\n * Sets the String value of the parameter specified by name.\n * @member Translation.prototype.set\n * @function\n * @public\n * @param {string} key - The parameter name.\n * @param {string} value - The value of the parameter.\n */\n set(key, value) {\n this.privMap.setProperty(key, value);\n }\n}\n\n//# sourceMappingURL=Translations.js.map\n","// Copyright (c) Microsoft Corporation. All rights reserved.\n// Licensed under the MIT license.\nimport { CancellationEventArgsBase, } from \"./CancellationEventArgsBase\";\nexport class SpeechRecognitionCanceledEventArgs extends CancellationEventArgsBase {\n}\n\n//# sourceMappingURL=SpeechRecognitionCanceledEventArgs.js.map\n","// Copyright (c) Microsoft Corporation. All rights reserved.\n// Licensed under the MIT license.\nimport { CancellationErrorCodePropertyName } from \"../common.speech/Exports\";\nimport { Contracts } from \"./Contracts\";\nimport { CancellationDetailsBase, CancellationErrorCode, CancellationReason, PropertyCollection, ResultReason, } from \"./Exports\";\n/**\n * Output format\n * @class VoiceProfileEnrollmentResult\n */\nexport class VoiceProfileEnrollmentResult {\n constructor(reason, json, statusText) {\n this.privReason = reason;\n this.privProperties = new PropertyCollection();\n if (this.privReason !== ResultReason.Canceled) {\n this.privDetails = JSON.parse(json);\n Contracts.throwIfNullOrUndefined(json, \"JSON\");\n if (this.privDetails.enrollmentStatus.toLowerCase() === \"enrolling\") {\n this.privReason = ResultReason.EnrollingVoiceProfile;\n }\n }\n else {\n this.privErrorDetails = statusText;\n this.privProperties.setProperty(CancellationErrorCodePropertyName, CancellationErrorCode[CancellationErrorCode.ServiceError]);\n }\n }\n get reason() {\n return this.privReason;\n }\n get enrollmentsCount() {\n return this.privDetails.enrollmentsCount;\n }\n get enrollmentsLength() {\n return this.privDetails.enrollmentsLength;\n }\n get properties() {\n return this.privProperties;\n }\n get enrollmentResultDetails() {\n return this.privDetails;\n }\n get errorDetails() {\n return this.privErrorDetails;\n }\n}\n/**\n * @class VoiceProfileEnrollmentCancellationDetails\n */\n// tslint:disable-next-line:max-classes-per-file\nexport class VoiceProfileEnrollmentCancellationDetails extends CancellationDetailsBase {\n constructor(reason, errorDetails, errorCode) {\n super(reason, errorDetails, errorCode);\n }\n /**\n * Creates an instance of VoiceProfileEnrollmentCancellationDetails object for the canceled VoiceProfileEnrollmentResult.\n * @member VoiceProfileEnrollmentCancellationDetails.fromResult\n * @function\n * @public\n * @param {VoiceProfileEnrollmentResult} result - The result that was canceled.\n * @returns {VoiceProfileEnrollmentCancellationDetails} The cancellation details object being created.\n */\n static fromResult(result) {\n const reason = CancellationReason.Error;\n let errorCode = CancellationErrorCode.NoError;\n if (!!result.properties) {\n errorCode = CancellationErrorCode[result.properties.getProperty(CancellationErrorCodePropertyName, CancellationErrorCode[CancellationErrorCode.NoError])];\n }\n return new VoiceProfileEnrollmentCancellationDetails(reason, result.errorDetails, errorCode);\n }\n}\n\n//# sourceMappingURL=VoiceProfileEnrollmentResult.js.map\n","// Copyright (c) Microsoft Corporation. All rights reserved.\n// Licensed under the MIT license.\nimport { Contracts } from \"./Contracts\";\nimport { PropertyId } from \"./Exports\";\n/**\n * Pronunciation assessment results.\n * @class PronunciationAssessmentResult\n * Added in version 1.15.0.\n */\nexport class PronunciationAssessmentResult {\n constructor(jsonString) {\n const j = JSON.parse(jsonString);\n Contracts.throwIfNullOrUndefined(j.NBest[0], \"NBest\");\n this.privPronJson = j.NBest[0];\n }\n /**\n * @member PronunciationAssessmentResult.fromResult\n * @function\n * @public\n * @param {RecognitionResult} result The recognition result.\n * @return {PronunciationAssessmentConfig} Instance of PronunciationAssessmentConfig\n * @summary Creates an instance of the PronunciationAssessmentResult from recognition result.\n */\n static fromResult(result) {\n Contracts.throwIfNullOrUndefined(result, \"result\");\n const json = result.properties.getProperty(PropertyId.SpeechServiceResponse_JsonResult);\n Contracts.throwIfNullOrUndefined(json, \"json\");\n return new PronunciationAssessmentResult(json);\n }\n /**\n * Gets the detail result of pronunciation assessment.\n * @member PronunciationAssessmentConfig.prototype.detailResult\n * @function\n * @public\n * @returns {any} detail result.\n */\n get detailResult() {\n return this.privPronJson;\n }\n /**\n * The score indicating the pronunciation accuracy of the given speech, which indicates\n * how closely the phonemes match a native speaker's pronunciation.\n * @member PronunciationAssessmentResult.prototype.accuracyScore\n * @function\n * @public\n * @returns {number} Accuracy score.\n */\n get accuracyScore() {\n return this.detailResult.PronunciationAssessment.AccuracyScore;\n }\n /**\n * The overall score indicating the pronunciation quality of the given speech.\n * This is calculated from AccuracyScore, FluencyScore and CompletenessScore with weight.\n * @member PronunciationAssessmentResult.prototype.pronunciationScore\n * @function\n * @public\n * @returns {number} Pronunciation score.\n */\n get pronunciationScore() {\n return this.detailResult.PronunciationAssessment.PronScore;\n }\n /**\n * The score indicating the completeness of the given speech by calculating the ratio of pronounced words towards entire input.\n * @member PronunciationAssessmentResult.prototype.completenessScore\n * @function\n * @public\n * @returns {number} Completeness score.\n */\n get completenessScore() {\n return this.detailResult.PronunciationAssessment.CompletenessScore;\n }\n /**\n * The score indicating the fluency of the given speech.\n * @member PronunciationAssessmentResult.prototype.fluencyScore\n * @function\n * @public\n * @returns {number} Fluency score.\n */\n get fluencyScore() {\n return this.detailResult.PronunciationAssessment.FluencyScore;\n }\n}\n\n//# sourceMappingURL=PronunciationAssessmentResult.js.map\n","// Copyright (c) Microsoft Corporation. All rights reserved.\n// Licensed under the MIT license.\n/**\n * Defines the pronunciation evaluation granularity; default value is Phoneme.\n * Added in version 1.15.0\n * @class PronunciationAssessmentGranularity\n */\nexport var PronunciationAssessmentGranularity;\n(function (PronunciationAssessmentGranularity) {\n /**\n * Shows the score on the full text, word and phoneme level\n * @member PronunciationAssessmentGranularity.Phoneme\n */\n PronunciationAssessmentGranularity[PronunciationAssessmentGranularity[\"Phoneme\"] = 1] = \"Phoneme\";\n /**\n * Shows the score on the full text and word level\n * @member PronunciationAssessmentGranularity.Word\n */\n PronunciationAssessmentGranularity[PronunciationAssessmentGranularity[\"Word\"] = 2] = \"Word\";\n /**\n * Shows the score on the full text level only\n * @member PronunciationAssessmentGranularity.FullText\n */\n PronunciationAssessmentGranularity[PronunciationAssessmentGranularity[\"FullText\"] = 3] = \"FullText\";\n})(PronunciationAssessmentGranularity || (PronunciationAssessmentGranularity = {}));\n\n//# sourceMappingURL=PronunciationAssessmentGranularity.js.map\n","// Copyright (c) Microsoft Corporation. All rights reserved.\n// Licensed under the MIT license.\n/**\n * Defines content for session events like SessionStarted/Stopped, SoundStarted/Stopped.\n * @class SessionEventArgs\n */\nexport class SessionEventArgs {\n /**\n * Creates and initializes an instance of this class.\n * @constructor\n * @param {string} sessionId - The session id.\n */\n constructor(sessionId) {\n this.privSessionId = sessionId;\n }\n /**\n * Represents the session identifier.\n * @member SessionEventArgs.prototype.sessionId\n * @function\n * @public\n * @returns {string} Represents the session identifier.\n */\n get sessionId() {\n return this.privSessionId;\n }\n}\n\n//# sourceMappingURL=SessionEventArgs.js.map\n","// Copyright (c) Microsoft Corporation. All rights reserved.\n// Licensed under the MIT license.\n// Multi-device Conversation is a Preview feature.\nimport { RecognitionEventArgs } from \"../Exports\";\nexport class ConversationTranslationEventArgs extends RecognitionEventArgs {\n /**\n * Creates and initializes an instance of this class.\n * @constructor\n * @param {ConversationTranslationResult} result - The translation recognition result.\n * @param {number} offset - The offset.\n * @param {string} sessionId - The session id.\n */\n constructor(result, offset, sessionId) {\n super(offset, sessionId);\n this.privResult = result;\n }\n /**\n * Specifies the recognition result.\n * @returns {ConversationTranslationResult} the recognition result.\n */\n get result() {\n return this.privResult;\n }\n}\n\n//# sourceMappingURL=ConversationTranslationEventArgs.js.map\n","module.exports = __webpack_public_path__ + \"img/basicInstruction.4b6c083a.png\";","// Copyright (c) Microsoft Corporation. All rights reserved.\n// Licensed under the MIT license.\n// Multi-device Conversation is a Preview feature.\nimport { CancellationEventArgsBase } from \"../CancellationEventArgsBase\";\nexport class ConversationTranslationCanceledEventArgs extends CancellationEventArgsBase {\n}\n\n//# sourceMappingURL=ConversationTranslationCanceledEventArgs.js.map\n","// Copyright (c) Microsoft Corporation. All rights reserved.\n// Licensed under the MIT license.\nimport { RecognitionEventArgs } from \"./Exports\";\n/**\n * Defines contents of speech recognizing/recognized event.\n * @class SpeechRecognitionEventArgs\n */\nexport class SpeechRecognitionEventArgs extends RecognitionEventArgs {\n /**\n * Creates and initializes an instance of this class.\n * @constructor\n * @param {SpeechRecognitionResult} result - The speech recognition result.\n * @param {number} offset - The offset.\n * @param {string} sessionId - The session id.\n */\n constructor(result, offset, sessionId) {\n super(offset, sessionId);\n this.privResult = result;\n }\n /**\n * Specifies the recognition result.\n * @member SpeechRecognitionEventArgs.prototype.result\n * @function\n * @public\n * @returns {SpeechRecognitionResult} the recognition result.\n */\n get result() {\n return this.privResult;\n }\n}\n/**\n * Defines contents of conversation transcribed/transcribing event.\n * @class ConversationTranscriptionEventArgs\n */\n// tslint:disable-next-line:max-classes-per-file\nexport class ConversationTranscriptionEventArgs extends SpeechRecognitionEventArgs {\n}\n\n//# sourceMappingURL=SpeechRecognitionEventArgs.js.map\n","// Copyright (c) Microsoft Corporation. All rights reserved.\n// Licensed under the MIT license.\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nimport { Context, OS, SpeakerIdMessageAdapter, SpeakerRecognitionConfig, } from \"../common.speech/Exports\";\nimport { marshalPromiseToCallbacks } from \"../common/Exports\";\nimport { Contracts } from \"./Contracts\";\nimport { PropertyId, ResultReason, SpeakerIdentificationModel, SpeakerRecognitionResult, SpeakerRecognitionResultType, SpeakerVerificationModel, } from \"./Exports\";\n/**\n * Defines SpeakerRecognizer class for Speaker Recognition\n * Handles operations from user for Voice Profile operations (e.g. createProfile, deleteProfile)\n * @class SpeakerRecognizer\n */\nexport class SpeakerRecognizer {\n /**\n * SpeakerRecognizer constructor.\n * @constructor\n * @param {SpeechConfig} speechConfig - An set of initial properties for this recognizer (authentication key, region, &c)\n */\n constructor(speechConfig, audioConfig) {\n const speechConfigImpl = speechConfig;\n Contracts.throwIfNull(speechConfigImpl, \"speechConfig\");\n this.privAudioConfigImpl = audioConfig;\n Contracts.throwIfNull(this.privAudioConfigImpl, \"audioConfig\");\n this.privProperties = speechConfigImpl.properties.clone();\n this.implSRSetup();\n }\n /**\n * Gets the authorization token used to communicate with the service.\n * @member SpeakerRecognizer.prototype.authorizationToken\n * @function\n * @public\n * @returns {string} Authorization token.\n */\n get authorizationToken() {\n return this.properties.getProperty(PropertyId.SpeechServiceAuthorization_Token);\n }\n /**\n * Gets/Sets the authorization token used to communicate with the service.\n * @member SpeakerRecognizer.prototype.authorizationToken\n * @function\n * @public\n * @param {string} token - Authorization token.\n */\n set authorizationToken(token) {\n Contracts.throwIfNullOrWhitespace(token, \"token\");\n this.properties.setProperty(PropertyId.SpeechServiceAuthorization_Token, token);\n }\n /**\n * The collection of properties and their values defined for this SpeakerRecognizer.\n * @member SpeakerRecognizer.prototype.properties\n * @function\n * @public\n * @returns {PropertyCollection} The collection of properties and their values defined for this SpeakerRecognizer.\n */\n get properties() {\n return this.privProperties;\n }\n /**\n * Get recognition result for model using given audio\n * @member SpeakerRecognizer.prototype.recognizeOnceAsync\n * @function\n * @public\n * @param {SpeakerIdentificationModel} model Model containing Voice Profiles to be identified\n * @param cb - Callback invoked once result is returned.\n * @param err - Callback invoked in case of an error.\n */\n recognizeOnceAsync(model, cb, err) {\n if (model instanceof SpeakerIdentificationModel) {\n const responsePromise = this.privAdapter.identifySpeaker(model, this.privAudioConfigImpl);\n marshalPromiseToCallbacks(this.getResult(responsePromise, SpeakerRecognitionResultType.Identify, undefined), cb, err);\n }\n else if (model instanceof SpeakerVerificationModel) {\n const responsePromise = this.privAdapter.verifySpeaker(model, this.privAudioConfigImpl);\n marshalPromiseToCallbacks(this.getResult(responsePromise, SpeakerRecognitionResultType.Verify, model.voiceProfile.profileId), cb, err);\n }\n else {\n throw new Error(\"SpeakerRecognizer.recognizeOnce: Unexpected model type\");\n }\n }\n /**\n * Included for compatibility\n * @member SpeakerRecognizer.prototype.close\n * @function\n * @public\n */\n close() {\n return;\n }\n // Does class setup, swiped from Recognizer.\n implSRSetup() {\n let osPlatform = (typeof window !== \"undefined\") ? \"Browser\" : \"Node\";\n let osName = \"unknown\";\n let osVersion = \"unknown\";\n if (typeof navigator !== \"undefined\") {\n osPlatform = osPlatform + \"/\" + navigator.platform;\n osName = navigator.userAgent;\n osVersion = navigator.appVersion;\n }\n const recognizerConfig = new SpeakerRecognitionConfig(new Context(new OS(osPlatform, osName, osVersion)), this.privProperties);\n this.privAdapter = new SpeakerIdMessageAdapter(recognizerConfig);\n }\n getResult(responsePromise, resultType, profileId) {\n return __awaiter(this, void 0, void 0, function* () {\n const response = yield responsePromise;\n return new SpeakerRecognitionResult(resultType, response.data, profileId, response.ok ? ResultReason.RecognizedSpeaker : ResultReason.Canceled);\n });\n }\n}\n\n//# sourceMappingURL=SpeakerRecognizer.js.map\n","// Copyright (c) Microsoft Corporation. All rights reserved.\n// Licensed under the MIT license.\nimport { TurnStatusResponsePayload } from \"../common.speech/ServiceMessages/TurnStatusPayload\";\n/**\n * Defines contents of received message/events.\n * @class TurnStatusReceivedEventArgs\n */\nexport class TurnStatusReceivedEventArgs {\n /**\n * Creates and initializes an instance of this class.\n * @constructor\n * @param {string} turnStatus - The JSON-encoded turn status message.\n */\n constructor(turnStatus) {\n this.privTurnStatus = TurnStatusResponsePayload.fromJSON(turnStatus);\n }\n /**\n * Gets the interaction identifier associated with this turn status event.\n * @member TurnStatusReceivedEventArgs.prototype.interactionId\n * @function\n * @public\n * @returns {any} the received interaction id.\n */\n get interactionId() {\n return this.privTurnStatus.interactionId;\n }\n /**\n * Gets the conversation identifier associated with this turn status event.\n * @member TurnStatusReceivedEventArgs.prototype.conversationId\n * @function\n * @public\n * @returns {any} the received conversation id.\n */\n get conversationId() {\n return this.privTurnStatus.conversationId;\n }\n /**\n * Gets the received turn status code.\n * @member TurnStatusReceivedEventArgs.prototype.statusCode\n * @function\n * @public\n * @returns {number} the received turn status.\n */\n get statusCode() {\n return this.privTurnStatus.statusCode;\n }\n}\n\n//# sourceMappingURL=TurnStatusReceivedEventArgs.js.map\n","// Copyright (c) Microsoft Corporation. All rights reserved.\n// Licensed under the MIT license.\n// Multi-device Conversation is a Preview feature.\nimport { PropertyCollection } from \"../Exports\";\nexport class User {\n constructor(userId) {\n this.privUserId = userId;\n }\n get userId() {\n return this.privUserId;\n }\n}\n// tslint:disable-next-line: max-classes-per-file\nexport class Participant {\n constructor(id, avatar, displayName, isHost, isMuted, isUsingTts, preferredLanguage, voice) {\n this.privId = id;\n this.privAvatar = avatar;\n this.privDisplayName = displayName;\n this.privIsHost = isHost;\n this.privIsMuted = isMuted;\n this.privIsUsingTts = isUsingTts;\n this.privPreferredLanguage = preferredLanguage;\n this.privVoice = voice;\n this.privProperties = new PropertyCollection();\n }\n static From(id, language, voice) {\n return new Participant(id, \"\", id, false, false, false, language, voice);\n }\n get avatar() {\n return this.privAvatar;\n }\n get displayName() {\n return this.privDisplayName;\n }\n get id() {\n return this.privId;\n }\n get preferredLanguage() {\n return this.privPreferredLanguage;\n }\n get isHost() {\n return this.privIsHost;\n }\n get isMuted() {\n return this.privIsMuted;\n }\n get isUsingTts() {\n return this.privIsUsingTts;\n }\n get voice() {\n return this.privVoice;\n }\n get properties() {\n return this.privProperties;\n }\n}\n\n//# sourceMappingURL=IParticipant.js.map\n","// Copyright (c) Microsoft Corporation. All rights reserved.\n// Licensed under the MIT license.\nimport { CancellationErrorCodePropertyName } from \"../common.speech/Exports\";\nimport { Contracts } from \"./Contracts\";\nimport { CancellationDetailsBase, CancellationErrorCode, CancellationReason, PropertyCollection, PropertyId, ResultReason, } from \"./Exports\";\nexport var SpeakerRecognitionResultType;\n(function (SpeakerRecognitionResultType) {\n SpeakerRecognitionResultType[SpeakerRecognitionResultType[\"Verify\"] = 0] = \"Verify\";\n SpeakerRecognitionResultType[SpeakerRecognitionResultType[\"Identify\"] = 1] = \"Identify\";\n})(SpeakerRecognitionResultType || (SpeakerRecognitionResultType = {}));\n/**\n * Output format\n * @class SpeakerRecognitionResult\n */\nexport class SpeakerRecognitionResult {\n constructor(resultType, data, profileId, resultReason = ResultReason.RecognizedSpeaker) {\n this.privProperties = new PropertyCollection();\n this.privReason = resultReason;\n if (this.privReason !== ResultReason.Canceled) {\n if (resultType === SpeakerRecognitionResultType.Identify) {\n const json = JSON.parse(data);\n Contracts.throwIfNullOrUndefined(json, \"JSON\");\n this.privProfileId = json.identifiedProfile.profileId;\n this.privScore = json.identifiedProfile.score;\n }\n else {\n const json = JSON.parse(data);\n Contracts.throwIfNullOrUndefined(json, \"JSON\");\n this.privScore = json.score;\n if (json.recognitionResult.toLowerCase() !== \"accept\") {\n this.privReason = ResultReason.NoMatch;\n }\n if (profileId !== undefined && profileId !== \"\") {\n this.privProfileId = profileId;\n }\n }\n }\n else {\n const json = JSON.parse(data);\n Contracts.throwIfNullOrUndefined(json, \"JSON\");\n this.privErrorDetails = json.statusText;\n this.privProperties.setProperty(CancellationErrorCodePropertyName, CancellationErrorCode[CancellationErrorCode.ServiceError]);\n }\n this.privProperties.setProperty(PropertyId.SpeechServiceResponse_JsonResult, data);\n }\n get properties() {\n return this.privProperties;\n }\n get reason() {\n return this.privReason;\n }\n get profileId() {\n return this.privProfileId;\n }\n get errorDetails() {\n return this.privErrorDetails;\n }\n get score() {\n return this.privScore;\n }\n}\n/**\n * @class SpeakerRecognitionCancellationDetails\n */\n// tslint:disable-next-line:max-classes-per-file\nexport class SpeakerRecognitionCancellationDetails extends CancellationDetailsBase {\n constructor(reason, errorDetails, errorCode) {\n super(reason, errorDetails, errorCode);\n }\n /**\n * Creates an instance of SpeakerRecognitionCancellationDetails object for the canceled SpeakerRecognitionResult\n * @member SpeakerRecognitionCancellationDetails.fromResult\n * @function\n * @public\n * @param {SpeakerRecognitionResult} result - The result that was canceled.\n * @returns {SpeakerRecognitionCancellationDetails} The cancellation details object being created.\n */\n static fromResult(result) {\n const reason = CancellationReason.Error;\n let errorCode = CancellationErrorCode.NoError;\n if (!!result.properties) {\n errorCode = CancellationErrorCode[result.properties.getProperty(CancellationErrorCodePropertyName, CancellationErrorCode[CancellationErrorCode.NoError])];\n }\n return new SpeakerRecognitionCancellationDetails(reason, result.errorDetails, errorCode);\n }\n}\n\n//# sourceMappingURL=SpeakerRecognitionResult.js.map\n","module.exports = __webpack_public_path__ + \"img/introTime.35a40283.png\";","// Copyright (c) Microsoft Corporation. All rights reserved.\n// Licensed under the MIT license.\n// Multi-device Conversation is a Preview feature.\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nimport { ConversationConnectionConfig, ConversationManager, ConversationRecognizerFactory, ConversationTranslatorCommandTypes, ConversationTranslatorMessageTypes, InternalParticipants } from \"../../common.speech/Exports\";\nimport { marshalPromiseToCallbacks } from \"../../common/Exports\";\nimport { Contracts } from \"../Contracts\";\nimport { ConversationParticipantsChangedEventArgs, ConversationTranslationEventArgs, Participant, ParticipantChangedReason, ProfanityOption, PropertyCollection, PropertyId, } from \"../Exports\";\nexport class Conversation {\n constructor() { }\n /**\n * Create a conversation\n * @param speechConfig\n * @param cb\n * @param err\n */\n static createConversationAsync(speechConfig, arg2, arg3, arg4) {\n Contracts.throwIfNullOrUndefined(speechConfig, ConversationConnectionConfig.restErrors.invalidArgs.replace(\"{arg}\", \"config\"));\n Contracts.throwIfNullOrUndefined(speechConfig.region, ConversationConnectionConfig.restErrors.invalidArgs.replace(\"{arg}\", \"SpeechServiceConnection_Region\"));\n if (!speechConfig.subscriptionKey && !speechConfig.getProperty(PropertyId[PropertyId.SpeechServiceAuthorization_Token])) {\n Contracts.throwIfNullOrUndefined(speechConfig.subscriptionKey, ConversationConnectionConfig.restErrors.invalidArgs.replace(\"{arg}\", \"SpeechServiceConnection_Key\"));\n }\n if (typeof arg2 === \"string\") {\n const conversationImpl = new ConversationImpl(speechConfig, arg2);\n marshalPromiseToCallbacks((() => __awaiter(this, void 0, void 0, function* () { return; }))(), arg3, arg4);\n return conversationImpl;\n }\n else {\n const conversationImpl = new ConversationImpl(speechConfig);\n const cb = arg2;\n const err = arg3;\n conversationImpl.createConversationAsync((() => {\n if (!!cb) {\n cb();\n }\n }), (error) => {\n if (!!err) {\n err(error);\n }\n });\n return conversationImpl;\n }\n }\n}\n// tslint:disable-next-line:max-classes-per-file\nexport class ConversationImpl extends Conversation {\n /**\n * Create a conversation impl\n * @param speechConfig\n * @param {string} id - optional conversationId\n */\n constructor(speechConfig, id) {\n super();\n this.privIsDisposed = false;\n this.privIsConnected = false;\n this.privErrors = ConversationConnectionConfig.restErrors;\n this.privConversationId = \"\";\n /** websocket callbacks */\n this.onConnected = (e) => {\n this.privIsConnected = true;\n try {\n if (!!this.privConversationTranslator.sessionStarted) {\n this.privConversationTranslator.sessionStarted(this.privConversationTranslator, e);\n }\n }\n catch (e) {\n //\n }\n };\n this.onDisconnected = (e) => __awaiter(this, void 0, void 0, function* () {\n yield this.close(false);\n try {\n if (!!this.privConversationTranslator.sessionStopped) {\n this.privConversationTranslator.sessionStopped(this.privConversationTranslator, e);\n }\n }\n catch (e) {\n //\n }\n });\n this.onCanceled = (r, e) => __awaiter(this, void 0, void 0, function* () {\n yield this.close(false); // ?\n try {\n if (!!this.privConversationTranslator.canceled) {\n this.privConversationTranslator.canceled(this.privConversationTranslator, e);\n }\n }\n catch (e) {\n //\n }\n });\n this.onParticipantUpdateCommandReceived = (r, e) => {\n var _a, _b;\n try {\n const updatedParticipant = this.privParticipants.getParticipant(e.id);\n if (updatedParticipant !== undefined) {\n switch (e.key) {\n case ConversationTranslatorCommandTypes.changeNickname:\n updatedParticipant.displayName = e.value;\n break;\n case ConversationTranslatorCommandTypes.setUseTTS:\n updatedParticipant.useTts = e.value;\n break;\n case ConversationTranslatorCommandTypes.setProfanityFiltering:\n updatedParticipant.profanity = e.value;\n break;\n case ConversationTranslatorCommandTypes.setMute:\n updatedParticipant.isMuted = e.value;\n break;\n case ConversationTranslatorCommandTypes.setTranslateToLanguages:\n updatedParticipant.translateToLanguages = e.value;\n break;\n }\n this.privParticipants.addOrUpdateParticipant(updatedParticipant);\n if (!!((_a = this.privConversationTranslator) === null || _a === void 0 ? void 0 : _a.participantsChanged)) {\n (_b = this.privConversationTranslator) === null || _b === void 0 ? void 0 : _b.participantsChanged(this.privConversationTranslator, new ConversationParticipantsChangedEventArgs(ParticipantChangedReason.Updated, [this.toParticipant(updatedParticipant)], e.sessionId));\n }\n }\n }\n catch (e) {\n //\n }\n };\n this.onLockRoomCommandReceived = (r, e) => {\n // TODO\n };\n this.onMuteAllCommandReceived = (r, e) => {\n var _a, _b;\n try {\n this.privParticipants.participants.forEach((p) => p.isMuted = (p.isHost ? false : e.isMuted));\n if (!!((_a = this.privConversationTranslator) === null || _a === void 0 ? void 0 : _a.participantsChanged)) {\n (_b = this.privConversationTranslator) === null || _b === void 0 ? void 0 : _b.participantsChanged(this.privConversationTranslator, new ConversationParticipantsChangedEventArgs(ParticipantChangedReason.Updated, this.toParticipants(false), e.sessionId));\n }\n }\n catch (e) {\n //\n }\n };\n this.onParticipantJoinCommandReceived = (r, e) => {\n var _a, _b;\n try {\n const newParticipant = this.privParticipants.addOrUpdateParticipant(e.participant);\n if (newParticipant !== undefined) {\n if (!!((_a = this.privConversationTranslator) === null || _a === void 0 ? void 0 : _a.participantsChanged)) {\n (_b = this.privConversationTranslator) === null || _b === void 0 ? void 0 : _b.participantsChanged(this.privConversationTranslator, new ConversationParticipantsChangedEventArgs(ParticipantChangedReason.JoinedConversation, [this.toParticipant(newParticipant)], e.sessionId));\n }\n }\n }\n catch (e) {\n //\n }\n };\n this.onParticipantLeaveCommandReceived = (r, e) => {\n var _a, _b;\n try {\n const ejectedParticipant = this.privParticipants.getParticipant(e.participant.id);\n if (ejectedParticipant !== undefined) {\n // remove the participant from the internal participants list\n this.privParticipants.deleteParticipant(e.participant.id);\n if (!!((_a = this.privConversationTranslator) === null || _a === void 0 ? void 0 : _a.participantsChanged)) {\n // notify subscribers that the participant has left the conversation\n (_b = this.privConversationTranslator) === null || _b === void 0 ? void 0 : _b.participantsChanged(this.privConversationTranslator, new ConversationParticipantsChangedEventArgs(ParticipantChangedReason.LeftConversation, [this.toParticipant(ejectedParticipant)], e.sessionId));\n }\n }\n }\n catch (e) {\n //\n }\n };\n this.onTranslationReceived = (r, e) => {\n var _a, _b, _c, _d, _e, _f;\n try {\n switch (e.command) {\n case ConversationTranslatorMessageTypes.final:\n if (!!((_a = this.privConversationTranslator) === null || _a === void 0 ? void 0 : _a.transcribed)) {\n (_b = this.privConversationTranslator) === null || _b === void 0 ? void 0 : _b.transcribed(this.privConversationTranslator, new ConversationTranslationEventArgs(e.payload, undefined, e.sessionId));\n }\n break;\n case ConversationTranslatorMessageTypes.partial:\n if (!!((_c = this.privConversationTranslator) === null || _c === void 0 ? void 0 : _c.transcribing)) {\n (_d = this.privConversationTranslator) === null || _d === void 0 ? void 0 : _d.transcribing(this.privConversationTranslator, new ConversationTranslationEventArgs(e.payload, undefined, e.sessionId));\n }\n break;\n case ConversationTranslatorMessageTypes.instantMessage:\n if (!!((_e = this.privConversationTranslator) === null || _e === void 0 ? void 0 : _e.textMessageReceived)) {\n (_f = this.privConversationTranslator) === null || _f === void 0 ? void 0 : _f.textMessageReceived(this.privConversationTranslator, new ConversationTranslationEventArgs(e.payload, undefined, e.sessionId));\n }\n break;\n }\n }\n catch (e) {\n //\n }\n };\n this.onParticipantsListReceived = (r, e) => {\n var _a, _b, _c;\n try {\n // check if the session token needs to be updated\n if (e.sessionToken !== undefined && e.sessionToken !== null) {\n this.privRoom.token = e.sessionToken;\n }\n // save the participants\n this.privParticipants.participants = [...e.participants];\n // enable the conversation\n if (this.privParticipants.me !== undefined) {\n this.privIsReady = true;\n }\n if (!!((_a = this.privConversationTranslator) === null || _a === void 0 ? void 0 : _a.participantsChanged)) {\n (_b = this.privConversationTranslator) === null || _b === void 0 ? void 0 : _b.participantsChanged(this.privConversationTranslator, new ConversationParticipantsChangedEventArgs(ParticipantChangedReason.JoinedConversation, this.toParticipants(true), e.sessionId));\n }\n // if this is the host, update the nickname if needed\n if (this.me.isHost) {\n const nickname = (_c = this.privConversationTranslator) === null || _c === void 0 ? void 0 : _c.properties.getProperty(PropertyId.ConversationTranslator_Name);\n if (nickname !== undefined && nickname.length > 0 && nickname !== this.me.displayName) {\n // issue a change nickname request\n this.changeNicknameAsync(nickname);\n }\n }\n }\n catch (e) {\n //\n }\n };\n this.onConversationExpiration = (r, e) => {\n var _a, _b;\n try {\n if (!!((_a = this.privConversationTranslator) === null || _a === void 0 ? void 0 : _a.conversationExpiration)) {\n (_b = this.privConversationTranslator) === null || _b === void 0 ? void 0 : _b.conversationExpiration(this.privConversationTranslator, e);\n }\n }\n catch (e) {\n //\n }\n };\n this.privProperties = new PropertyCollection();\n this.privManager = new ConversationManager();\n // check the speech language\n const language = speechConfig.getProperty(PropertyId[PropertyId.SpeechServiceConnection_RecoLanguage]);\n if (!language) {\n speechConfig.setProperty(PropertyId[PropertyId.SpeechServiceConnection_RecoLanguage], ConversationConnectionConfig.defaultLanguageCode);\n }\n this.privLanguage = speechConfig.getProperty(PropertyId[PropertyId.SpeechServiceConnection_RecoLanguage]);\n if (!id) {\n // check the target language(s)\n if (speechConfig.targetLanguages.length === 0) {\n speechConfig.addTargetLanguage(this.privLanguage);\n }\n // check the profanity setting: speech and conversationTranslator should be in sync\n const profanity = speechConfig.getProperty(PropertyId[PropertyId.SpeechServiceResponse_ProfanityOption]);\n if (!profanity) {\n speechConfig.setProfanity(ProfanityOption.Masked);\n }\n // check the nickname: it should pass this regex: ^\\w+([\\s-][\\w\\(\\)]+)*$\"\n // TODO: specify the regex required. Nicknames must be unique or get the duplicate nickname error\n // TODO: check what the max length is and if a truncation is required or if the service handles it without an error\n let hostNickname = speechConfig.getProperty(PropertyId[PropertyId.ConversationTranslator_Name]);\n if (hostNickname === undefined || hostNickname === null || hostNickname.length <= 1 || hostNickname.length > 50) {\n hostNickname = \"Host\";\n }\n speechConfig.setProperty(PropertyId[PropertyId.ConversationTranslator_Name], hostNickname);\n }\n else {\n this.privConversationId = id;\n }\n // save the speech config for future usage\n this.privConfig = speechConfig;\n // save the config properties\n const configImpl = speechConfig;\n Contracts.throwIfNull(configImpl, \"speechConfig\");\n this.privProperties = configImpl.properties.clone();\n this.privIsConnected = false;\n this.privParticipants = new InternalParticipants();\n this.privIsReady = false;\n this.privTextMessageMaxLength = 1000;\n }\n set conversationTranslator(value) {\n this.privConversationTranslator = value;\n }\n // get the internal data about a conversation\n get room() {\n return this.privRoom;\n }\n // get the wrapper for connecting to the websockets\n get connection() {\n return this.privConversationRecognizer; // this.privConnection;\n }\n // get / set the speech auth token\n get authorizationToken() {\n return this.privToken;\n }\n set authorizationToken(value) {\n Contracts.throwIfNullOrWhitespace(value, \"authorizationToken\");\n this.privToken = value;\n }\n // get the config\n get config() {\n return this.privConfig;\n }\n // get the conversation Id\n get conversationId() {\n return this.privRoom ? this.privRoom.roomId : this.privConversationId;\n }\n // get the properties\n get properties() {\n return this.privProperties;\n }\n // get the speech language\n get speechRecognitionLanguage() {\n return this.privLanguage;\n }\n get isMutedByHost() {\n var _a, _b;\n return ((_a = this.privParticipants.me) === null || _a === void 0 ? void 0 : _a.isHost) ? false : (_b = this.privParticipants.me) === null || _b === void 0 ? void 0 : _b.isMuted;\n }\n get isConnected() {\n return this.privIsConnected && this.privIsReady;\n }\n get participants() {\n return this.toParticipants(true);\n }\n get me() {\n return this.toParticipant(this.privParticipants.me);\n }\n get host() {\n return this.toParticipant(this.privParticipants.host);\n }\n /**\n * Create a new conversation as Host\n * @param cb\n * @param err\n */\n createConversationAsync(cb, err) {\n try {\n if (!!this.privConversationRecognizer) {\n this.handleError(new Error(this.privErrors.permissionDeniedStart), err);\n }\n this.privManager.createOrJoin(this.privProperties, undefined, ((room) => {\n if (!room) {\n this.handleError(new Error(this.privErrors.permissionDeniedConnect), err);\n }\n this.privRoom = room;\n this.handleCallback(cb, err);\n }), ((error) => {\n this.handleError(error, err);\n }));\n }\n catch (error) {\n this.handleError(error, err);\n }\n }\n /**\n * Starts a new conversation as host.\n * @param cb\n * @param err\n */\n startConversationAsync(cb, err) {\n try {\n // check if there is already a recognizer\n if (!!this.privConversationRecognizer) {\n this.handleError(new Error(this.privErrors.permissionDeniedStart), err);\n }\n // check if there is conversation data available\n Contracts.throwIfNullOrUndefined(this.privRoom, this.privErrors.permissionDeniedConnect);\n // connect to the conversation websocket\n this.privParticipants.meId = this.privRoom.participantId;\n this.privConversationRecognizer = ConversationRecognizerFactory.fromConfig(this.privConfig);\n // Because ConversationTranslator manually sets up and manages the connection, Conversation\n // has to forward serviceRecognizer connection events that usually get passed automatically\n this.privConversationRecognizer.connected = this.onConnected;\n this.privConversationRecognizer.disconnected = this.onDisconnected;\n this.privConversationRecognizer.canceled = this.onCanceled;\n this.privConversationRecognizer.participantUpdateCommandReceived = this.onParticipantUpdateCommandReceived;\n this.privConversationRecognizer.lockRoomCommandReceived = this.onLockRoomCommandReceived;\n this.privConversationRecognizer.muteAllCommandReceived = this.onMuteAllCommandReceived;\n this.privConversationRecognizer.participantJoinCommandReceived = this.onParticipantJoinCommandReceived;\n this.privConversationRecognizer.participantLeaveCommandReceived = this.onParticipantLeaveCommandReceived;\n this.privConversationRecognizer.translationReceived = this.onTranslationReceived;\n this.privConversationRecognizer.participantsListReceived = this.onParticipantsListReceived;\n this.privConversationRecognizer.conversationExpiration = this.onConversationExpiration;\n this.privConversationRecognizer.connect(this.privRoom.token, (() => {\n this.handleCallback(cb, err);\n }), ((error) => {\n this.handleError(error, err);\n }));\n }\n catch (error) {\n this.handleError(error, err);\n }\n }\n /**\n * Join a conversation as a participant.\n * @param { IParticipant } participant - participant to add\n * @param cb\n * @param err\n */\n addParticipantAsync(participant, cb, err) {\n Contracts.throwIfNullOrUndefined(participant, \"Participant\");\n marshalPromiseToCallbacks(this.addParticipantImplAsync(participant), cb, err);\n }\n /**\n * Join a conversation as a participant.\n * @param conversation\n * @param nickname\n * @param lang\n * @param cb\n * @param err\n */\n joinConversationAsync(conversationId, nickname, lang, cb, err) {\n try {\n // TODO\n // if (!!this.privConversationRecognizer) {\n // throw new Error(this.privErrors.permissionDeniedStart);\n // }\n Contracts.throwIfNullOrWhitespace(conversationId, this.privErrors.invalidArgs.replace(\"{arg}\", \"conversationId\"));\n Contracts.throwIfNullOrWhitespace(nickname, this.privErrors.invalidArgs.replace(\"{arg}\", \"nickname\"));\n Contracts.throwIfNullOrWhitespace(lang, this.privErrors.invalidArgs.replace(\"{arg}\", \"language\"));\n // join the conversation\n this.privManager.createOrJoin(this.privProperties, conversationId, ((room) => {\n Contracts.throwIfNullOrUndefined(room, this.privErrors.permissionDeniedConnect);\n this.privRoom = room;\n this.privConfig.authorizationToken = room.cognitiveSpeechAuthToken;\n // join callback\n if (!!cb) {\n cb(room.cognitiveSpeechAuthToken);\n }\n }), ((error) => {\n this.handleError(error, err);\n }));\n }\n catch (error) {\n this.handleError(error, err);\n }\n }\n /**\n * Deletes a conversation\n * @param cb\n * @param err\n */\n deleteConversationAsync(cb, err) {\n marshalPromiseToCallbacks(this.deleteConversationImplAsync(), cb, err);\n }\n deleteConversationImplAsync() {\n return __awaiter(this, void 0, void 0, function* () {\n Contracts.throwIfNullOrUndefined(this.privProperties, this.privErrors.permissionDeniedConnect);\n Contracts.throwIfNullOrWhitespace(this.privRoom.token, this.privErrors.permissionDeniedConnect);\n yield this.privManager.leave(this.privProperties, this.privRoom.token);\n this.dispose();\n });\n }\n /**\n * Issues a request to close the client websockets\n * @param cb\n * @param err\n */\n endConversationAsync(cb, err) {\n marshalPromiseToCallbacks(this.endConversationImplAsync(), cb, err);\n }\n endConversationImplAsync() {\n return this.close(true);\n }\n /**\n * Issues a request to lock the conversation\n * @param cb\n * @param err\n */\n lockConversationAsync(cb, err) {\n var _a;\n try {\n Contracts.throwIfDisposed(this.privIsDisposed);\n Contracts.throwIfDisposed(this.privConversationRecognizer.isDisposed());\n Contracts.throwIfNullOrUndefined(this.privRoom, this.privErrors.permissionDeniedSend);\n if (!this.canSendAsHost) {\n this.handleError(new Error(this.privErrors.permissionDeniedConversation.replace(\"{command}\", \"lock\")), err);\n }\n (_a = this.privConversationRecognizer) === null || _a === void 0 ? void 0 : _a.sendRequest(this.getLockCommand(true), (() => {\n this.handleCallback(cb, err);\n }), ((error) => {\n this.handleError(error, err);\n }));\n }\n catch (error) {\n this.handleError(error, err);\n }\n }\n /**\n * Issues a request to mute the conversation\n * @param cb\n * @param err\n */\n muteAllParticipantsAsync(cb, err) {\n var _a;\n try {\n Contracts.throwIfDisposed(this.privIsDisposed);\n Contracts.throwIfDisposed(this.privConversationRecognizer.isDisposed());\n Contracts.throwIfNullOrUndefined(this.privConversationRecognizer, this.privErrors.permissionDeniedSend);\n Contracts.throwIfNullOrUndefined(this.privRoom, this.privErrors.permissionDeniedSend);\n // check the user's permissions\n if (!this.canSendAsHost) {\n this.handleError(new Error(this.privErrors.permissionDeniedConversation.replace(\"{command}\", \"mute\")), err);\n }\n (_a = this.privConversationRecognizer) === null || _a === void 0 ? void 0 : _a.sendRequest(this.getMuteAllCommand(true), (() => {\n this.handleCallback(cb, err);\n }), ((error) => {\n this.handleError(error, err);\n }));\n }\n catch (error) {\n this.handleError(error, err);\n }\n }\n /**\n * Issues a request to mute a participant in the conversation\n * @param userId\n * @param cb\n * @param err\n */\n muteParticipantAsync(userId, cb, err) {\n var _a;\n try {\n Contracts.throwIfDisposed(this.privIsDisposed);\n Contracts.throwIfDisposed(this.privConversationRecognizer.isDisposed());\n Contracts.throwIfNullOrWhitespace(userId, this.privErrors.invalidArgs.replace(\"{arg}\", \"userId\"));\n Contracts.throwIfNullOrUndefined(this.privRoom, this.privErrors.permissionDeniedSend);\n // check the connection is open (host + participant can perform the mute command)\n if (!this.canSend) {\n this.handleError(new Error(this.privErrors.permissionDeniedSend), err);\n }\n // if not host, check the participant is not muting another participant\n if (!this.me.isHost && this.me.id !== userId) {\n this.handleError(new Error(this.privErrors.permissionDeniedParticipant.replace(\"{command}\", \"mute\")), err);\n }\n // check the user exists\n const exists = this.privParticipants.getParticipantIndex(userId);\n if (exists === -1) {\n this.handleError(new Error(this.privErrors.invalidParticipantRequest), err);\n }\n (_a = this.privConversationRecognizer) === null || _a === void 0 ? void 0 : _a.sendRequest(this.getMuteCommand(userId, true), (() => {\n this.handleCallback(cb, err);\n }), ((error) => {\n this.handleError(error, err);\n }));\n }\n catch (error) {\n this.handleError(error, err);\n }\n }\n /**\n * Issues a request to remove a participant from the conversation\n * @param userId\n * @param cb\n * @param err\n */\n removeParticipantAsync(userId, cb, err) {\n var _a;\n try {\n Contracts.throwIfDisposed(this.privIsDisposed);\n if (!!this.privTranscriberRecognizer && userId.hasOwnProperty(\"id\")) {\n // Assume this is a transcription participant\n marshalPromiseToCallbacks(this.removeParticipantImplAsync(userId), cb, err);\n }\n else {\n Contracts.throwIfDisposed(this.privConversationRecognizer.isDisposed());\n Contracts.throwIfNullOrUndefined(this.privRoom, this.privErrors.permissionDeniedSend);\n if (!this.canSendAsHost) {\n this.handleError(new Error(this.privErrors.permissionDeniedParticipant.replace(\"{command}\", \"remove\")), err);\n }\n let participantId = \"\";\n if (typeof userId === \"string\") {\n participantId = userId;\n }\n else if (userId.hasOwnProperty(\"id\")) {\n const participant = userId;\n participantId = participant.id;\n }\n else if (userId.hasOwnProperty(\"userId\")) {\n const user = userId;\n participantId = user.userId;\n }\n Contracts.throwIfNullOrWhitespace(participantId, this.privErrors.invalidArgs.replace(\"{arg}\", \"userId\"));\n // check the participant exists\n const index = this.participants.findIndex((p) => p.id === participantId);\n if (index === -1) {\n this.handleError(new Error(this.privErrors.invalidParticipantRequest), err);\n }\n (_a = this.privConversationRecognizer) === null || _a === void 0 ? void 0 : _a.sendRequest(this.getEjectCommand(participantId), (() => {\n this.handleCallback(cb, err);\n }), ((error) => {\n this.handleError(error, err);\n }));\n }\n }\n catch (error) {\n this.handleError(error, err);\n }\n }\n /**\n * Issues a request to unlock the conversation\n * @param cb\n * @param err\n */\n unlockConversationAsync(cb, err) {\n var _a;\n try {\n Contracts.throwIfDisposed(this.privIsDisposed);\n Contracts.throwIfDisposed(this.privConversationRecognizer.isDisposed());\n Contracts.throwIfNullOrUndefined(this.privRoom, this.privErrors.permissionDeniedSend);\n if (!this.canSendAsHost) {\n this.handleError(new Error(this.privErrors.permissionDeniedConversation.replace(\"{command}\", \"unlock\")), err);\n }\n (_a = this.privConversationRecognizer) === null || _a === void 0 ? void 0 : _a.sendRequest(this.getLockCommand(false), (() => {\n this.handleCallback(cb, err);\n }), ((error) => {\n this.handleError(error, err);\n }));\n }\n catch (error) {\n this.handleError(error, err);\n }\n }\n /**\n * Issues a request to unmute all participants in the conversation\n * @param cb\n * @param err\n */\n unmuteAllParticipantsAsync(cb, err) {\n var _a;\n try {\n Contracts.throwIfDisposed(this.privIsDisposed);\n Contracts.throwIfDisposed(this.privConversationRecognizer.isDisposed());\n Contracts.throwIfNullOrUndefined(this.privRoom, this.privErrors.permissionDeniedSend);\n if (!this.canSendAsHost) {\n this.handleError(new Error(this.privErrors.permissionDeniedConversation.replace(\"{command}\", \"unmute all\")), err);\n }\n (_a = this.privConversationRecognizer) === null || _a === void 0 ? void 0 : _a.sendRequest(this.getMuteAllCommand(false), (() => {\n this.handleCallback(cb, err);\n }), ((error) => {\n this.handleError(error, err);\n }));\n }\n catch (error) {\n this.handleError(error, err);\n }\n }\n /**\n * Issues a request to unmute a participant in the conversation\n * @param userId\n * @param cb\n * @param err\n */\n unmuteParticipantAsync(userId, cb, err) {\n var _a;\n try {\n Contracts.throwIfDisposed(this.privIsDisposed);\n Contracts.throwIfDisposed(this.privConversationRecognizer.isDisposed());\n Contracts.throwIfNullOrWhitespace(userId, this.privErrors.invalidArgs.replace(\"{arg}\", \"userId\"));\n Contracts.throwIfNullOrUndefined(this.privRoom, this.privErrors.permissionDeniedSend);\n // check the connection is open (host + participant can perform the mute command)\n if (!this.canSend) {\n this.handleError(new Error(this.privErrors.permissionDeniedSend), err);\n }\n // if not host, check the participant is not muting another participant\n if (!this.me.isHost && this.me.id !== userId) {\n this.handleError(new Error(this.privErrors.permissionDeniedParticipant.replace(\"{command}\", \"mute\")), err);\n }\n // check the user exists\n const exists = this.privParticipants.getParticipantIndex(userId);\n if (exists === -1) {\n this.handleError(new Error(this.privErrors.invalidParticipantRequest), err);\n }\n (_a = this.privConversationRecognizer) === null || _a === void 0 ? void 0 : _a.sendRequest(this.getMuteCommand(userId, false), (() => {\n this.handleCallback(cb, err);\n }), ((error) => {\n this.handleError(error, err);\n }));\n }\n catch (error) {\n this.handleError(error, err);\n }\n }\n /**\n * Send a text message\n * @param message\n * @param cb\n * @param err\n */\n sendTextMessageAsync(message, cb, err) {\n var _a;\n try {\n Contracts.throwIfDisposed(this.privIsDisposed);\n Contracts.throwIfDisposed(this.privConversationRecognizer.isDisposed());\n Contracts.throwIfNullOrWhitespace(message, this.privErrors.invalidArgs.replace(\"{arg}\", \"message\"));\n Contracts.throwIfNullOrUndefined(this.privRoom, this.privErrors.permissionDeniedSend);\n if (!this.canSend) {\n this.handleError(new Error(this.privErrors.permissionDeniedSend), err);\n }\n // TODO: is a max length check required?\n if (message.length > this.privTextMessageMaxLength) {\n this.handleError(new Error(this.privErrors.invalidArgs.replace(\"{arg}\", \"message length\")), err);\n }\n (_a = this.privConversationRecognizer) === null || _a === void 0 ? void 0 : _a.sendRequest(this.getMessageCommand(message), (() => {\n this.handleCallback(cb, err);\n }), ((error) => {\n this.handleError(error, err);\n }));\n }\n catch (error) {\n this.handleError(error, err);\n }\n }\n /**\n * Change nickname\n * @param message\n * @param cb\n * @param err\n */\n changeNicknameAsync(nickname, cb, err) {\n var _a;\n try {\n Contracts.throwIfDisposed(this.privIsDisposed);\n Contracts.throwIfDisposed(this.privConversationRecognizer.isDisposed());\n Contracts.throwIfNullOrWhitespace(nickname, this.privErrors.invalidArgs.replace(\"{arg}\", \"nickname\"));\n Contracts.throwIfNullOrUndefined(this.privRoom, this.privErrors.permissionDeniedSend);\n if (!this.canSend) {\n this.handleError(new Error(this.privErrors.permissionDeniedSend), err);\n }\n (_a = this.privConversationRecognizer) === null || _a === void 0 ? void 0 : _a.sendRequest(this.getChangeNicknameCommand(nickname), (() => {\n this.handleCallback(cb, err);\n }), ((error) => {\n this.handleError(error, err);\n }));\n }\n catch (error) {\n this.handleError(error, err);\n }\n }\n isDisposed() {\n return this.privIsDisposed;\n }\n dispose(reason) {\n var _a;\n if (this.isDisposed) {\n return;\n }\n this.privIsDisposed = true;\n (_a = this.config) === null || _a === void 0 ? void 0 : _a.close();\n this.privConfig = undefined;\n this.privLanguage = undefined;\n this.privProperties = undefined;\n this.privRoom = undefined;\n this.privToken = undefined;\n this.privManager = undefined;\n this.privConversationRecognizer = undefined;\n this.privIsConnected = false;\n this.privIsReady = false;\n this.privParticipants = undefined;\n }\n get transcriberRecognizer() {\n return this.privTranscriberRecognizer;\n }\n connectTranscriberRecognizer(recognizer) {\n return __awaiter(this, void 0, void 0, function* () {\n if (!!this.privTranscriberRecognizer) {\n yield this.privTranscriberRecognizer.close();\n }\n this.privTranscriberRecognizer = recognizer;\n this.privTranscriberRecognizer.conversation = this;\n });\n }\n get conversationInfo() {\n const convId = this.conversationId;\n const p = this.participants.map((part) => {\n return {\n id: part.id,\n preferredLanguage: part.preferredLanguage,\n voice: part.voice\n };\n });\n const props = {};\n for (const key of ConversationConnectionConfig.transcriptionEventKeys) {\n const val = this.properties.getProperty(key, \"\");\n if (val !== \"\") {\n props[key] = val;\n }\n }\n const info = { id: convId, participants: p, conversationProperties: props };\n return info;\n }\n addParticipantImplAsync(participant) {\n const newParticipant = this.privParticipants.addOrUpdateParticipant(participant);\n if (newParticipant !== undefined) {\n if (!!this.privTranscriberRecognizer) {\n const conversationInfo = this.conversationInfo;\n conversationInfo.participants = [participant];\n return this.privTranscriberRecognizer.pushConversationEvent(conversationInfo, \"join\");\n }\n }\n }\n removeParticipantImplAsync(participant) {\n this.privParticipants.deleteParticipant(participant.id);\n const conversationInfo = this.conversationInfo;\n conversationInfo.participants = [participant];\n return this.privTranscriberRecognizer.pushConversationEvent(conversationInfo, \"leave\");\n }\n close(dispose) {\n var _a, _b;\n return __awaiter(this, void 0, void 0, function* () {\n try {\n this.privIsConnected = false;\n yield this.privConversationRecognizer.close();\n yield ((_a = this.privTranscriberRecognizer) === null || _a === void 0 ? void 0 : _a.close());\n this.privConversationRecognizer = undefined;\n (_b = this.privConversationTranslator) === null || _b === void 0 ? void 0 : _b.dispose();\n }\n catch (e) {\n // ignore error\n }\n if (dispose) {\n this.dispose();\n }\n });\n }\n /** Helpers */\n get canSend() {\n var _a;\n return this.privIsConnected && !((_a = this.privParticipants.me) === null || _a === void 0 ? void 0 : _a.isMuted);\n }\n get canSendAsHost() {\n var _a;\n return this.privIsConnected && ((_a = this.privParticipants.me) === null || _a === void 0 ? void 0 : _a.isHost);\n }\n handleCallback(cb, err) {\n if (!!cb) {\n try {\n cb();\n }\n catch (e) {\n if (!!err) {\n err(e);\n }\n }\n cb = undefined;\n }\n }\n handleError(error, err) {\n if (!!err) {\n if (error instanceof Error) {\n const typedError = error;\n err(typedError.name + \": \" + typedError.message);\n }\n else {\n err(error);\n }\n }\n }\n /** Participant Helpers */\n toParticipants(includeHost) {\n const participants = this.privParticipants.participants.map((p) => {\n return this.toParticipant(p);\n });\n if (!includeHost) {\n return participants.filter((p) => p.isHost === false);\n }\n else {\n return participants;\n }\n }\n toParticipant(p) {\n return new Participant(p.id, p.avatar, p.displayName, p.isHost, p.isMuted, p.isUsingTts, p.preferredLanguage, p.voice);\n }\n getMuteAllCommand(isMuted) {\n Contracts.throwIfNullOrWhitespace(this.privRoom.roomId, \"conversationId\");\n Contracts.throwIfNullOrWhitespace(this.privRoom.participantId, \"participantId\");\n return JSON.stringify({\n command: ConversationTranslatorCommandTypes.setMuteAll,\n // tslint:disable-next-line: object-literal-shorthand\n participantId: this.privRoom.participantId,\n roomid: this.privRoom.roomId,\n type: ConversationTranslatorMessageTypes.participantCommand,\n value: isMuted\n });\n }\n getMuteCommand(participantId, isMuted) {\n Contracts.throwIfNullOrWhitespace(this.privRoom.roomId, \"conversationId\");\n Contracts.throwIfNullOrWhitespace(participantId, \"participantId\");\n return JSON.stringify({\n command: ConversationTranslatorCommandTypes.setMute,\n // tslint:disable-next-line: object-literal-shorthand\n participantId: participantId,\n roomid: this.privRoom.roomId,\n type: ConversationTranslatorMessageTypes.participantCommand,\n value: isMuted\n });\n }\n getLockCommand(isLocked) {\n Contracts.throwIfNullOrWhitespace(this.privRoom.roomId, \"conversationId\");\n Contracts.throwIfNullOrWhitespace(this.privRoom.participantId, \"participantId\");\n return JSON.stringify({\n command: ConversationTranslatorCommandTypes.setLockState,\n // tslint:disable-next-line: object-literal-shorthand\n participantId: this.privRoom.participantId,\n roomid: this.privRoom.roomId,\n type: ConversationTranslatorMessageTypes.participantCommand,\n value: isLocked\n });\n }\n getEjectCommand(participantId) {\n Contracts.throwIfNullOrWhitespace(this.privRoom.roomId, \"conversationId\");\n Contracts.throwIfNullOrWhitespace(participantId, \"participantId\");\n return JSON.stringify({\n command: ConversationTranslatorCommandTypes.ejectParticipant,\n // tslint:disable-next-line: object-literal-shorthand\n participantId: participantId,\n roomid: this.privRoom.roomId,\n type: ConversationTranslatorMessageTypes.participantCommand,\n });\n }\n getChangeNicknameCommand(nickname) {\n Contracts.throwIfNullOrWhitespace(this.privRoom.roomId, \"conversationId\");\n Contracts.throwIfNullOrWhitespace(nickname, \"nickname\");\n Contracts.throwIfNullOrWhitespace(this.privRoom.participantId, \"participantId\");\n return JSON.stringify({\n command: ConversationTranslatorCommandTypes.changeNickname,\n nickname,\n // tslint:disable-next-line: object-literal-shorthand\n participantId: this.privRoom.participantId,\n roomid: this.privRoom.roomId,\n type: ConversationTranslatorMessageTypes.participantCommand,\n value: nickname\n });\n }\n getMessageCommand(message) {\n Contracts.throwIfNullOrWhitespace(this.privRoom.roomId, \"conversationId\");\n Contracts.throwIfNullOrWhitespace(this.privRoom.participantId, \"participantId\");\n Contracts.throwIfNullOrWhitespace(message, \"message\");\n return JSON.stringify({\n // tslint:disable-next-line: object-literal-shorthand\n participantId: this.privRoom.participantId,\n roomId: this.privRoom.roomId,\n text: message,\n type: ConversationTranslatorMessageTypes.instantMessage\n });\n }\n}\n\n//# sourceMappingURL=Conversation.js.map\n","// Copyright (c) Microsoft Corporation. All rights reserved.\n// Licensed under the MIT license.\n/**\n * Defines contents of speech synthesis events.\n * @class SpeechSynthesisEventArgs\n * Added in version 1.11.0\n */\nexport class SpeechSynthesisEventArgs {\n /**\n * Creates and initializes an instance of this class.\n * @constructor\n * @param {SpeechSynthesisResult} result - The speech synthesis result.\n */\n constructor(result) {\n this.privResult = result;\n }\n /**\n * Specifies the synthesis result.\n * @member SpeechSynthesisEventArgs.prototype.result\n * @function\n * @public\n * @returns {SpeechSynthesisResult} the synthesis result.\n */\n get result() {\n return this.privResult;\n }\n}\n\n//# sourceMappingURL=SpeechSynthesisEventArgs.js.map\n","// Copyright (c) Microsoft Corporation. All rights reserved.\n// Licensed under the MIT license.\nimport { SpeechRecognitionResult } from \"./Exports\";\n/**\n * Translation text result.\n * @class TranslationRecognitionResult\n */\nexport class TranslationRecognitionResult extends SpeechRecognitionResult {\n /**\n * Creates and initializes an instance of this class.\n * @constructor\n * @param {Translations} translations - The translations.\n * @param {string} resultId - The result id.\n * @param {ResultReason} reason - The reason.\n * @param {string} text - The recognized text.\n * @param {number} duration - The duration.\n * @param {number} offset - The offset into the stream.\n * @param {string} errorDetails - Error details, if provided.\n * @param {string} json - Additional Json, if provided.\n * @param {PropertyCollection} properties - Additional properties, if provided.\n */\n constructor(translations, resultId, reason, text, duration, offset, errorDetails, json, properties) {\n super(resultId, reason, text, duration, offset, undefined, undefined, undefined, errorDetails, json, properties);\n this.privTranslations = translations;\n }\n /**\n * Presents the translation results. Each item in the dictionary represents\n * a translation result in one of target languages, where the key is the name\n * of the target language, in BCP-47 format, and the value is the translation\n * text in the specified language.\n * @member TranslationRecognitionResult.prototype.translations\n * @function\n * @public\n * @returns {Translations} the current translation map that holds all translations requested.\n */\n get translations() {\n return this.privTranslations;\n }\n}\n\n//# sourceMappingURL=TranslationRecognitionResult.js.map\n"],"sourceRoot":""}