Skip to content

I'm using the ESP AEC algorithm in Bluetooth HFP (HDP/HFP) voice call scenarios, but I'm experiencing distortion in my voice. #210

Description

@batuhantsdmr

Checklist

  • Checked the issue tracker for similar issues to ensure this is not a duplicate.
  • Provided a clear description of your suggestion.
  • Included any relevant context or examples.

Issue or Suggestion Description

I'm using the esp-sr AEC algorithm in a Bluetooth HFP (HDP/HFP) voice call scenario. For HFP, I'm directly using this project:
esp-adf/examples/get-started/pipeline_a2dp_sink_and_hfp/main
/a2dp_sink_and_hfp_example.c

When AEC is enabled, the outgoing audio on the other end is distorted and becomes robotic.

Without AEC, the audio is normal.

To add AEC, I used this document:
https://docs.espressif.com/projects/esp-sr/en/latest/esp32/acoustic_echo_cancellation/README.html
In other words, I used the esp_aec.h file.

Also, my code includes an adaptation I made using the esp-adf/examples/advanced_examples/algorithm/main
/algorithm_examples.c file.

#ifndef DIRECTLY_AEC
This attempts to run in AFE mode, meaning it uses algorithm functions; otherwise, it uses the esp_aec.h APIs. However, AEC doesn't work with algorithm integration. I've attached the relevant code for your review.

Environment:

ESP-IDF version: 5.5.3
ESP-ADF version: 2.8
Device: ESP32 Lyrat Mini V1.2
Sampling rate: 16 kHz

hfp_aec.txt

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions