Class AudioProcessingOptions

  • All Implemented Interfaces:
    AutoCloseable

    public class AudioProcessingOptions
    extends Object
    implements AutoCloseable
    Represents audio processing options used with audio config class. Note: close() must be called in order to release underlying resources held by the object.
    • Method Detail

      • create

        public static AudioProcessingOptions create​(int audioProcessingFlags)
        Creates an AudioProcessingOptions object with audio processing flags. This method should only be used when the audio input is from a microphone array. On Windows, this method will try to query the microphone array geometry from the audio driver. Audio data is also read from speaker reference channel. On Linux, it assumes that the microphone is a single channel microphone.
        Parameters:
        audioProcessingFlags - Specifies flags to control the audio processing performed by Speech SDK. It is bitwise OR of constants from AudioProcessingConstants class.
        Returns:
        The audio processing options object being created.
      • create

        public static AudioProcessingOptions create​(int audioProcessingFlags,
                                                    PresetMicrophoneArrayGeometry microphoneArrayGeometry)
        Creates an AudioProcessingOptions object with audio processing flags and preset microphone array geometry.
        Parameters:
        audioProcessingFlags - Specifies flags to control the audio processing performed by Speech SDK. It is bitwise OR of constants from AudioProcessingConstants class.
        microphoneArrayGeometry - Specifies the type of microphone array geometry.
        Returns:
        The audio processing options object being created.
      • create

        public static AudioProcessingOptions create​(int audioProcessingFlags,
                                                    PresetMicrophoneArrayGeometry microphoneArrayGeometry,
                                                    SpeakerReferenceChannel speakerReferenceChannel)
        Creates an AudioProcessingOptions object with audio processing flags, preset microphone array geometry and speaker reference channel position.
        Parameters:
        audioProcessingFlags - Specifies flags to control the audio processing performed by Speech SDK. It is bitwise OR of constants from AudioProcessingConstants class.
        microphoneArrayGeometry - Specifies the type of microphone array geometry.
        speakerReferenceChannel - Specifies the speaker reference channel position in the input audio.
        Returns:
        The audio processing options object being created.
      • create

        public static AudioProcessingOptions create​(int audioProcessingFlags,
                                                    MicrophoneArrayGeometry microphoneArrayGeometry)
        Creates an AudioProcessingOptions object with audio processing flags and custom microphone array geometry.
        Parameters:
        audioProcessingFlags - Specifies flags to control the audio processing performed by Speech SDK. It is bitwise OR of constants from AudioProcessingConstants class.
        microphoneArrayGeometry - Specifies the microphone array geometry.
        Returns:
        The audio processing options object being created.
      • create

        public static AudioProcessingOptions create​(int audioProcessingFlags,
                                                    MicrophoneArrayGeometry microphoneArrayGeometry,
                                                    SpeakerReferenceChannel speakerReferenceChannel)
        Creates an AudioProcessingOptions object with audio processing flags, custom microphone array geometry and speaker reference channel position.
        Parameters:
        audioProcessingFlags - Specifies flags to control the audio processing performed by Speech SDK. It is bitwise OR of constants from AudioProcessingConstants class.
        microphoneArrayGeometry - Specifies the microphone array geometry.
        speakerReferenceChannel - Specifies the speaker reference channel position in the input audio.
        Returns:
        The audio processing options object being created.
      • getAudioProcessingFlags

        public int getAudioProcessingFlags()
        Returns the type of audio processing performed by Speech SDK.
        Returns:
        Bitwise OR of flags from AudioProcessingConstants class indicating the audio processing performed by Speech SDK.
      • getPresetMicrophoneArrayGeometry

        public PresetMicrophoneArrayGeometry getPresetMicrophoneArrayGeometry()
        Returns the microphone array geometry of the microphone used for audio input.
        Returns:
        Microphone array geometry of the microphone used for audio input.
      • getMicrophoneArrayType

        public MicrophoneArrayType getMicrophoneArrayType()
        Returns the microphone array type of the microphone used for audio input.
        Returns:
        Type of microphone array used for audio input.
      • getBeamformingStartAngle

        public int getBeamformingStartAngle()
        Returns the start angle used for beamforming.
        Returns:
        Beamforming start angle.
      • getBeamformingEndAngle

        public int getBeamformingEndAngle()
        Returns the end angle used for beamforming.
        Returns:
        Beamforming end angle.
      • getMicrophoneCoordinates

        public MicrophoneCoordinates[] getMicrophoneCoordinates()
        Returns the coordinates of microphones in the microphone array used for audio input.
        Returns:
        An array of MicrophoneCoordinates objects.
      • getSpeakerReferenceChannel

        public SpeakerReferenceChannel getSpeakerReferenceChannel()
        Returns the speaker reference channel position in the audio input.
        Returns:
        Speaker reference channel position in the audio input.
      • close

        public void close()
        Explicitly frees any external resource attached to the object.
        Specified by:
        close in interface AutoCloseable
      • getImpl

        public SafeHandle getImpl()
        Returns the audio processing options implementation.
        Returns:
        The implementation of the audio processing options.