C# Class Microsoft.ProjectOxford.SpeakerRecognition.SpeakerVerificationServiceClient

A service client class to perform all the verification service calls.
Inheritance: ISpeakerVerificationServiceClient
Mostra file Open project: Microsoft/ProjectOxford-ClientSDK Class Usage Examples

Public Methods

Method Description
CreateProfileAsync ( string locale ) : Task

Creates a new speaker profile asynchronously

DeleteProfileAsync ( System.Guid id ) : System.Threading.Tasks.Task

Deletes a given speaker profile asynchronously

EnrollAsync ( Stream audioStream, System.Guid id ) : Task

Enrolls a new stream asynchronously for a given speaker

GetPhrasesAsync ( string locale ) : Task

Gets a list of all available phrases for enrollments

GetProfileAsync ( System.Guid id ) : Task

Retrieves a given speaker profile as specified by the id param

GetProfilesAsync ( ) : Task

Retrieves all available speaker profiles

ResetEnrollmentsAsync ( System.Guid id ) : System.Threading.Tasks.Task

Deletes all enrollments associated with the given speaker verification profile permanently from the service asynchronously

SpeakerVerificationServiceClient ( string SubscriptionKey ) : Microsoft.ProjectOxford.SpeakerRecognition.Contract

Creates a new service client using a subscription key

VerifyAsync ( Stream audioStream, System.Guid id ) : Task

Verifies a given speaker using the speaker ID and audio stream

Method Details

CreateProfileAsync() public method

Creates a new speaker profile asynchronously
Thrown in case of internal server error or an invalid locale Thrown in case the connection timed out
public CreateProfileAsync ( string locale ) : Task
locale string The speaker profile locale
return Task

DeleteProfileAsync() public method

Deletes a given speaker profile asynchronously
Thrown in case of internal server error, an invalid ID or failure to delete the profile Thrown in case the connection timed out
public DeleteProfileAsync ( System.Guid id ) : System.Threading.Tasks.Task
id System.Guid The ID of the speaker profile to be deleted
return System.Threading.Tasks.Task

EnrollAsync() public method

Enrolls a new stream asynchronously for a given speaker
Thrown in case of internal server error, wrong ID or an invalid audio format Thrown in case the connection timed out
public EnrollAsync ( Stream audioStream, System.Guid id ) : Task
audioStream Stream The stream to enroll the speaker profile from
id System.Guid The speaker profile speaker ID
return Task

GetPhrasesAsync() public method

Gets a list of all available phrases for enrollments
Thrown in case of invalid locale or internal server error Thrown in case the connection timed out
public GetPhrasesAsync ( string locale ) : Task
locale string The locale of the pharases
return Task

GetProfileAsync() public method

Retrieves a given speaker profile as specified by the id param
Thrown in case of internal server error or an invalid ID Thrown in case the connection timed out
public GetProfileAsync ( System.Guid id ) : Task
id System.Guid The speaker profile ID
return Task

GetProfilesAsync() public method

Retrieves all available speaker profiles
Thrown in case of internal server error Thrown in case the connection timed out
public GetProfilesAsync ( ) : Task
return Task

ResetEnrollmentsAsync() public method

Deletes all enrollments associated with the given speaker verification profile permanently from the service asynchronously
Thrown in case of invalid ID, failure to reset the profile or an internal server error Thrown in case the connection timed out
public ResetEnrollmentsAsync ( System.Guid id ) : System.Threading.Tasks.Task
id System.Guid The speaker ID
return System.Threading.Tasks.Task

SpeakerVerificationServiceClient() public method

Creates a new service client using a subscription key
public SpeakerVerificationServiceClient ( string SubscriptionKey ) : Microsoft.ProjectOxford.SpeakerRecognition.Contract
SubscriptionKey string The subscription key
return Microsoft.ProjectOxford.SpeakerRecognition.Contract

VerifyAsync() public method

Verifies a given speaker using the speaker ID and audio stream
Thrown in case of invalid ID, invalid audio format or internal server error Thrown in case the connection timed out
public VerifyAsync ( Stream audioStream, System.Guid id ) : Task
audioStream Stream The stream of audio to be verified
id System.Guid The speaker ID
return Task