{"version":3,"sources":["src/sdk/SpeakerVerificationModel.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,uBAAuB,EAAE,MAAM,8BAA8B,CAAC;AACvE,OAAO,EACH,YAAY,EAEf,MAAM,cAAc,CAAC;AAEtB;;;;GAIG;AACH,qBAAa,wBAAyB,YAAW,uBAAuB;IACpE,OAAO,CAAC,gBAAgB,CAAe;IAEvC,OAAO;WAQO,WAAW,CAAC,OAAO,EAAE,YAAY,GAAG,wBAAwB;IAI1E,IAAW,YAAY,IAAI,YAAY,CAEtC;IAED,IAAW,UAAU,IAAI,MAAM,EAAE,CAEhC;IAED,IAAW,QAAQ,IAAI,MAAM,CAM5B;CACJ","file":"SpeakerVerificationModel.d.ts","sourcesContent":["// Copyright (c) Microsoft Corporation. All rights reserved.\n// Licensed under the MIT license.\n\nimport { Contracts } from \"./Contracts.js\";\nimport { SpeakerRecognitionModel } from \"./SpeakerRecognitionModel.js\";\nimport {\n    VoiceProfile,\n    VoiceProfileType,\n} from \"./Exports.js\";\n\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 implements SpeakerRecognitionModel {\n    private privVoiceProfile: VoiceProfile;\n\n    private constructor(profile: VoiceProfile) {\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\n    public static fromProfile(profile: VoiceProfile): SpeakerVerificationModel {\n        return new SpeakerVerificationModel(profile);\n    }\n\n    public get voiceProfile(): VoiceProfile {\n        return this.privVoiceProfile;\n    }\n\n    public get profileIds(): string[] {\n        return [ this.voiceProfile.profileId ];\n    }\n\n    public get scenario(): string {\n        if (this.voiceProfile.profileType === VoiceProfileType.TextDependentVerification) {\n            return \"TextDependentVerification\";\n        } else {\n            return \"TextIndependentVerification\";\n        }\n    }\n}\n"]}