Class SpeakerRecognizer

  • All Implemented Interfaces:
    AutoCloseable

    public final class SpeakerRecognizer
    extends Object
    implements AutoCloseable
    Performs speaker recognition on the speech input. Note: close() must be called in order to release underlying resources held by the object.
    • Constructor Detail

      • SpeakerRecognizer

        public SpeakerRecognizer​(SpeechConfig speechConfig,
                                 AudioConfig audioConfig)
        Creates a new instance of a speaker recognizer. If no audio config is provided as input parameter, it will be equivalent to calling with a config constructed with AudioConfig::FromDefaultMicrophoneInput.
        Parameters:
        speechConfig - speech configuration.
        audioConfig - audio configuration.
    • Method Detail

      • getProperties

        public PropertyCollection getProperties()
        The collection of properties and their values defined for SpeakerRecognizer.
        Returns:
        The collection of properties and their values defined for SpeakerRecognizer.
      • recognizeOnceAsync

        public Future<SpeakerRecognitionResult> recognizeOnceAsync​(SpeakerVerificationModel model)
        Starts a speaker recognition session to verify the speaker in the verification model.
        Parameters:
        model - The speaker verification model that specifies the speaker to be verified.
        Returns:
        A task representing the speaker recognition operation. The task returns an instance of SpeakerRecognitionResult.
      • recognizeOnceAsync

        public Future<SpeakerRecognitionResult> recognizeOnceAsync​(SpeakerIdentificationModel model)
        Starts a speaker recognition session to identify the speaker in the identification model.
        Parameters:
        model - The speaker identification model that specifies the speaker to be identified.
        Returns:
        A task representing the speaker recognition operation. The task returns an instance of SpeakerRecognitionResult.
      • 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.