AudioRecordingConfiguration

Recording configuration.

export class AudioRecordingConfiguration {

  filePath?: string;

  encode?: boolean;

  sampleRate?: number;

  fileRecordingType?: AudioFileRecordingType;

  quality?: AudioRecordingQualityType;

  recordingChannel?: number;
}

Properties

filePath
Absolute path to save the recording file locally, including file name and extension. For example: C:\music\audio.aac.
Note: Make sure the specified path exists and is writable.
encode
Whether to encode the audio data:
  • true: Encode the audio data using AAC.
  • false: (default) Do not encode, save the raw recorded audio data.
sampleRate
Note: If you set this parameter to 44100 or 48000, to ensure recording quality, it is recommended to record in WAV format or AAC files with quality set to AudioRecordingQualityMedium or AudioRecordingQualityHigh.
Recording sample rate (Hz).
  • 16000
  • 32000 (default)
  • 44100
  • 48000
fileRecordingType
Recording content. See AudioFileRecordingType.
quality
Recording quality. See AudioRecordingQualityType.
Note: This parameter applies to AAC files only.
recordingChannel
Note: The actual recorded audio channel depends on the captured audio channel:
  • If the captured audio is mono and recordingChannel is set to 2, the recorded audio will be stereo with duplicated mono data, not true stereo.
  • If the captured audio is stereo and recordingChannel is set to 1, the recorded audio will be mono with mixed stereo data.
Additionally, the integration scheme may affect the final recorded audio channel. If you want to record stereo, please contact technical support for assistance.
Audio channel for recording. Supported values:
  • 1: (default) Mono.
  • 2: Stereo.