AudioRecordingConfiguration
Recording configuration.
class AudioRecordingConfiguration {
const AudioRecordingConfiguration(
{this.filePath,
this.encode,
this.sampleRate,
this.fileRecordingType,
this.quality,
this.recordingChannel});
@JsonKey(name: 'filePath')
final String? filePath;
@JsonKey(name: 'encode')
final bool? encode;
@JsonKey(name: 'sampleRate')
final int? sampleRate;
@JsonKey(name: 'fileRecordingType')
final AudioFileRecordingType? fileRecordingType;
@JsonKey(name: 'quality')
final AudioRecordingQualityType? quality;
@JsonKey(name: 'recordingChannel')
final int? recordingChannel;
factory AudioRecordingConfiguration.fromJson(Map<String, dynamic> json) =>
_$AudioRecordingConfigurationFromJson(json);
Map<String, dynamic> toJson() => _$AudioRecordingConfigurationToJson(this);
}
Properties
- filePath
- The absolute path where the recording file is saved locally. Must include the file name and extension. 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 directly.
- sampleRate
-
Note: If you set this parameter to 44100 or 48000, to ensure recording quality, it is recommended to record in WAV format or use AAC files withRecording sample rate (Hz).
qualityset to audioRecordingQualityMedium or audioRecordingQualityHigh.- 16000
- 32000 (default)
- 44100
- 48000
- fileRecordingType
- Recording content. See AudioFileRecordingType.
- quality
- Recording quality. See audiorecordingqualitytype.
Note: This parameter applies only to AAC files.
- recordingChannel
-
Note: The actual recorded audio channel depends on the captured audio channel:Number of audio channels to record. Supported values:
- If the captured audio is mono and
recordingChannelis set to2, the recorded audio will be stereo with duplicated mono data, not true stereo. - If the captured audio is stereo and
recordingChannelis set to1, the recorded audio will be mono with mixed stereo data.
truestereo, please contact technical support for assistance.- 1: (Default) Mono.
- 2: Stereo.
- If the captured audio is mono and