Project S.W.A.N.
Blog
Technology and Conservation13 July 202614 min read

Inside the Edge AI: How Project S.W.A.N. Detects Birds and Protects Human Speech

Inside Project S.W.A.N.’s field nodes: how Raspberry Pis use BirdNET and local speech detection to identify likely bird calls while protecting privacy.

Written by

Project S.W.A.N.

A Project S.W.A.N. Raspberry Pi node processing bird audio inside an off-grid field enclosure
Image: Igor Omilaev

A field box doing two different kinds of listening

Project S.W.A.N. — the Scientific Wildlife Acoustic Network — is built around a simple idea: place autonomous listening stations in useful locations, let them monitor bird activity, and turn the results into information that schools, communities and host organisations can understand.

Making that happen is a demanding engineering problem. A node may be away from mains power, connected through a limited GSM link and expected to work with little day-to-day attention. It must record sound, identify likely bird activity, protect human privacy, manage files and report useful information.

Most of that work happens inside the field box itself.

The Raspberry Pi does not need to send every recording to a cloud artificial intelligence service. It captures and analyses audio locally, using one model for ecological recognition and a separate privacy filter for human speech. Only after those checks does the node decide what information, if any, should leave the site.

This is edge AI: machine learning performed close to the source of the data.

For Project S.W.A.N., edge processing is not merely a technical novelty. It is what makes a privacy-first, solar-powered and mobile-connected network practical.

From microphone to digital sound

Each node begins with an external shielded microphone positioned outside the main electronics enclosure.

The microphone converts changes in air pressure into an electrical signal, which an audio interface turns into digital samples for the Raspberry Pi.

Project S.W.A.N. records in short, consecutive chunks rather than creating one enormous daily file. Sample rate, input device and chunk length can be configured for each node. In practical terms the listening is continuous, but each short segment can be analysed, trimmed, queued or deleted independently.

The external microphone matters because the quality of every later decision depends on the quality of the input. Wind, rain, nearby machinery, road traffic, echoes and electrical interference can all affect a recording.

Shielded cabling helps reduce unwanted electrical noise between the microphone and the node.

A microphone does not understand what it hears. It simply captures pressure changes. The interpretation begins in software.

What a spectrogram shows

Raw audio is a waveform: a record of how the sound pressure rises and falls over time. That representation is useful, but it is not always the easiest way to distinguish one bird call from another.

Machine learning systems commonly examine sound in a time-and-frequency form often described as a spectrogram.

A spectrogram can be imagined as a heat map of sound. Time runs from left to right. Low pitches sit near the bottom, high pitches near the top, and stronger sounds appear more prominently.

A robin phrase may produce a fine, changing pattern. A pigeon call may appear as slower, lower bands. Traffic can form a broad low-frequency wash, while wind may spread irregular energy across much of the image.

The BirdNET model does not look at a spectrogram in the human sense of staring at a picture. The software converts the incoming audio into numerical time-frequency features and passes those features through a trained neural network.

That network has learned patterns associated with many bird vocalisations. It then returns candidate labels with confidence values and timing information.

The BirdNET side of the node

Project S.W.A.N. uses BirdNET for avian acoustic recognition on the Raspberry Pi.

BirdNET is the ecological model in the system. Its job is to examine an audio chunk and suggest which bird species may be vocalising within it.

The node passes a recording to the local BirdNET analysis process. BirdNET divides the audio into analysis windows, extracts time-frequency features and evaluates those features using its trained model.

The result can include a common name, scientific name, confidence score and the approximate start and end time of the detected vocalisation.

Project S.W.A.N. then applies its own configuration rules.

A node can use confidence thresholds to reject weak suggestions. It can apply a species allowlist appropriate to the project area. It can limit the number of candidate detections accepted from a single chunk. These controls reduce obviously unsuitable results before they reach the public platform.

This still does not make an accepted result a confirmed ecological record.

BirdNET produces an automated likely detection. A high confidence score means the model found a strong match to a learned pattern; it does not prove beyond doubt that the species was present.

Background noise, overlapping birds, imitations and similar calls can all produce errors. Important, unusual or sensitive records should be checked against the associated evidence and verified by an appropriate person before being treated as confirmed.

For routine monitoring, however, the model is a powerful sorting system. Instead of asking people to listen manually to every second of every day, it highlights the moments most likely to contain relevant bird activity.

Turning a detection into an isolated clip

When the node accepts a likely detection, it knows approximately where in the audio chunk the event occurred.

Project S.W.A.N. can use that timing information to cut out a shorter section around the bird sound. A small amount of padding can be retained before and after the detected interval so the call is not clipped too tightly.

This produces an isolated sound clip rather than uploading the full ambient recording.

The shorter clip is easier to review, cheaper to transmit and more useful on a station page. It also supports data minimisation because unrelated audio outside the event does not need to be retained.

The node catalogues the detection as a local job containing the species suggestion, confidence, timing, node identity and file information needed for upload.

That local catalogue is best understood as a queue or small operational database. It is not intended to become a permanent archive of everything the microphone has heard. Its purpose is to make the node resilient.

If the GSM connection disappears, the job can remain pending and be retried later. If the central API is temporarily unavailable, the Raspberry Pi can continue analysing new audio instead of losing every event immediately.

Project S.W.A.N.'s current privacy-focused design also uses volatile local audio storage. Working audio can be held in the Raspberry Pi's runtime memory area rather than being accumulated indefinitely on long-term storage.

After a permitted clip has uploaded successfully, the local copy can be deleted. Audio with no accepted bird detections is also removed. The node can therefore process extensive sound without preserving a complete recording of the site.

Two models, two very different questions

It is important to distinguish the avian model from the human-privacy model.

BirdNET asks: which bird species is this sound most similar to?

The privacy filter asks a much narrower question: does this clip appear to contain human speech?

Those are not the same machine learning task.

Bird identification is a classification problem across many possible species. Human speech filtering is primarily a presence-detection problem. The node does not need to understand a conversation, identify the speaker or save a transcript. It only needs enough evidence to decide whether retaining the audio would conflict with the station's privacy rules.

That separation is deliberate. Project S.W.A.N. can log a likely bird detection even when its audio is withheld. The ecological event and permission to publish the clip are independent decisions.

Speech detection is not necessarily transcription

The phrase Automatic Speech Recognition, or ASR, normally refers to software that converts spoken words into text.

Whisper is a well-known example. It was trained on a very large and diverse collection of audio and is notably robust across accents, recording conditions and background noise compared with many older speech-recognition systems.

That makes Whisper an impressive tool for transcription. It can also be used indirectly to test whether intelligible speech is present.

However, full transcription is not the same as privacy filtering, and it is not the current core method used by Project S.W.A.N. nodes.

The live S.W.A.N. privacy pipeline uses a lightweight voice activity detection model, currently based on Silero VAD running locally through ONNX. VAD means voice activity detection. It estimates whether sections of audio contain human speech-like activity without attempting to write down what was said.

This distinction matters for both privacy and efficiency.

A transcription model such as Whisper tries to decode linguistic content. A VAD model only needs to decide whether speech is probably present. For a small solar-powered node, the narrower task is usually faster, less computationally demanding and more aligned with the project's purpose.

Whisper remains useful as a reference point because it demonstrates how far offline speech technology has advanced. Smaller Whisper variants can run on edge computers, and their training on diverse, noisy audio helps them cope with difficult recordings.

But Project S.W.A.N. does not need to transcribe people in order to protect them. In fact, avoiding transcription is the more privacy-preserving design.

How the privacy decision works

After BirdNET identifies a likely bird event and the node prepares a short clip, the privacy model examines that clip for human speech.

The analysis is focused on the clip rather than the entire original recording. This keeps the workload proportionate and concentrates the privacy check on the audio that might otherwise be retained or uploaded.

The VAD model estimates which parts of the clip contain speech-like activity and how much speech is present.

The node then applies the configured privacy policy.

Under strict privacy rules, a clip containing both a likely bird detection and detected human speech can be withheld and deleted locally. The bird detection metadata can still be uploaded, but the public platform can mark the recording as unavailable for privacy reasons rather than suggesting that the audio was lost.

If no voice is detected and the other upload rules are satisfied, the isolated bird clip can proceed to the upload queue.

Automated voice detection is not perfect. Wind, radio, television and some animal sounds can confuse a model, while distant speech may be missed.

The filter is therefore one control within a wider privacy-first system. Short chunks, isolated clips, local processing, selective upload and rapid deletion all reduce exposure together.

Why no cloud AI call is required

Both BirdNET analysis and speech detection run on the Raspberry Pi.

The station does not need to upload a raw recording to a commercial cloud API and wait for a remote server to decide whether it contains a bird or a person.

This reverses the usual cloud-first data flow. Raw candidate recordings do not have to leave the site before the system knows whether they are useful or privacy-sensitive.

The microphone captures the sound. The Raspberry Pi analyses it. BirdNET proposes likely species. The privacy model checks the isolated clip. The node applies its local rules. Only then does it contact the Project S.W.A.N. API to report a detection or upload an allowed clip.

The GSM connection is still important for synchronisation, station health, configuration and publishing results. It is simply not required for the core act of understanding each audio chunk.

That means a temporary network outage does not stop the machine learning pipeline. The node can continue processing and queue permitted results until connectivity returns.

Privacy built in from the start

Privacy is strongest when it shapes the architecture. Project S.W.A.N.'s edge design limits what leaves each host site.

Continuous ambient sound does not need to be streamed to a central server. Long recordings do not need to be uploaded simply to discover whether they contain a bird. Human speech does not need to be transcribed. Audio that fails the privacy policy can be deleted before transmission.

This is especially important for stations hosted at schools, community locations, workplaces and other public-facing sites.

The system is intended to monitor wildlife, not people.

No automated filter can remove every risk, so host placement and governance still matter. Microphones should be positioned with care. Access to recordings should be controlled. Retention should remain limited. Hosts and users should receive clear information about how the system works.

Edge AI supports those responsibilities by making data minimisation technically possible at the point of capture.

The financial case for edge processing

Cloud machine learning services often charge according to the amount of audio processed, the number of requests made or the computing time consumed.

That model can be reasonable for occasional use. It becomes expensive for a distributed network that records repeatedly throughout every day.

A node generating thousands of short cloud requests would create an ongoing operating cost before storage and mobile data were considered. It would also expose the network to future pricing changes by external providers.

Local inference changes the economics.

Once the Raspberry Pi and software are installed, the node can run BirdNET and the speech filter repeatedly without paying a fee for every chunk. There are still real costs — hardware, electricity generation, batteries, mobile connectivity, storage, maintenance and central infrastructure — but the recognition workload does not create a new API bill each time a bird sings.

For a community-focused network, sustainability means controlling the recurring cost of operating many stations over long periods.

Edge filtering also reduces GSM use. Detection metadata is tiny compared with raw audio, and an isolated compressed clip is far smaller than a continuous recording.

Less transmitted data means lower mobile costs and less energy spent keeping the modem active.

Heavy computation on minimal wattage

Bird classification and speech detection would once have required specialist computers.

Project S.W.A.N. performs both tasks inside a compact field node powered from an off-grid electrical system.

A Raspberry Pi is not a desktop workstation or cloud graphics processor, so its resources must be used carefully.

Audio is processed in bounded chunks. Models are selected for edge deployment. Unnecessary files are deleted. Work is queued rather than allowed to grow without limit. The node avoids sending huge amounts of data over GSM, and it performs only the privacy checks needed for a publishing decision.

The models must also coexist with recording, status reporting, updates and fault recovery, all on a modest solar-and-battery power budget.

That is what makes the node more than a recorder in a box. It is a small autonomous computing platform making repeated local decisions about ecology, privacy, storage and communications.

What reaches the public platform

After local processing, the node can send the central system a structured detection record.

That record can include the suggested species, scientific name, confidence, time, station and audio status. A permitted clip can be stored through the project's media system; a withheld clip can be represented without publishing the sound.

The public result should continue to be described as a likely detection.

The platform can help people explore patterns, listen to permitted clips and learn about species, but it should not turn machine output into false certainty.

For important records, the audio and context should be reviewed. For formal ecological work, appropriate survey methods and professional judgement remain essential.

Project S.W.A.N. is designed to add a persistent listening layer for education, citizen science and public engagement, not to replace trained ecologists.

Why the distinction between detection and evidence matters

Both models in a S.W.A.N. node produce estimates, not unquestionable answers.

BirdNET estimates which species pattern best matches the audio. The VAD model estimates whether human speech is present.

The node combines those estimates with practical rules: confidence thresholds, species filtering, privacy mode, upload permissions and file-retention settings.

A detection may therefore pass one part of the pipeline and fail another. A bird may be logged while its clip is withheld. A voice-free clip may still be rejected because the bird confidence is too low. A strong result may remain pending because the GSM connection is unavailable.

This rule-based layer is as important as the models themselves. It turns raw AI output into cautious operational decisions that reflect the project's ecological and privacy goals.

A complete edge pipeline

The full process can be summarised in plain English.

The external shielded microphone listens to the surrounding soundscape.

The Raspberry Pi records that sound in short chunks.

BirdNET analyses each chunk locally and proposes likely bird species.

Project S.W.A.N. applies thresholds and species rules to decide which suggestions should become detection jobs.

The node trims an isolated clip around an accepted event.

The local voice activity model checks that clip for human speech.

The privacy policy decides whether the audio may be retained and uploaded.

Detection information is placed in a local queue so it can survive temporary connection problems.

Permitted results are sent through the GSM link when the central API is available.

Uploaded audio is deleted locally, while rejected or unnecessary audio is removed without becoming a permanent archive.

Every major interpretation step happens before the node needs a cloud service.

Small computers, careful science

There is something remarkable about a low-power field box carrying out work that combines digital signal processing, ecological classification, privacy filtering, database management and mobile communications.

The achievement is not that the node produces perfect answers. It does not.

The achievement is that it can make useful, cautious decisions close to where the sound was captured, while keeping the amount of transmitted and retained audio deliberately small.

BirdNET provides the ecological lens. The speech-presence model provides a privacy barrier. The Raspberry Pi coordinates the two, and the surrounding engineering allows them to operate in an autonomous solar-powered GSM station.

That separation of responsibilities is central to Project S.W.A.N.

One model helps catalogue likely wildlife activity. The other helps prevent human conversations from becoming part of the published acoustic record.

Together, they show why edge AI is such a good fit for responsible passive acoustic monitoring: local decisions, lower bandwidth, controlled operating costs and privacy designed into the system from the first audio sample.

Continue reading

Related articles

View all articles →
The creator of Project S.W.A.N. assembling an off-grid acoustic bird monitoring station

Wildlife and conservation

Why I’m Building Project S.W.A.N.

The founder of Project S.W.A.N. explains how workshop diagnostics, electronics and practical engineering inspired a community bird-listening network.