VoiceProfileClient Class

  • java.lang.Object
    • com.microsoft.cognitiveservices.speech.speaker.VoiceProfileClient

Implements

java.lang.AutoCloseable

public final class VoiceProfileClient
implements java.lang.AutoCloseable

A voice profile client performs voice profile management for speaker recognition. Note: close() must be called in order to release underlying resources held by the object.

Constructor Summary

Constructor Description
VoiceProfileClient(SpeechConfig speechConfig)

Creates a new instance of a voice profile client.

Method Summary

Modifier and Type Method and Description
void close()

Dispose of associated resources.

java.util.concurrent.Future<VoiceProfile> createProfileAsync(VoiceProfileType voiceProfileType, String locale)

Creates a voice profile as an asynchronous operation.

java.util.concurrent.Future<VoiceProfileResult> deleteProfileAsync(VoiceProfile voiceProfile)

Delete a voice profile asynchronously.

java.util.concurrent.Future<VoiceProfileEnrollmentResult> enrollProfileAsync(VoiceProfile voiceProfile, AudioConfig audioConfig)

Enroll a voice profile asynchronously.

java.util.concurrent.Future<VoiceProfilePhraseResult> getActivationPhrasesAsync(VoiceProfileType voiceProfileType, String locale)

Get valid activation phrases for enrollment.

java.util.concurrent.Future<java.util.List<VoiceProfile>> getAllProfilesAsync(VoiceProfileType voiceProfileType)

Get all voice profiles as an asynchronous operation.

SafeHandle getImpl()

Internal method to get the underlying native handle.

PropertyCollection getProperties()

The collection of properties and their values defined for VoiceProfileClient.

java.util.concurrent.Future<VoiceProfileResult> resetProfileAsync(VoiceProfile voiceProfile)

Reset a voice profile asynchronously.

java.util.concurrent.Future<VoiceProfileEnrollmentResult> retrieveEnrollmentResultAsync(VoiceProfile voiceProfile)

Retrieve an enrollment result given the Voice Profile.

Methods inherited from java.lang.Object

java.lang.Object.clone java.lang.Object.equals java.lang.Object.finalize java.lang.Object.getClass java.lang.Object.hashCode java.lang.Object.notify java.lang.Object.notifyAll java.lang.Object.toString java.lang.Object.wait java.lang.Object.wait java.lang.Object.wait

Constructor Details

VoiceProfileClient

public VoiceProfileClient(SpeechConfig speechConfig)

Creates a new instance of a voice profile client.

Parameters:

speechConfig - speech configuration.

Method Details

close

public void close()

Dispose of associated resources. Note: close() must be called in order to release underlying resources held by the object.

createProfileAsync

public Future createProfileAsync(VoiceProfileType voiceProfileType, String locale)

Creates a voice profile as an asynchronous operation.

Parameters:

voiceProfileType - A voice profile type.
locale - a locale, e.g "en-us".

Returns:

An asynchronous operation representing the result of creating a voice profile.

deleteProfileAsync

public Future deleteProfileAsync(VoiceProfile voiceProfile)

Delete a voice profile asynchronously.

Parameters:

voiceProfile - A voice profile.

Returns:

An asynchronous operation representing the result of deleting a voice profile.

enrollProfileAsync

public Future enrollProfileAsync(VoiceProfile voiceProfile, AudioConfig audioConfig)

Enroll a voice profile asynchronously.

Parameters:

voiceProfile - A voice profile.
audioConfig - An audio config.

Returns:

An asynchronous operation representing the result of enrollment of a voice profile.

getActivationPhrasesAsync

public Future getActivationPhrasesAsync(VoiceProfileType voiceProfileType, String locale)

Get valid activation phrases for enrollment.

Parameters:

voiceProfileType - A voice profile type.
locale - a locale, e.g "en-us".

Returns:

An asynchronous operation representing the result of getting activation phrases.

getAllProfilesAsync

public Future<>> getAllProfilesAsync(VoiceProfileType voiceProfileType)

Get all voice profiles as an asynchronous operation.

Parameters:

voiceProfileType - A voice profile type.

Returns:

An asynchronous operation representing the result of getting all voice profile.

getImpl

public SafeHandle getImpl()

Internal method to get the underlying native handle.

Returns:

the native handle to the underlying object.

getProperties

public PropertyCollection getProperties()

The collection of properties and their values defined for VoiceProfileClient.

Returns:

The collection of properties and their values defined for VoiceProfileClient.

resetProfileAsync

public Future resetProfileAsync(VoiceProfile voiceProfile)

Reset a voice profile asynchronously.

Parameters:

voiceProfile - A voice profile.

Returns:

An asynchronous operation representing the result of reset a voice profile.

retrieveEnrollmentResultAsync

public Future retrieveEnrollmentResultAsync(VoiceProfile voiceProfile)

Retrieve an enrollment result given the Voice Profile.

Parameters:

voiceProfile - A voice profile.

Returns:

An asynchronous operation representing the result of enrollment of a voice profile.

Applies to