As a vastly available energy source in our daily life, acoustic vibrations are usually taken as noise pollution with little use as a power source. In this work, we have developed a triboelectrification-based thin-film nanogenerator for harvesting acoustic energy from ambient environment. Structured using a polytetrafluoroethylene thin film and a holey aluminum film electrode under carefully designed straining conditions, the nanogenerator is capable of converting acoustic energy into electric energy via triboelectric transduction. With an acoustic sensitivity of 9.54 V Pa(-1) in a pressure range from 70 to 110 dB and a directivity angle of 52°, the nanogenerator produced a maximum electric power density of 60.2 mW m(-2), which directly lit 17 commercial light-emitting diodes (LEDs). Furthermore, the nanogenerator can also act as a self-powered active sensor for automatically detecting the location of an acoustic source with an error less than 7 cm. In addition, an array of devices with varying resonance frequencies was employed to widen the overall bandwidth from 10 to 1700 Hz, so that the nanogenerator was used as a superior self-powered microphone for sound recording. Our approach presents an adaptable, mobile, and cost-effective technology for harvesting acoustic energy from ambient environment, with applications in infrastructure monitoring, sensor networks, military surveillance, and environmental noise reduction.