class Audio::AudioProcessingOptions

Represents audio processing options used with audio config class.

Members

AudioProcessingOptions

Syntax: public inline explicit AudioProcessingOptions ( SPXAUDIOPROCESSINGOPTIONSHANDLE hoptions );

Creates a new instance using the provided handle.

Parameters

  • hoptions A handle to audio processing options.

~AudioProcessingOptions

Syntax: public ~AudioProcessingOptions ( ) = default;

Destructs an instance of the AudioProcessingOptions class.

operator SPXAUDIOPROCESSINGOPTIONSHANDLE

Syntax: public inline explicit operator SPXAUDIOPROCESSINGOPTIONSHANDLE ( ) const;

Internal operator used to get underlying handle value.

Returns

A handle.

GetAudioProcessingFlags

Syntax: public inline int GetAudioProcessingFlags ( ) const;

Returns the type of audio processing performed by Speech SDK.

Returns

Bitwise OR of AUDIO_INPUT_PROCESSING_XXX constant flags indicating the input audio processing performed by Speech SDK.

GetPresetMicrophoneArrayGeometry

Syntax: public inline PresetMicrophoneArrayGeometry GetPresetMicrophoneArrayGeometry ( ) const;

Returns the microphone array geometry of the microphone used for audio input.

Returns

A value of type PresetMicrophoneArrayGeometry enum.

GetMicrophoneArrayType

Syntax: public inline MicrophoneArrayType GetMicrophoneArrayType ( ) const;

Returns the microphone array type of the microphone used for audio input.

Returns

A value of type MicrophoneArrayType enum.

GetBeamformingStartAngle

Syntax: public inline uint16_t GetBeamformingStartAngle ( ) const;

Returns the start angle used for beamforming.

Returns

Beamforming start angle.

GetBeamformingEndAngle

Syntax: public inline uint16_t GetBeamformingEndAngle ( ) const;

Returns the end angle used for beamforming.

Returns

Beamforming end angle.

GetMicrophoneCoordinates

Syntax: public inline std::vector< MicrophoneCoordinates > GetMicrophoneCoordinates ( ) const;

Returns the coordinates of microphones in the microphone array used for audio input.

Returns

A std::vector of MicrophoneCoordinates elements.

GetSpeakerReferenceChannel

Syntax: public inline SpeakerReferenceChannel GetSpeakerReferenceChannel ( ) const;

Returns the speaker reference channel position in the audio input.

Returns

A value of type SpeakerReferenceChannel enum.

SetProperty

Syntax: public inline void SetProperty ( const std::string & name , const std::string & value );

Sets a property value by name.

Parameters

  • name The property name.

  • value The property value.

GetProperty

Syntax: public inline std::string GetProperty ( const std::string & name ) const;

Gets a property value by name.

Parameters

  • name The parameter name.

Returns

The property value.

Create

Syntax: public inline static std::shared_ptr< AudioProcessingOptions > Create ( int audioProcessingFlags );

Creates a new instance of the AudioProcessingOptions class.

Parameters

  • audioProcessingFlags Specifies flags to control the audio processing performed by Speech SDK. It is bitwise OR of AUDIO_INPUT_PROCESSING_XXX constants.

Returns

The newly created AudioProcessingOptions wrapped inside a std::shared_ptr.

This function should only be used when the audio input is from a microphone array. On Windows, this function 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.

Create

Syntax: public inline static std::shared_ptr< AudioProcessingOptions > Create ( int audioProcessingFlags , PresetMicrophoneArrayGeometry microphoneArrayGeometry , SpeakerReferenceChannel speakerReferenceChannel );

Creates a new instance of the AudioProcessingOptions class with preset microphone array geometry.

Parameters

  • audioProcessingFlags Specifies flags to control the audio processing performed by Speech SDK. It is bitwise OR of AUDIO_INPUT_PROCESSING_XXX constants.

  • microphoneArrayGeometry Specifies the type of microphone array geometry.

  • speakerReferenceChannel Specifies the speaker reference channel position in the input audio.

Returns

The newly created AudioProcessingOptions wrapped inside a std::shared_ptr.

Create

Syntax: public inline static std::shared_ptr< AudioProcessingOptions > Create ( int audioProcessingFlags , MicrophoneArrayGeometry microphoneArrayGeometry , SpeakerReferenceChannel speakerReferenceChannel );

Creates a new instance of the AudioProcessingOptions class with microphone array geometry.

Parameters

  • audioProcessingFlags Specifies flags to control the audio processing performed by Speech SDK. It is bitwise OR of AUDIO_INPUT_PROCESSING_XXX constants.

  • microphoneArrayGeometry Specifies the microphone array geometry.

  • speakerReferenceChannel Specifies the speaker reference channel position in the input audio.

Returns

The newly created AudioProcessingOptions wrapped inside a std::shared_ptr.