Migration from V1.* to V2.*

[中文]

Input Data Format Changes

The new version use input_format string parameter to define the arrangement of audio channels in the input data. Each character in the string represents a channel type:

Character

Description

M

Microphone channel

R

Playback reference channel

N

Unused or unknown channel

Example: MMNR indicates four channels, ordered as: microphone channel, microphone channel, unused or unknown channel, playback reference channel.

Configuration and Initialization

    1. The configuration initialization method AFE_CONFIG_DEFAULT() has been removed. Please use afe_config_init to initialize configurations:

    afe_config_t *afe_config = afe_config_init("MMNR", models, AFE_TYPE_SR, AFE_MODE_HIGH_PERF);
    afe_config_print(afe_config); // print all configurations
    
    1. ESP_AFE_SR_HANDLE and ESP_AFE_VC_HANDLE have been removed. Use esp_afe_handle_from_config to create instances:

    esp_afe_sr_iface_t *afe_handle = esp_afe_handle_from_config(afe_config);
    

Note

AFE v2.0 introduces additional configuration options. For details, please refer to AFE and VAD.