Class VoiceProfileClient

  • All Implemented Interfaces:
    AutoCloseable

    public final class VoiceProfileClient
    extends Object
    implements 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 Detail

      • VoiceProfileClient

        public VoiceProfileClient​(SpeechConfig speechConfig)
        Creates a new instance of a voice profile client.
        Parameters:
        speechConfig - speech configuration.
    • Method Detail

      • 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.
      • createProfileAsync

        public Future<VoiceProfile> 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.
      • enrollProfileAsync

        public Future<VoiceProfileEnrollmentResult> 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<VoiceProfilePhraseResult> 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.
      • deleteProfileAsync

        public Future<VoiceProfileResult> 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.
      • resetProfileAsync

        public Future<VoiceProfileResult> 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<VoiceProfileEnrollmentResult> 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.
      • getAllProfilesAsync

        public Future<List<VoiceProfile>> 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.
      • close

        public void close()
        Dispose of associated resources. Note: close() must be called in order to release underlying resources held by the object.
        Specified by:
        close in interface AutoCloseable
      • getImpl

        public SafeHandle getImpl()
        Internal method to get the underlying native handle.
        Returns:
        the native handle to the underlying object.