Skip to content

Conversation

@stas-sl
Copy link
Owner

@stas-sl stas-sl commented Oct 7, 2024

Release notes

This release comes with quite a few changes - including switching to the official I2S audio microphone for data reading and a new config structure - so it will break your existing setup.

If something doesn't work for you in this version, or you just don’t have the time to update your config (and you're happy with how things are now), feel free to stick with a specific version and upgrade later when it suits you:

external_components:
  - source: github://stas-sl/esphome-sound-level-meter@v1.0.6 # latest 1.x version

Changes in this release:

  • Switched to the official I2S audio microphone: As requested by many users in this issue, the component now uses the official I2S microphone integration. This change improves compatibility with other I2S/audio components and offers better support for a wider range of hardware and board variants.
    However, there are some trade-offs. The new setup consumes more resources. Previously, only one FreeRTOS task was used. Now, the I2S microphone runs in its own task (requiring memory for both stack and buffer), and the sound level meter runs in a separate task (also needing stack and buffer space for calculations). Additionally, a ring buffer is required to pass data between these tasks.

  • Refactored configuration structure: The YAML configuration for filters and sensors has been updated from a hierarchical to a flat, single-level format. This should improve readability and make it easier to edit and maintain, especially by avoiding indentation-related issues. Functionality and flexibility remain unchanged - you can achieve the same results with the new format.

  • Optional support for optimized SOS filtering via ESP-DSP: The component now supports the use of dsps_biquad_f32_xx functions from the ESP-DSP library for second-order section (SOS) filtering on ESP32, ESP32S3, and ESP32P4. These functions may offer up to 2× better performance than the existing C++ implementation. However, note the following limitations:

    1. Optimized versions are available for ESP32, ESP32S3, and ESP32P4 chips.
    2. Uses Direct Form II, which may be less numerically stable than the Direct Form II Transposed approach currently used. However you probably will not notice any difference in practice.
    3. Not available under the Arduino framework - only works with ESP-IDF.
  • 10-band web-based spectrum analyzer demo/config example: A demo configuration showcasing a 10-band real-time spectrum analyzer via a web interface has been added. While the original intention of this project was primarily A/C-weighted level measurements, this example shows how to repurpose the component to monitor specific frequency bands using custom filters.

To start using all these new features before the official release, you can switch to the dev branch. It should already be quite stable, but I’m holding off on merging it into main since it would break existing configurations.

external_components:
  - source: github://stas-sl/esphome-sound-level-meter@dev

@stas-sl stas-sl marked this pull request as ready for review October 8, 2024 00:19
@stas-sl stas-sl marked this pull request as draft October 8, 2024 00:21
@stas-sl stas-sl self-assigned this Oct 8, 2024
@stas-sl stas-sl marked this pull request as ready for review October 9, 2024 01:38
@stas-sl stas-sl changed the title next release release 2.0.0 Oct 9, 2024
@stas-sl stas-sl marked this pull request as draft November 6, 2024 19:17
@stas-sl stas-sl force-pushed the main branch 2 times, most recently from 743fd54 to 5430f70 Compare July 20, 2025 14:30
@stas-sl stas-sl marked this pull request as ready for review July 25, 2025 14:32
@stas-sl stas-sl force-pushed the dev branch 4 times, most recently from d0bdb61 to 82c8ee6 Compare August 3, 2025 17:30
@stas-sl stas-sl force-pushed the dev branch 2 times, most recently from f8b07c4 to 89550b0 Compare August 3, 2025 20:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant