Skip to content

Audio recorder configuration

AudioRecorderConfiguration #

Recording configuration.

android_configuration #

android_configuration: AndroidRecorderConfiguration = field(
    default_factory=lambda: AndroidRecorderConfiguration()
)

Android specific configuration.

auto_gain #

auto_gain: bool = False

The recorder will try to auto adjust recording volume in a limited range (if available on the device).

Recording volume may be lowered by using this.

bit_rate #

bit_rate: Number = 128000

The audio encoding bit rate in bits per second if applicable.

cancel_echo #

cancel_echo: bool = False

The recorder will try to reduce echo (if available on the device).

Recording volume may be lowered by using this.

channels #

channels: int = 2

The numbers of channels for the recording.

  • 1 for mono
  • 2 for stereo

Most platforms only accept at most 2 channels.

device #

device: InputDevice | None = None

The device to be used for recording.

If None, default device will be selected.

encoder #

encoder: AudioEncoder = WAV

The requested output format through this given encoder.

ios_configuration #

ios_configuration: IosRecorderConfiguration = field(
    default_factory=lambda: IosRecorderConfiguration()
)

iOS specific configuration.

sample_rate #

sample_rate: int = 44100

The sample rate for audio in samples per second if applicable.

suppress_noise #

suppress_noise: bool = False

The recorder will try to negate the input noise (if available on the device).

Recording volume may be lowered by using this.