VoiceProfileClient class
Defines VoiceProfileClient class for Speaker Recognition Handles operations from user for Voice Profile operations (e.g. createProfile, deleteProfile)
- Extends
Constructors
Voice |
VoiceProfileClient constructor. |
Properties
authorization |
Gets the authorization token used to communicate with the service. |
internal |
|
properties | The collection of properties and their values defined for this VoiceProfileClient. |
telemetry |
This method returns the current state of the telemetry setting. |
Inherited Properties
session |
Defines event handler for session started events. |
session |
Defines event handler for session stopped events. |
speech |
Defines event handler for speech stopped events. |
speech |
Defines event handler for speech started events. |
Methods
close() | Clean up object and close underlying connection |
create |
Create a speaker recognition voice profile |
delete |
Delete a speaker recognition voice profile |
enroll |
Create a speaker recognition voice profile |
get |
Get valid authorization phrases for voice profile enrollment |
get |
Get all voice profiles on account with given voice profile type |
reset |
Remove all enrollments for a speaker recognition voice profile |
retrieve |
Get current information of a voice profile |
Inherited Methods
enable |
This method globally enables or disables telemetry. |
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.
string authorizationToken
Property Value
string
Authorization token.
internalData
object internalData
Property Value
object
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.
telemetryEnabled
This method returns the current state of the telemetry setting.
static boolean telemetryEnabled
Property Value
boolean
true if the telemetry is enabled, false otherwise.
Inherited Property Details
sessionStarted
Defines event handler for session started events.
public sessionStarted: (sender: Recognizer, event: SessionEventArgs) => void
Property Value
(sender: Recognizer, event: SessionEventArgs) => void
Inherited From Recognizer.sessionStarted
sessionStopped
Defines event handler for session stopped events.
public sessionStopped: (sender: Recognizer, event: SessionEventArgs) => void
Property Value
(sender: Recognizer, event: SessionEventArgs) => void
Inherited From Recognizer.sessionStopped
speechEndDetected
Defines event handler for speech stopped events.
public speechEndDetected: (sender: Recognizer, event: RecognitionEventArgs) => void
Property Value
(sender: Recognizer, event: RecognitionEventArgs) => void
Inherited From Recognizer.speechEndDetected
speechStartDetected
Defines event handler for speech started events.
public speechStartDetected: (sender: Recognizer, event: RecognitionEventArgs) => void
Property Value
(sender: Recognizer, event: RecognitionEventArgs) => void
Inherited From Recognizer.speechStartDetected
Method Details
close()
Clean up object and close underlying connection
function close(): Promise<void>
Returns
Promise<void>
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<VoiceProfileResult>
- 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<VoiceProfileEnrollmentResult>
- 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
Promise<VoiceProfilePhraseResult>
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<VoiceProfileEnrollmentResult[]>
- 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<VoiceProfileResult>
- 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<VoiceProfileEnrollmentResult>
- Promise of a VoiceProfileEnrollmentResult.
Inherited Method Details
enableTelemetry(boolean)
This method globally enables or disables telemetry.
static function enableTelemetry(enabled: boolean)
Parameters
- enabled
-
boolean
Global setting for telemetry collection. If set to true, telemetry information like microphone errors, recognition errors are collected and sent to Microsoft. If set to false, no telemetry is sent to Microsoft.
Inherited From Recognizer.enableTelemetry