6 ms·
I expected a website offering to use your microphone to record, invert and cancel background noise via the speakers. Turns out the website is offering prerecord
by ssl232 4y ago
I expected a website offering to use your microphone to record, invert and cancel background noise via the speakers. Turns out the website is offering prerecorded sounds instead, not really cancelling anything. Still though, surely someone has tried my idea? It would likely need some adjustability to match the phase delay between microphone and ears-via-speakers but I guess it could work.
- shreyshnaccount 4y agoI don't think it can be done.. active noise cancellation needs to be really really fast and is done using dedicated hardware afaik.
- nolok 4y ago> is done using dedicated hardware afaik. Agree with the first part of your answer, but not sure what you mean by this second part. There is dedicated hardware for it, then there are solution using your generic gpu (ex Nvidia RTX Voice), then there are solution using your generic cpu (ex whatever the name of the one discord desktop client provides).
- shreyshnaccount 4y agoisn't that different? i thought that's noise isolation that runs using a Neural Net. i don't think it's as real time as you'd need for noise cancellation
- shreyshnaccount 4y agoI meant circuits specifically designed for noise cancellation. like in headphones
- distantsounds 4y agoASUS makes a noise canceling headphone adapter, and I have a chip built into my Asus motherboard that does it. https://shop.asus.com/us/90yh02l1-b2ua00-ai-noise-canceling-mic-adapter.html https://shop.asus.com/us/90yh02l1-b2ua00-ai-noise-canceling-...
- shreyshnaccount 4y agothere's not too much detail on that page but what I see is that it "reduces EMI interference" from a mic. that's a different thing than noise cancellation (remove the noise from your background so that you hear the audio better)
- thescriptkiddie 4y agoThat appears to be a "noise canceling" microphone adapter. It doesn't even claim to offer headphone noise canceling, it's just for microphones. There are two dots that might possibly be microphones for active noise cancellation, but I suspect that they would be too far away from your face to be effective. Most likely there is just a DSP inside that tries to filter out background noise heuristically.
- Shorel 4y agoTrue, and shows how far we have fallen in the war against latency. In theory it should be possible with a standard sound card, or a sound chip in the motherboard.
- ElemenoPicuares 4y agoI'm neither a physics nor sound processing expert, but it seems like the microphone creates the signal to invert, and the speakers emit the inverted signal before the initial sound hits your ear. So I reckon the sound must first hit the microphone, then the speakers, then your ear. With headphones, the speakers cover your ears and the microphone is outside the enclosure, so that's easy. In a larger controlled environment with reliable sound dampening on 3 sides, maybe? My inexpert intuition says that doesn't stand a chance of working in an open environment with one microphone and two speakers usually closer to each other than the user's ears. It seems like having a door on a building with no walls.
- naillo 4y agoI suspect it could be done for sort of periodic noise (or possibly with a predictive net). I've always wanted to implement this on the web but never got around to it.
- bee_rider 4y agoAs far as I can remember, even some of the special-purpose-hardware based solution like you'd find in a pair of noise canceling headphones do better on periodic noises. Not needing to race the soundwave seems like it should make the latency problem much more forgiving. And the most annoying noises tend to be periodic anyway. I think you should give it a try... let us test it, if you can cancel out my air conditioner noise you'll be my favorite person...
- the__alchemist 4y agoYea. Relatively straightforward on an MCU that supports audio, and running non-OS firmware. I think anything that runs through an OS or schedule would introduce too much latency. So, it can be on a generic MCU, but not one where the algorithm is competing for CPU time with other processes.
- deleted 4y ago[deleted]
- shreyshnaccount 4y agoyou prolly need a dac or smth, because embedded devices usually don't have the compute needed for real time noise cancellation
- the__alchemist 4y agoYou could do it on STM32H7, and probably slower ones too.
- 6zPb8HBrz3ixFDw 4y agoSupporting audio kinda implies having a DAC...
- bee_rider 4y agoUnless you really like the sound of square waves I guess.
- wowokay 4y agoAnd for some reason I thought it required triangulation, in that noise cancelation can't be done with sound in a space because the inverse of the sound you hear is relative compared to the person a foot or two away from you.
- hackerlight 4y agoIt does only if the microphone is far away from the ear canal. If it's close to the ear canal, all you need is low latency hardware (or hardware+software), responding in a few milliseconds thereabouts.
- taneq 4y agoHow fast can it need to be? The output frequency would be below 20kHz so latency of 50us or so, probably too fast for a userland app but I'd expect it to be doable in a driver or in the OS?
- bee_rider 4y agoI get a similar answer but through a wildly different path: I think you have to detect the sound with a microphone, then come up with the canceling waveform before the sound hits your headphone drivers (as they will be generating the canceling waveform). Given the typical size of headphones, it would be something like 2cm/(34300cm/s) ~ 60us Although, sound travels faster through solids, so might want to be a little quicker. And 2cm thick headphones would be pretty thick.
- shreyshnaccount 4y agowonder if there's some kind of "virtual microphone" like device that let's you hear sounds further away than a mic in the headset. Google fu showed some ultrasonic virtual microphone but idk if it is useful here..
- bee_rider 4y agoHmm, could be. I don't know much about this. I imagine you want a very good approximation of the soundwave that will hit the ear (so you can cancel it out very accurately). The farther that your 'virtual microphone' is from the ear, I guess the harder it will be to figure out exactly how the sounds it is picking up will combine to hit the ear. I mean, imagine the extreme case -- your 'virtual microphone' is (virtually) sitting in the path of some directed audio beam which won't hit the headphone wearer at all. Now you do the signal processing and generate a signal to cancel out that directed audio beam, which, because the user isn't in the path of it, causes them to hear it!
- shreyshnaccount 4y agoyeah, it would have to be super directional..
- JanisErdmanis 4y agoCan't be done because the sound from source propagate as a spherical wave. To cancel it with destructive interference you would need to make a wave which focuses to the source and would only work if you are in between the noise source and the counter wave generator. Unfortunately to make a plane wave you would need infinite number of point sources or need the counter source further away. An alternative is to track listener and cancel the noise around that region but you would only be able to do that with very low frequencies with wavelength larger than distance between your two ears.
- quantisan 4y agoWe programmed this at a company hackathon a while back. We pivoted and presented it as an "open office eavesdropper" because our naive algorithm amplifies distant speeches pretty well unexpectedly. https://github.com/Quantisan/nullwave https://github.com/Quantisan/nullwave
- mysterydip 4y agoCould it work for cancelling tinnitus? Just have an inverse of that sound playing, with some controls for frequency adjustment for individuals.
- alexdbird 4y agoI don’t think so. Most tinnitus isn’t an actual sound wave. It’s coming from a glitch in the auditory system. Even if your input was mixing and could theoretically cancel it out, it would be impossible to lock the phase (without some feedback from deep inside your head!)
- jpindar 4y agoThe Tinnitus Neuromodulator setting works AMAZINGLY well for me. It's effect even persists for some minutes after I turn it off.
- mrtksn 4y ago> Still though, surely someone has tried my idea Well, AFAIK some cars have active noise cancelation. I wonder why we don't have it at homes, after all they are both confined spaces. If general purpose computation and software wouldn't cut it, why we don't have whatever they have in those cars? A lot of money is spent on noise insulation on buildings, so the demand and the money must be there.
- swores 4y agoI don't know anything about the car noise cancellation tech, but I would hazard a guess that instead of using microphones to pick up noises and generate counter-noises in real time, car manufacturers can just create the right anti-noise for their engine sounds, for the sounds of wind hitting the car body, etc. and use them without needing anything particularly clever going on?
- mihaaly 4y agoTry the app. That is generating neverending background noises in a certain selected theme (forest, rain, ocean, zen garden, white noise, ...) and the components can be tuned to our liking (i.e forest, with the amount of wind and bird and other effects one likes). Quite good! I use that. (noise cancelling term is misleading btw. More like covering noise with another noise. : ) )
- fencepost 4y agoTurns out the website is offering prerecorded sounds instead, not really cancelling anything. Kind of. Not full prerecorded like you'd get in a long audio track, but generators instead with multiple tracks each based on samples. This offers a huge range of customization ability, but also allows the amazing 'animate' feature that allows a constantly changing background. In the app if you tap where it says 'Default' on a sound you can also choose other preset 'scenes' using the same generators which can be very different - for example the Folk Trad sound set, which has scenes for Breathing Pipe, Calm Blow, Circular Breath, Harmony, Haunting Flutes, Highlander, The Drone and Throat Pipes.