Produce anti-noise

Diez B. Roggisch deets_noospaam at web.de
Mon Feb 2 18:13:21 EST 2004


> I want to know if the is a way to do something in python to produce
> some anti-noise (i.e. I talk in the microphone and the sound go out by
> the speakers but with inversed phase).
> 
> So I want to know how to control the microphone and to add some sort
> of effect to the sound that enter in and to put it out with that
> effect and all this at the same time.

AFAIK such things need vast amounts of computational power for very
complicated algorithms and very low latencies - a job for specialised DSP
code. Its much more complicated than inverting the amplitude (I don't think
that inverting the phase is possible - AFAIK you can only shift it, and
thats not what you want here...)

So I seriously doubt that you can do that with python - I even doubt that
you can do it with you computer. Not so much from the raw computational
power side of the thing, but much more from your audio-equipment.
Professional noise reduction systems costs several thousands of euro and
feature lots of speakers, especially designed, chosen and arranged to
reflect the acoustic envrionment of _one_ room, e.g. the inside of a
certain car. Then specially adapted algorithms come into play.

And AFAIK they only do a decent job of suppressing predictable signals -
like noise from rolling tyres, wind and engines.

Look at www.bose.de, at least in german they have some explanations on whats
actually going on.

However, it _is_ possible to access microphone and speakers - look for 
portaudio or rtaudio-0.2b (for alsa/linux)

Regards,

Diez



More information about the Python-list mailing list