1 |
- {"ast":null,"code":"\"use strict\";\n\n// Copyright (c) Microsoft Corporation. All rights reserved.\n// Licensed under the MIT license.\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.SpeakerVerificationModel = void 0;\nconst Contracts_js_1 = require(\"./Contracts.js\");\nconst Exports_js_1 = require(\"./Exports.js\");\n/**\n * Defines SpeakerVerificationModel class for Speaker Recognition\n * Model contains a profile against which to verify a speaker\n * @class SpeakerVerificationModel\n */\nclass SpeakerVerificationModel {\n constructor(profile) {\n Contracts_js_1.Contracts.throwIfNullOrUndefined(profile, \"VoiceProfile\");\n if (profile.profileType === Exports_js_1.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 get profileIds() {\n return [this.voiceProfile.profileId];\n }\n get scenario() {\n if (this.voiceProfile.profileType === Exports_js_1.VoiceProfileType.TextDependentVerification) {\n return \"TextDependentVerification\";\n } else {\n return \"TextIndependentVerification\";\n }\n }\n}\nexports.SpeakerVerificationModel = SpeakerVerificationModel;","map":{"version":3,"names":["Object","defineProperty","exports","value","SpeakerVerificationModel","Contracts_js_1","require","Exports_js_1","constructor","profile","Contracts","throwIfNullOrUndefined","profileType","VoiceProfileType","TextIndependentIdentification","Error","privVoiceProfile","fromProfile","voiceProfile","profileIds","profileId","scenario","TextDependentVerification"],"sources":["F:/workspace/202226701027/huinongbao-app/node_modules/microsoft-cognitiveservices-speech-sdk/distrib/lib/src/sdk/SpeakerVerificationModel.js"],"sourcesContent":["\"use strict\";\n// Copyright (c) Microsoft Corporation. All rights reserved.\n// Licensed under the MIT license.\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.SpeakerVerificationModel = void 0;\nconst Contracts_js_1 = require(\"./Contracts.js\");\nconst Exports_js_1 = require(\"./Exports.js\");\n/**\n * Defines SpeakerVerificationModel class for Speaker Recognition\n * Model contains a profile against which to verify a speaker\n * @class SpeakerVerificationModel\n */\nclass SpeakerVerificationModel {\n constructor(profile) {\n Contracts_js_1.Contracts.throwIfNullOrUndefined(profile, \"VoiceProfile\");\n if (profile.profileType === Exports_js_1.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 get profileIds() {\n return [this.voiceProfile.profileId];\n }\n get scenario() {\n if (this.voiceProfile.profileType === Exports_js_1.VoiceProfileType.TextDependentVerification) {\n return \"TextDependentVerification\";\n }\n else {\n return \"TextIndependentVerification\";\n }\n }\n}\nexports.SpeakerVerificationModel = SpeakerVerificationModel;\n\n"],"mappings":"AAAA,YAAY;;AACZ;AACA;AACAA,MAAM,CAACC,cAAc,CAACC,OAAO,EAAE,YAAY,EAAE;EAAEC,KAAK,EAAE;AAAK,CAAC,CAAC;AAC7DD,OAAO,CAACE,wBAAwB,GAAG,KAAK,CAAC;AACzC,MAAMC,cAAc,GAAGC,OAAO,CAAC,gBAAgB,CAAC;AAChD,MAAMC,YAAY,GAAGD,OAAO,CAAC,cAAc,CAAC;AAC5C;AACA;AACA;AACA;AACA;AACA,MAAMF,wBAAwB,CAAC;EAC3BI,WAAWA,CAACC,OAAO,EAAE;IACjBJ,cAAc,CAACK,SAAS,CAACC,sBAAsB,CAACF,OAAO,EAAE,cAAc,CAAC;IACxE,IAAIA,OAAO,CAACG,WAAW,KAAKL,YAAY,CAACM,gBAAgB,CAACC,6BAA6B,EAAE;MACrF,MAAM,IAAIC,KAAK,CAAC,kEAAkE,CAAC;IACvF;IACA,IAAI,CAACC,gBAAgB,GAAGP,OAAO;EACnC;EACA,OAAOQ,WAAWA,CAACR,OAAO,EAAE;IACxB,OAAO,IAAIL,wBAAwB,CAACK,OAAO,CAAC;EAChD;EACA,IAAIS,YAAYA,CAAA,EAAG;IACf,OAAO,IAAI,CAACF,gBAAgB;EAChC;EACA,IAAIG,UAAUA,CAAA,EAAG;IACb,OAAO,CAAC,IAAI,CAACD,YAAY,CAACE,SAAS,CAAC;EACxC;EACA,IAAIC,QAAQA,CAAA,EAAG;IACX,IAAI,IAAI,CAACH,YAAY,CAACN,WAAW,KAAKL,YAAY,CAACM,gBAAgB,CAACS,yBAAyB,EAAE;MAC3F,OAAO,2BAA2B;IACtC,CAAC,MACI;MACD,OAAO,6BAA6B;IACxC;EACJ;AACJ;AACApB,OAAO,CAACE,wBAAwB,GAAGA,wBAAwB","ignoreList":[]},"metadata":{},"sourceType":"script","externalDependencies":[]}
|