The Tale of an Unknown Bat: Field Recording in Vietnamese Caves

The Tale of an Unknown Bat #1: Field Recording in Vietnamese Caves


As with any machine learning project — data is king, and having plenty of it can make the journey significantly smoother.

For BatSonar, the data primarily consists of WAVE files capturing bat vocalizations recorded using an ultrasonic microphone. This is a niche piece of tech you won't find at your local electronics store. I sourced mine — a Pettersson Elektronik U256 — all the way from Uppsala, Sweden, and had it shipped to Da Nang, Vietnam.

The U256 offers a sampling rate of 256 kHz, providing a comfortable and reliable target frequency range just below the Nyquist limit — around 20–105 kHz. This range is ample for most bat species.

Scouting Locations

With the microphone in hand, I mapped out my local area and identified three "prime" locations for recording:

  • A neighborhood park with a pond and a golf course
  • A sprawling rice field about 20 km away in Hoi An
  • A massive cave at the base of the Marble Mountains

  • First Stop: The Park

    I started at the park around 6 p.m., a time I had noted as prime bat-spotting from seeing them zip past my window at dusk. It was drizzling lightly, but I figured the rain wouldn't be an issue.

    Once there, I plugged in the mic and began monitoring. The mic captured a medley of sounds — cicadas, crickets, and frogs — but nothing ultrasonic.

    A bit discouraged, I scanned the skies and noticed enormous birds circling silently and ominously overhead. Could these predators be keeping the bats away? Perhaps.

    I decided to call it a night at the park and headed for my next destination.


    Into the Cave

    I arrived at the cave entrance around 8 p.m. It was technically "closed" but with no physical barriers, I ventured inside.

    It was dark — no, pitch black — and the echo of raindrops sounded like distant fireworks in the cavern's halls. Navigating a narrow passage, I emerged into a vast chamber, dimly lit by a single candle near a statue of Lady Buddha.

    (As I'd learned during a recent visit to the Marble Mountains, the Vietnamese often depict Buddha as female — a fascinating cultural nuance.)

    I set up the mic, hit "record," and voilà — there it was on the sonogram: the characteristic "triangles" of bat calls. The bats were definitely here, chattering away, possibly gossiping about the intruder who dared enter their lair.

    Curious, I explored deeper into the cave, where the chambers grew increasingly larger. After two solid hours of recording bat vocalizations, I decided to call it a night.

    On my way out, I bumped into a security guard making his rounds. The mutual surprise of encountering someone in such a setting at that hour made the interaction feel oddly surreal.


    A Mind-Blowing Discovery

    The following day would prove unforgettable.

    As much as I would love to dive into it all today, let me pause at a cliffhanger.

    Next up: What I found when I analyzed the recordings — and why it changed everything.

    Read the full series: Why Bats? · The Bat Sonar Project · Building a Real-Time Detector