Noise? coming from the hood of the car? on 2006 BMW 525xi

i have a 2006 bmw 525xi, and i it started making a noise a couple ofdays ago, it sounds like there is something trapped in the fan, and when i accelerate the noise gets louder. What is it? HElp! I took it an independent mechanic and he stated that it was the alternator, is that even true?