esp32-i2s-slm icon indicating copy to clipboard operation
esp32-i2s-slm copied to clipboard

Make I2S mic usable standalone

Open HorstBaerbel opened this issue 4 years ago • 5 comments

Hi Ivan, Thanks for the great I2S microphone example of yours! I wanted to use it in my own project, but ran into problems, because I only needed the I2S sampling and equalization. So I split your example into multiple files and made the microphone sampling into a template class. Now it can be used standalone. I also incorporated pull request #3.

I'd be happy if you could test and merge my changes, so I can use your code as a git submodule in my project. If you have questions or want me to make changes just post here.

The code is working fine in my own project, but I have no SSD1306 display to test with...

HorstBaerbel avatar May 28 '21 20:05 HorstBaerbel

@HorstBaerbel This PR returns on error when attempting to compile. Would you mind taking a look at it, please?

[Starting] Verifying sketch 'esp32-i2s-slm.ino'
Please see the build logs in output path: /home/benji/git/build
/home/benji/git/esp32-i2s-slm/esp32-i2s-slm.ino: In function 'void setup()':
/home/benji/git/esp32-i2s-slm/esp32-i2s-slm.ino:142:39: error: 'const class SOS_IIR_Filter' has no member named 'sum_of_squares'
     float sum_sqr_SPL = MIC_EQUALIZER.sum_of_squares(samples, samples, SAMPLE_COUNT);
                                       ^~~~~~~~~~~~~~
/home/benji/git/esp32-i2s-slm/esp32-i2s-slm.ino:144:40: error: 'const class SOS_IIR_Filter' has no member named 'sum_of_squares'
     float sum_sqr_weighted = WEIGHTING.sum_of_squares(samples, samples, SAMPLE_COUNT);
                                        ^~~~~~~~~~~~~~

Error during build: exit status 1
IntelliSense configuration already up to date. To manually rebuild your IntelliSense configuration run "Ctrl+Alt+I"
[Error] Verifying sketch 'esp32-i2s-slm.ino': Exit with code=1

I see a similarly named function, calculateSumOfSquares inside sos-iir-filter.h, but it only takes two parameters.

bbbenji avatar Mar 24 '23 23:03 bbbenji

This repo is dead. See my project for a working version. I hate OSS repo fragmentation, but it's been 2 years since this PR, so I don't expect it to ever get merged. I wanted to make and maintain my own branch, but haven't gotten around to properly clean it up etc....

HorstBaerbel avatar Mar 27 '23 15:03 HorstBaerbel

@bbbenji Did you have any luck checking out my fork?

HorstBaerbel avatar Apr 15 '23 16:04 HorstBaerbel

@HorstBaerbel thanks for following up. I did check out your repo, but it's completely rid of the decibel output, which is what I need. I spent a lot of time trying to get this PR working and despite my efforts, I was unfortunately unsuccessful. If you are curious, here is my fork of this PR: https://github.com/bbbenji/DeciLight/

I ended up forking this original repo and working successfully with that. I haven't yet pushed it. But your PR would have made my code a bit more clean.

It's been a while since I have touched this code, so I don't even remember what point I got to.

bbbenji avatar Apr 15 '23 18:04 bbbenji

Correction: I guess I did push my final project based off this repo here: https://github.com/bbbenji/esp32-db-signaller

bbbenji avatar Apr 15 '23 19:04 bbbenji