GithubHelp home page GithubHelp logo

gigwegbe / audiomoth-edgeimpulse Goto Github PK

View Code? Open in Web Editor NEW

This project forked from openacousticdevices/audiomoth-edgeimpulse

0.0 1.0 0.0 1.52 MB

Additional firmware for AudioMoth devices to make triggered recordings using Edge Impulse neural network models.

License: MIT License

C++ 0.08% C 99.70% Assembly 0.11% Makefile 0.11%

audiomoth-edgeimpulse's Introduction

AudioMoth-Edge Impulse

A modified version of the AudioMoth standard firmware. This software performs live classification of samples using a neural network from Edge Impulse and saves audio clips containing a specific sound.

Usage

Clone the contents of AudioMoth-Project.

Replace the src/main.c from AudioMoth-Project with the src/main.c from this repository. Put all the remaining src/*.c files and all the src/*.h files from this repository into the /src/ and /inc/ folders of the AudioMoth-Project repository. Copy the edgeimpulse/ and dsplib/ folder (including its contents and subfolders) from this repository into the AudioMoth-Project repository. Replace the build/Makefile from AudioMoth-Project with the build/Makefile from this repository.

In fatfs/inc/ffconf.h make the following changes

  • Disable support for long file names: #define FF_USE_LFN 0
  • Disable support for exFAT filesystem: #define FF_FS_EXFAT 0
  • Enable tiny buffer configuration: #define FF_FS_TINY 1

The SD card used with AudioMoth Edge Impulse needs to have a SETTINGS.TXT. An example SETTINGS.TXT file is included in this repo and can be customized.

!! NOTE

Currently AudioMoth with Edge Impulse only supports FAT32-formatted SD cards

Steps to Build Firmware with different Edge Impulse models

  1. Train a different neural network (using MFCC for audio) on the Edge Impulse platform. Currently AudioMoth only supports 16kHz or 8kHz with 1 second audio samples. Go to the "Deployment" tab, build the C++ library, and download the ZIP file (and unzip it).
  2. In the firmware/Makefile set the EI_MODELPATH = variable to the path of the Edge Impulse ZIP Model folder.
  3. In firmware/src/main.c set the #define EI_MODEL_FREQUENCY to KHZ_16 for a 16 kHz Edge Impulse model or KHZ_8 for a 8 kHz Edge Impulse model. The AudioMoth will record audio files at the same frequency as the Edge Impulse model.
  4. Run make clean and make to build the firmware with the new model.

Troubleshooting

See AudioMoth LED Guide for the meaning of the LED lights and troubleshooting.

Error: 3 Quick Flashes of Red & Green LED

  1. Check that the Edge Impulse model sample rate (8 kHz or 16 kHz) matches the AudioMoth sample rate setting (firmware/src/main.c set the #define EI_MODEL_FREQUENCY)
  2. If this problem still persists, the Edge Impulse model uses too much RAM (likely during the MFCC block). Reduce the parameters used in MFCC and try the updated model. Models with RAM usage > 20 kB are likely not to work.

License

The dsplib source files are from the ARM CMSIS-DSP embedded compute library under the Apache 2.0 license.

The rest of the firmware is Copyright 2023 Open Acoustic Devices under the MIT license.

audiomoth-edgeimpulse's People

Contributors

alexrogerscs avatar luo-anthony avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.