VoiceProfileClient class

Defines VoiceProfileClient class for Speaker Recognition Handles operations from user for Voice Profile operations (e.g. createProfile, deleteProfile)

Constructors

VoiceProfileClient(SpeechConfig)

VoiceProfileClient constructor.

Properties

authorizationToken

Gets the authorization token used to communicate with the service. Gets/Sets the authorization token used to communicate with the service.

properties

The collection of properties and their values defined for this VoiceProfileClient.

Methods

close()

Included for compatibility

createProfileAsync(VoiceProfileType, string)

Create a speaker recognition voice profile

deleteProfileAsync(VoiceProfile)

Delete a speaker recognition voice profile

enrollProfileAsync(VoiceProfile, AudioConfig)

Create a speaker recognition voice profile

getActivationPhrasesAsync(VoiceProfileType, string)

Get valid authorization phrases for voice profile enrollment

getAllProfilesAsync(VoiceProfileType)

Get all voice profiles on account with given voice profile type

resetProfileAsync(VoiceProfile)

Remove all enrollments for a speaker recognition voice profile

retrieveEnrollmentResultAsync(VoiceProfile)

Get current information of a voice profile

Constructor Details

VoiceProfileClient(SpeechConfig)

VoiceProfileClient constructor.

new VoiceProfileClient(speechConfig: SpeechConfig)

Parameters

speechConfig
SpeechConfig

An set of initial properties for this synthesizer (authentication key, region, &c)

Property Details

authorizationToken

Gets the authorization token used to communicate with the service. Gets/Sets the authorization token used to communicate with the service.

string authorizationToken

Property Value

string

Authorization token.

properties

The collection of properties and their values defined for this VoiceProfileClient.

PropertyCollection properties

Property Value

The collection of properties and their values defined for this VoiceProfileClient.

Method Details

close()

Included for compatibility

function close()

createProfileAsync(VoiceProfileType, string)

Create a speaker recognition voice profile

function createProfileAsync(profileType: VoiceProfileType, lang: string): Promise<VoiceProfile>

Parameters

profileType
VoiceProfileType

Type of Voice Profile to be created

lang

string

Language string (locale) for Voice Profile

Returns

Promise<VoiceProfile>

  • Promise of a VoiceProfile.

deleteProfileAsync(VoiceProfile)

Delete a speaker recognition voice profile

function deleteProfileAsync(profile: VoiceProfile): Promise<VoiceProfileResult>

Parameters

profile
VoiceProfile

Voice Profile to be deleted

Returns

  • Promise of a VoiceProfileResult.

enrollProfileAsync(VoiceProfile, AudioConfig)

Create a speaker recognition voice profile

function enrollProfileAsync(profile: VoiceProfile, audioConfig: AudioConfig): Promise<VoiceProfileEnrollmentResult>

Parameters

profile
VoiceProfile

Voice Profile to create enrollment for

audioConfig
AudioConfig

source info from which to create enrollment

Returns

  • Promise of a VoiceProfileEnrollmentResult.

getActivationPhrasesAsync(VoiceProfileType, string)

Get valid authorization phrases for voice profile enrollment

function getActivationPhrasesAsync(profileType: VoiceProfileType, lang: string): Promise<VoiceProfilePhraseResult>

Parameters

profileType
VoiceProfileType

Profile Type to get activation phrases for

lang

string

Language string (locale) for Voice Profile

Returns

getAllProfilesAsync(VoiceProfileType)

Get all voice profiles on account with given voice profile type

function getAllProfilesAsync(profileType: VoiceProfileType): Promise<VoiceProfileEnrollmentResult[]>

Parameters

profileType
VoiceProfileType

profile type (identification/verification) for which to list profiles

Returns

  • Promise of an array of VoiceProfileEnrollmentResults.

resetProfileAsync(VoiceProfile)

Remove all enrollments for a speaker recognition voice profile

function resetProfileAsync(profile: VoiceProfile): Promise<VoiceProfileResult>

Parameters

profile
VoiceProfile

Voice Profile to be reset

Returns

  • Promise of a VoiceProfileResult.

retrieveEnrollmentResultAsync(VoiceProfile)

Get current information of a voice profile

function retrieveEnrollmentResultAsync(profile: VoiceProfile): Promise<VoiceProfileEnrollmentResult>

Parameters

profile
VoiceProfile

Voice Profile to retrieve info for

Returns

  • Promise of a VoiceProfileEnrollmentResult.