Skip to content

Commit b038040

Browse files
committed
update readme
1 parent e9e3e2d commit b038040

1 file changed

Lines changed: 9 additions & 3 deletions

File tree

README.md

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# ESPHome Sound Level Meter [![CI](https://github.com/stas-sl/esphome-sound-level-meter/actions/workflows/ci.yaml/badge.svg)](https://github.com/stas-sl/esphome-sound-level-meter/actions/workflows/ci.yaml)
22

33
> [!NOTE]
4-
> This component was originally developed a few years ago when ESPHome lacked official support for I2S audio. Since then, ESPHome has introduced its own official I2S [microphone](https://esphome.io/components/microphone/i2s_audio.html) and [sound_level](https://esphome.io/components/sensor/sound_level.html) components. For basic sound level measurements, I recommend using these official components, as they offer better compatibility with newer ESP32 variants. However, my component remains useful if you require advanced features like A/C-weighting or custom microphone equalization, which are not available in the official implementations yet.
4+
> This component was originally developed a few years ago, back when ESPHome didn’t yet offer official support for I2S audio. Since then, ESPHome has introduced its own [I2S microphone](https://esphome.io/components/microphone/i2s_audio.html) and [sound level](https://esphome.io/components/sensor/sound_level.html) components. These may be sufficient for basic sound level measurements. However, if you need more advanced features - such as A/C-weighting or support for custom IIR filters - you can use my component instead.
55
66
This component was made to measure environmental noise levels (Leq, Lmin, Lmax, Lpeak) with different frequency weightings over configured time intervals. It is heavily based on awesome work by Ivan Kostoski: [esp32-i2s-slm](https://github.com/ikostoski/esp32-i2s-slm) (his [hackaday.io project](https://hackaday.io/project/166867-esp32-i2s-slm)).
77

@@ -264,11 +264,11 @@ For real-time visualization, I'm using web server number/slider controls to disp
264264
265265
With 10 x 6 = 60 SOS filters, the component uses about 60-70% of the CPU, and I assume the web server also consumes some CPU power to send approximately 100 messages per second. So, this is quite a CPU-intensive task. I chose 6th-order filters somewhat arbitrarily; you could experiment with lower-order filters, which might meet your needs while using less CPU power.
266266
267-
https://github.com/user-attachments/assets/904a2a96-0c16-4797-9587-2558cc0c70f8
267+
https://github.com/user-attachments/assets/6283a8a9-d44d-40e2-992b-8ea2da0ff56e
268268
269269
While this example serves as a stress test, you could also use it to monitor different frequencies over longer time intervals with less frequent updates.
270270
271-
<img width="1189" src="https://github.com/user-attachments/assets/8a23774d-46f2-4162-8504-4e46bfe50a80">
271+
<img width="1193" src="https://github.com/user-attachments/assets/b811edf6-a4dd-4df8-a448-ae9c9b918505">
272272
273273
## Filter design (math)
274274
@@ -359,6 +359,12 @@ mpv udp://0.0.0.0:1234 -v --demuxer=rawaudio --demuxer-rawaudio-channels=1 --dem
359359

360360
ffplay even displays by default nice spectrogram of playing audio.
361361

362+
Or to save it to a file, you can use netcat:
363+
364+
```bash
365+
nc -u -l 1234 > mic_data.raw
366+
```
367+
362368
## References
363369

364370
1. [ESP32-I2S-SLM hackaday.io project](https://hackaday.io/project/166867-esp32-i2s-slm)

0 commit comments

Comments
 (0)