A nanogenerator (NG) is a device that converts vibration energy into electricity. Here, a flexible, small size and lightweight NG is successfully demonstrated as an active sensor for detecting the vibration spectrum of a drum membrane without the use of an external power source. The output current/voltage signal of the NG is a direct measure of the strain of the local vibrating drum membrane that contains rich informational content, such as, notably, the vibration frequency, vibration speed and vibration amplitude. In comparison to the laser vibrometer, which is excessively complex and expensive, this kind of small and low cost sensor based on an NG is also capable of detecting the local vibration frequency of a drum membrane accurately. A spatial arrangement of the NGs on the membrane can provide position-dependent vibration information on the surface. The measured frequency spectrum can be understood on the basis of the theoretically calculated vibration modes. This work expands the application of NGs and reveals the potential for developing sound wave detection, environmental/infrastructure monitoring and many more applications.