Merge branch 'docs/migration_guide' into 'master'

Merge branch 'docs/esp_sr' into 'master'

See merge request speech-recognition-framework/esp-sr!140
This commit is contained in:
Sun Xiang Yu 2025-02-17 15:47:38 +08:00
commit 79556def1c

View File

@ -3,28 +3,10 @@ Migration from V1.* to V2.*
:link_to_translation:`zh_CN:[中文]`
Configuration and Initialization
--------------------------------
- 1. The legacy configuration initialization method AFE_CONFIG_DEFAULT() has been removed. Please use ``afe_config_init`` to initialize configurations:
.. code-block:: c
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
- 2. ESP_AFE_SR_HANDLE and ESP_AFE_VC_HANDLE have been removed. Use ``esp_afe_handle_from_config`` to create instances:
.. code-block:: c
esp_afe_sr_iface_t *afe_handle = esp_afe_handle_from_config(afe_config);
Input Data Format Changes
---------------------------
The new version supports more flexible input formats via the ``input_format`` parameter. This parameter defines the arrangement of audio channels in the input data.
So You just need to provide the correct ``input_format`` and do not need to rearrange audio data. Each character in the string represents a channel type:
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 |
@ -39,8 +21,26 @@ So You just need to provide the correct ``input_format`` and do not need to rear
+-----------+---------------------+
**Example:**
``MMNR`` indicates four channels, ordered as: microphone channel, microphone channel, unused channel, playback reference channel.
``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:
.. code-block:: c
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
- 2. ESP_AFE_SR_HANDLE and ESP_AFE_VC_HANDLE have been removed. Use ``esp_afe_handle_from_config`` to create instances:
.. code-block:: c
esp_afe_sr_iface_t *afe_handle = esp_afe_handle_from_config(afe_config);
.. note::
AFE v2.0 introduces additional configuration options. For details, refer to :doc:`AFE <../audio_front_end/README>` and :doc:`VAD <../vadnet/README>`.
AFE v2.0 introduces additional configuration options. For details, please refer to :doc:`AFE <../audio_front_end/README>` and :doc:`VAD <../vadnet/README>`.