AudioProcessingOptions Class
- java.
lang. Object - com.
microsoft. cognitiveservices. speech. audio. AudioProcessingOptions
- com.
Implements
public class AudioProcessingOptions
implements java.lang.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 Summary
Modifier and Type | Method and Description |
---|---|
void |
close()
Explicitly frees any external resource attached to the object. |
static
Audio |
create(int audioProcessingFlags)
Creates an Audio |
static
Audio |
create(int audioProcessingFlags, MicrophoneArrayGeometry microphoneArrayGeometry)
Creates an Audio |
static
Audio |
create(int audioProcessingFlags, MicrophoneArrayGeometry microphoneArrayGeometry, SpeakerReferenceChannel speakerReferenceChannel)
Creates an Audio |
static
Audio |
create(int audioProcessingFlags, PresetMicrophoneArrayGeometry microphoneArrayGeometry)
Creates an Audio |
static
Audio |
create(int audioProcessingFlags, PresetMicrophoneArrayGeometry microphoneArrayGeometry, SpeakerReferenceChannel speakerReferenceChannel)
Creates an Audio |
int |
getAudioProcessingFlags()
Returns the type of audio processing performed by Speech SDK. |
int |
getBeamformingEndAngle()
Returns the end angle used for beamforming. |
int |
getBeamformingStartAngle()
Returns the start angle used for beamforming. |
Safe |
getImpl()
Returns the audio processing options implementation. |
Microphone |
getMicrophoneArrayType()
Returns the microphone array type of the microphone used for audio input. |
Microphone |
getMicrophoneCoordinates()
Returns the coordinates of microphones in the microphone array used for audio input. |
Preset |
getPresetMicrophoneArrayGeometry()
Returns the microphone array geometry of the microphone used for audio input. |
Speaker |
getSpeakerReferenceChannel()
Returns the speaker reference channel position in the audio input. |
Methods inherited from java.lang.Object
Method Details
close
public void close()
Explicitly frees any external resource attached to the object.
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:
Returns:
create
public static AudioProcessingOptions create(int audioProcessingFlags, MicrophoneArrayGeometry microphoneArrayGeometry)
Creates an AudioProcessingOptions object with audio processing flags and custom microphone array geometry.
Parameters:
Returns:
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:
Returns:
create
public static AudioProcessingOptions create(int audioProcessingFlags, PresetMicrophoneArrayGeometry microphoneArrayGeometry)
Creates an AudioProcessingOptions object with audio processing flags and preset microphone array geometry.
Parameters:
Returns:
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:
Returns:
getAudioProcessingFlags
public int getAudioProcessingFlags()
Returns the type of audio processing performed by Speech SDK.
Returns:
getBeamformingEndAngle
public int getBeamformingEndAngle()
Returns the end angle used for beamforming.
Returns:
getBeamformingStartAngle
public int getBeamformingStartAngle()
Returns the start angle used for beamforming.
Returns:
getImpl
public SafeHandle getImpl()
Returns the audio processing options implementation.
Returns:
getMicrophoneArrayType
public MicrophoneArrayType getMicrophoneArrayType()
Returns the microphone array type of the microphone used for audio input.
Returns:
getMicrophoneCoordinates
public MicrophoneCoordinates[] getMicrophoneCoordinates()
Returns the coordinates of microphones in the microphone array used for audio input.
Returns:
getPresetMicrophoneArrayGeometry
public PresetMicrophoneArrayGeometry getPresetMicrophoneArrayGeometry()
Returns the microphone array geometry of the microphone used for audio input.
Returns:
getSpeakerReferenceChannel
public SpeakerReferenceChannel getSpeakerReferenceChannel()
Returns the speaker reference channel position in the audio input.
Returns: