Giter Site home page Giter Site logo

Comments (3)

psykulsk avatar psykulsk commented on August 16, 2024

Hi!

So generally, when using the algorithms that I used in this project, you can only cancel out noise right next to the microphone that collects the error (leftover noise) signal. Same algorithms are used in noise cancelling systems inside cars, that put the error microphones inside the headrests, so close to your ears. Inside cars they are mainly concerned with cancelling out the engine noise so they put the microphone that collects the reference noise signal right next to the engine. Using these methods you cannot really cancel out noise in a larger area, like a room, because the algorithm simply tries to minimise the error signal. And since you are collecting it in a single place, it can be minimised only there. You can have multiple error microphones and multiple speakers that emit the cancelling signal. Simple example are of course the headphones. With headphones it is easier, because the error mic and speaker pair is isolated from the other mic speaker pair. If you would have multiple speakers in an open space you have to deal with interference between them.

In this project I achieved only some attenuation for a very simple noise signal, so it didn't work that great. I think the main blocker was the way how audio device drivers are working in linux. You get samples in blocks of samples (for my microphones the minimum was 32 samples), while when you are using digital signal processors, you usually do processing sample, by sample. Thanks to that, the time it takes to do a whole processing loop (getting reference signal, error signal, processing them and emitting the cancelling noise) is much shorter with dsp and the algorithm can "react" quickly to a changing noise signal.

If you have access to IEEE digital library (I unfortunately do not have it any more) I suggest you to checkout these articles/books:

Best of luck with your project!

from rpianc.

leoheck avatar leoheck commented on August 16, 2024

Hey, thanks for the explanation @psykulsk . Yeah, the headphone is a beautiful environment to work on since it is a small and closed environment. I did not know that it was not work really well as you expected.

So, my main idea is to cancel out the washing machine noise. Maybe it is a good environment for give it a try. So, if I put the speakers close to it, or inside of it I may have such a good environment too. The only issue is that I am not sure if it will be easy to find microphones as yours. I will have to adapt something different.

What do you think of this crazy idea? Do you think it may work?

from rpianc.

psykulsk avatar psykulsk commented on August 16, 2024

In that case I would suggest putting the reference microphone close to the washing machine and speakers, together with the error microphone, somewhere further away. The more you increase the distance between the reference and error microphones the more chance you have to succesfully cancel the noise. That's because, with the distance, the acoustic waves that carries the noise, have to travel further, while after you register the noise with the reference microphone you have more time to process it and run the adaptive filtering loop.

So a setup: reference mic next to the washing machine, speakers and the error mic further away (f.e. somewhere at your desk), could work and create a noise free zone next to the error microphone. I believe that with proper tuning of parameters and maybe enhancing/fixing this project you could achieve some attenuation, but if you would use a digital signal processor for that it could bring better results for sure.

I've used a DSP like this one https://www.hifiberry.com/shop/boards/hifiberry-dac-dsp/. It is pretty cool. You connect it to a raspberry pi and then you can "program" the dsp via a graphical IDE (https://www.analog.com/en/design-center/evaluation-hardware-and-software/software/ss_sigst_02.html) and upload it wirelessly to the DSP (Raspberry Pi acts as a server and passes data between the DSP and your host). However, it took me a long time to configure it to work with my microphones and speakers (as I remember there were some errors in the datasheet https://support.hifiberry.com/hc/en-us/community/posts/360003426118-DAC-DSP-board-DSP-analog-audio-output-I2S-input).

As for the microphones, they are still available on the adafruit site (https://www.adafruit.com/product/3421).

from rpianc.

Related Issues (10)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.