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, (e: VoiceProfile) => void, (e: string) => void)

Create a speaker recognition voice profile

deleteProfileAsync(VoiceProfile, (response: VoiceProfileResult) => void, (e: string) => void)

Delete a speaker recognition voice profile

enrollProfileAsync(VoiceProfile, AudioConfig)

Create a speaker recognition voice profile

getActivationPhrasesAsync(VoiceProfileType, string, (e: VoiceProfilePhraseResult) => void, (e: string) => void)

Get valid authorization phrases for voice profile enrollment

getAllProfilesAsync(VoiceProfileType, (e: VoiceProfileEnrollmentResult[]) => void, (e: string) => void)

Get all voice profiles on account with given voice profile type

resetProfileAsync(VoiceProfile, (response: VoiceProfileResult) => void, (e: string) => void)

Remove all enrollments for a speaker recognition voice profile

retrieveEnrollmentResultAsync(VoiceProfile, (e: VoiceProfileEnrollmentResult) => void, (e: string) => void)

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, (e: VoiceProfile) => void, (e: string) => void)

Create a speaker recognition voice profile

function createProfileAsync(profileType: VoiceProfileType, lang: string, cb?: (e: VoiceProfile) => void, err?: (e: string) => void)

Parameters

profileType
VoiceProfileType

Type of Voice Profile to be created specifies the keyword to be recognized.

lang

string

Language string (locale) for Voice Profile

cb

(e: VoiceProfile) => void

Callback invoked once Voice Profile has been created.

err

(e: string) => void

Callback invoked in case of an error.

deleteProfileAsync(VoiceProfile, (response: VoiceProfileResult) => void, (e: string) => void)

Delete a speaker recognition voice profile

function deleteProfileAsync(profile: VoiceProfile, cb?: (response: VoiceProfileResult) => void, err?: (e: string) => void)

Parameters

profile
VoiceProfile

Voice Profile to be deleted

cb

(response: VoiceProfileResult) => void

Callback invoked once Voice Profile has been deleted.

err

(e: string) => void

Callback invoked in case of an error.

enrollProfileAsync(VoiceProfile, AudioConfig)

Create a speaker recognition voice profile

function enrollProfileAsync(profile: VoiceProfile, audioConfig: AudioConfig)

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, (e: VoiceProfilePhraseResult) => void, (e: string) => void)

Get valid authorization phrases for voice profile enrollment

function getActivationPhrasesAsync(profileType: VoiceProfileType, lang: string, cb?: (e: VoiceProfilePhraseResult) => void, err?: (e: string) => void)

Parameters

profileType
VoiceProfileType
lang

string

Language string (locale) for Voice Profile

cb

(e: VoiceProfilePhraseResult) => void

Callback invoked once phrases have been returned.

err

(e: string) => void

Callback invoked in case of an error.

getAllProfilesAsync(VoiceProfileType, (e: VoiceProfileEnrollmentResult[]) => void, (e: string) => void)

Get all voice profiles on account with given voice profile type

function getAllProfilesAsync(profileType: VoiceProfileType, cb?: (e: VoiceProfileEnrollmentResult[]) => void, err?: (e: string) => void)

Parameters

profileType
VoiceProfileType

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

cb

(e: VoiceProfileEnrollmentResult[]) => void

Callback invoked once Profile list has been returned.

err

(e: string) => void

Callback invoked in case of an error.

resetProfileAsync(VoiceProfile, (response: VoiceProfileResult) => void, (e: string) => void)

Remove all enrollments for a speaker recognition voice profile

function resetProfileAsync(profile: VoiceProfile, cb?: (response: VoiceProfileResult) => void, err?: (e: string) => void)

Parameters

profile
VoiceProfile

Voice Profile to be reset

cb

(response: VoiceProfileResult) => void

Callback invoked once Voice Profile has been reset.

err

(e: string) => void

Callback invoked in case of an error.

retrieveEnrollmentResultAsync(VoiceProfile, (e: VoiceProfileEnrollmentResult) => void, (e: string) => void)

Get current information of a voice profile

function retrieveEnrollmentResultAsync(profile: VoiceProfile, cb?: (e: VoiceProfileEnrollmentResult) => void, err?: (e: string) => void)

Parameters

profile
VoiceProfile

Voice Profile to retrieve info for

cb

(e: VoiceProfileEnrollmentResult) => void

Callback invoked once Voice Profile has been created.

err

(e: string) => void

Callback invoked in case of an error.