I'm answering now as I just had the same problem and after wasting money at a local garage who didn't find the fault, I have solved it myself.
In my case it was the 'Reduction Gear" or heater flap (my part no 6447NR), which is on the air duct that draws fresh air in and opens and closes as required by the heating system.
You can check whether this is your problem by unplugging it and seeing if the noise goes. It is behind the dashboard on the steering wheel side next to the transmission tunnel.
I managed mainly by feel to get the cable out and prove this was the fault before removing the bottom piece of the dashboard (unclips) and then getting better access.
I had to first remove another similar item which controls the heater box to gain access to all the screws holding this item. It is fiddly but I managed despite not being the smallest or most flexible!
Once I got it out I opened it and found one of the little gears had stripped giving me the machine gun noise.
Trevor
January 2012