AudioRecordingConfiguration

Recording configuration.

export class AudioRecordingConfiguration {

  filePath?: string;

  encode?: boolean;

  sampleRate?: number;

  fileRecordingType?: AudioFileRecordingType;

  quality?: AudioRecordingQualityType;

  recordingChannel?: number;
}

Properties

filePath
The absolute path where the recording file is saved locally, including the file name and format. For example: C:\music\audio.aac.
Note: Make sure the specified path exists and is writable.
encode
Specifies whether to encode the audio data:
  • true: Encode the audio data using AAC.
  • false: (Default) Do not encode the audio data, 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 WAV files 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 copied from mono data, not true stereo.
  • If the captured audio is stereo and recordingChannel is set to 1, the recorded audio will be mono mixed from stereo data.
In addition, the integration solution may also affect the final recorded audio channel. If you want to record stereo, please contact technical support for assistance.
Audio recording channel. The following values are supported:
  • 1: (Default) Mono.
  • 2: Stereo.