# AudioFileRecordingConfig (/zh-CN/api-reference/rtc/csharp-windows/class-audiorecordingconfiguration) > For AI agents: see the complete documentation index at [llms.txt](/llms.txt). ```csharp public class AudioRecordingConfiguration { public AudioRecordingConfiguration() { filePath = ""; encode = false; sampleRate = 32000; fileRecordingType = AUDIO_FILE_RECORDING_TYPE.AUDIO_FILE_RECORDING_MIXED; quality = AUDIO_RECORDING_QUALITY_TYPE.AUDIO_RECORDING_QUALITY_LOW; recordingChannel = 1; } public AudioRecordingConfiguration(string file_path, int sample_rate, AUDIO_RECORDING_QUALITY_TYPE quality_type, int channel) { this.filePath = file_path; this.encode = false; this.sampleRate = sample_rate; this.fileRecordingType = AUDIO_FILE_RECORDING_TYPE.AUDIO_FILE_RECORDING_MIXED; this.quality = quality_type; recordingChannel = channel; } public AudioRecordingConfiguration(string file_path, bool enc, int sample_rate, AUDIO_FILE_RECORDING_TYPE type, AUDIO_RECORDING_QUALITY_TYPE quality_type, int channel) { this.filePath = file_path; this.encode = enc; this.sampleRate = sample_rate; this.fileRecordingType = type; this.quality = quality_type; this.recordingChannel = channel; } public string filePath { set; get; } public bool encode { set; get; } public int sampleRate { set; get; } public AUDIO_FILE_RECORDING_TYPE fileRecordingType { set; get; } public AUDIO_RECORDING_QUALITY_TYPE quality { set; get; } public int recordingChannel { set; get; } }; ``` ## 属性 [#属性] 录音文件在本地保存的绝对路径,需精确到文件名及格式。例如:`C:\music\audio.aac`。 :::caution 注意: 请确保你指定的路径存在并且可写。 ::: 设置是否编码音频数据: - `true`: 将音频数据用 AAC 编码。 - `false`:(默认)不编码音频数据,直接保存录制的音频数据。 录音采样率(Hz)。 - 16000 - 32000 (默认) - 44100 - 48000 :::caution 注意: 如果把该参数设为 44100 或 48000,为保证录音效果,建议录制 WAV 文件或 quality 为 AUDIO_RECORDING_QUALITY_MEDIUM 或 AUDIO_RECORDING_QUALITY_HIGH 的 AAC 文件。 ::: 录音内容。详见 [AUDIO_FILE_RECORDING_TYPE](/zh-CN/api-reference/rtc/csharp-windows/enum-audiofilerecordingtype)。 录音音质。详见 [AUDIO_RECORDING_QUALITY_TYPE](/zh-CN/api-reference/rtc/csharp-windows/enum-audiorecordingqualitytype)。 :::caution 注意: 该参数仅适用于 AAC 文件。 ::: 录制的音频声道。目前支持如下取值: - 1:(默认)单声道。 - 2: 双声道。 :::note 注: 实际录制的音频声道与你采集的音频声道有关: - 如果采集的音频为单声道,recordingChannel 设为 `2`, 则录制的音频为经过单声道数据拷贝后的双声道数据,而不是立体声。 - 如果采集的音频为双声道,recordingChannel 设为 `1`,则录制的音频为经过双声道数据混合后的单声道数据。 此外,集成方案也会影响最终录制的音频声道。因此,如果你希望录制立体声,请[联系技术支持](https://ticket.shengwang.cn/)协助。 :::