Interface MicrophoneAudioTrackInitConfig

Configurations for the audio track from the audio captured by a microphone. Set these configurations when calling [AgoraRTC.createMicrophoneAudioTrack]IAgoraRTC.createMicrophoneAudioTrack.

interface MicrophoneAudioTrackInitConfig {
    AEC?: boolean;
    AGC?: boolean;
    ANS?: boolean;
    encoderConfig?: AudioEncoderConfiguration | "speech_low_quality" | "speech_standard" | "music_standard" | "standard_stereo" | "high_quality" | "high_quality_stereo";
    microphoneId?: string;
}

Properties

AEC?: boolean

Whether to enable acoustic echo cancellation:

  • true: Enable acoustic echo cancellation.
  • false: Do not enable acoustic echo cancellation.
AGC?: boolean

Whether to enable audio gain control:

  • true: Enable audio gain control.
  • false: Do not enable audio gain control.
ANS?: boolean

Whether to enable automatic noise suppression:

  • true: Enable automatic noise suppression.
  • false: Do not automatic noise suppression.
encoderConfig?: AudioEncoderConfiguration | "speech_low_quality" | "speech_standard" | "music_standard" | "standard_stereo" | "high_quality" | "high_quality_stereo"

The audio encoder configurations.

You can set the audio encoder configurations in either of the following ways:

  • Pass the preset audio encoder configurations by using [[AudioEncoderConfigurationPreset]].
  • Pass your customized audio encoder configurations by using [[AudioEncoderConfiguration]].

Firefox does not support setting the audio encoding rate.

microphoneId?: string

Specifies the microphone ID.

You can get a list of the available microphones by calling [AgoraRTC.getMicrophones]IAgoraRTC.getMicrophones.