The Forest Symphony: Turn a Bird's Song Into a Melody You Can Keep A developer built Forest Symphony, an open-source offline app that records a bird's song, identifies the species with BirdNET, tracks the bird's pitch 100 times per second, and uses a locally run Llama 3.1 8B model via Ollama to arrange the notes into a downloadable melody. The pipeline runs entirely on-device with FastAPI, NumPy and SciPy, and the app is designed to be used only outdoors so each collected melody comes from a real bird heard on a real day. This is a submission for the Hacktoberfest Open-Source AI Challenge Week 1: Touch Grass https://dev.to/challenges/hacktoberfest-week1-2026-10-05 You're on a forest trail. A bird starts singing, and a few seconds later the moment has passed. The Forest Symphony lets you keep that moment. You record the bird on your device, and in about ten seconds you get: It works without internet. Everything runs on your own device, so it still works deep in the woods with no signal. Your recordings and where you made them stay on your device. Who it's for: hikers, birdwatchers, musicians, parents out on a walk with curious kids, and anyone who has stopped to listen to a bird and wished they could take the song home. How it gets people outside: the app is useless indoors on purpose. The only way to get a new melody is to go outside, find a bird, and listen closely enough to record it. Every melody you collect comes from a real bird you heard on a real day. It works like a sound journal that you build by spending time outdoors. https://drive.google.com/file/d/1PUcd4IlFDC5NfZWIdGX1syxjSyWxyfmw/view?usp=sharing https://drive.google.com/file/d/1PUcd4IlFDC5NfZWIdGX1syxjSyWxyfmw/view?usp=sharing What the demo shows: The app ships with these three recordings built in, so a live demo never depends on a bird turning up. https://github.com/Gamey001/forest-symphony https://github.com/Gamey001/forest-symphony To run it yourself: python3.12 -m venv .venv .venv/bin/pip install -r requirements-dev.txt ollama pull llama3.1 one-time download of the AI composer ollama serve in its own terminal .venv/bin/uvicorn app.main:app --port 8000 Then open http://localhost:8000 . The first run downloads the bird-recognition model once; after that, everything works offline. The app works like a small assembly line. A recording goes in one end and a melody comes out the other. Each station does one job: 🎙️ Recording ↓ 1. Clean up – remove wind rumble, background hiss and silent gaps ↓ 2. Identify – BirdNET names the bird or says "that's not a bird" ↓ 3. Listen – follow the bird's pitch, 100 times per second ↓ 4. Draft – turn the pitch into notes, in a key, at a human tempo ↓ 5. Compose – a local AI Llama 3.1 arranges the draft and calls a "make the melody" tool ↓ 6. Synthesize – plain maths turns the notes into sound waves → WAV file ↓ 🎵 Result card: bird name, facts, play button, download button 🐦 BirdNET: the bird expert. BirdNET is a free, openly available model from the Cornell Lab of Ornithology and Chemnitz University of Technology. It has been trained to recognise over 6,000 bird species by sound. It runs on my laptop through birdnet , the official Python package. I chose it over a general-purpose AI because it is built for exactly this one job, and it does it well. It also recognises things that aren't birds, such as human voices, engines and wind noise. The app uses that to say "we couldn't hear a bird" instead of guessing. 🎼 Llama 3.1 8B via Ollama: the composer. Llama 3.1 is a language model whose files you can download and run yourself an "open-weight" model . Ollama is a free tool that runs models like this on your own computer. In this app, the model plays the role of a composer. It receives a short text description of what the bird sang species, key, draft notes and responds by calling a tool named generate melody with its final arrangement. 🔧 Plain Python for everything else: FastAPI for the small web server, NumPy and SciPy for the audio maths, and a plain HTML page for the interface. 1. Let each AI do what it is good at. My first plan had the language model "listen" to the bird. That doesn't work: language models read and write text and cannot hear. If you ask one for the notes in a recording, it will make some up. So the work is split: 2. Never trust the AI blindly, and always have a backup. Every tool call from the AI is checked before anything plays. Are the notes real notes? Is the melody within two octaves? Are the rhythms valid? If the answer is wrong, the AI is told exactly what was wrong and gets one more try. If it still fails, or if the AI isn't running at all, the app uses its own draft melody. You always get a song. 3. Facts come from a fact file, never from the AI. Language models sometimes state made-up facts with total confidence. That's harmless in a chat, but bad on a card that teaches kids about birds. The species facts come from a small, hand-checked file and are looked up by the name BirdNET gives. 4. Be honest about what the AI did. In testing, the model would say "I smoothed out the melody" when it hadn't changed a single note. So the app doesn't show what the AI says it did. It compares the melodies before and after and reports what actually changed, for example "The AI composer reshaped 5 of the bird's 24 notes." It works where the internet doesn't. The place you hear the best birdsong, deep in the woods, is usually the place with no signal. An app that depends on a paid online AI service stops working at the trailhead. Because BirdNET and Llama 3.1 run on the device itself, the Forest Symphony works on a mountain or in a forest, or anywhere else. Your walks stay private. Recordings, times and places say a lot about where you go and when. With open models running locally, none of that leaves your device. There's no account to sign up for and nothing to upload. The best tool for the job was already open. No general-purpose online AI matches BirdNET at recognising birds. It exists because researchers spent years collecting and labelling bird recordings and then shared the result. The demo recordings in this app also come from volunteers who share their recordings on xeno-canto. The whole project is built on things people chose to share. I could look inside and fix things. When the owl went missing and the AI's descriptions didn't match its output, I could test each piece on its own, see what was going on, and change it. With a closed service, I would only have seen the final wrong answer, with nothing I could inspect. It costs nothing to use. There are no per-request fees or rate limits, and no API key that can expire before demo day.