Coder Social home page Coder Social logo

thejasvibr / fieldrecorder Goto Github PK

View Code? Open in Web Editor NEW
2.0 1.0 0.0 12.94 MB

A dongle-less free software implementation to record audio and video from a custom multi-camera+ microphone setup

License: MIT License

Python 100.00%
python playback record-audio synchronisation sounddevice

fieldrecorder's Introduction

fieldrecorder

A set of modules that allow for dongle-free recording and playback triggered by keyboard presses or automatic threshold based triggering.

The recording setup :

fieldrecorder relies on the sounddevice library to interface with ASIO based soundcards and perform simultaneous playbacks and recordings.

fieldrecorder was specifically designed to collect time synchronised audio-video data with a three camera and 12 microphone recording system used to record audio-video data on bat echolocation in the field. The cameras (TeAx ThermalCapture 25Hz) continuously receive a 25 Hz square wave signal to keep the video stream going, and are triggered to record through a 20kHz sinusoid wave that is additionally sent on a separate channel based on user triggering or automated threshold crossing.

Multichannel + multidevice recording capabilities and challenges:

In its current default form the module records data from 24 audio channels from two ASIO based soundcards (Fireface UC). In our case the two soundcards do not show a complete synchronicity in AD conversion. To overcome this there is a third channel that outputs a copy of the 25 Hz square wave onto both devices. Thus two of the 24 channels are required to time-match the audio channels later. In house tests have shown that this time-matching procedure is sufficiently accurate for our sound source localisation purposes.

The Modules:

fieldrecorder : this module when run requires the user to trigger the start and stop of the recording through keyboard key presses. Please be aware that any key press will activate the start/stop of the recording, irrespective of whether the python commandline/ Spyder window is minimised or not.

fieldrecorder_trigger : this module allows the user to pre-define a threshold in dB rms for a set of 'monitor channels'. The dB rms of the audio data across the 'monitor channels' are calculated for each arriving buffer. If the dB rms crosses the threshold in any one of the 'monitor channels' recording is triggered for a fixed period of time (default of 10 seconds). The user can also bandpass the audio data in the monitor channels to decrease non-target sound triggering (eg. for bats an ultrasound bandpass between 20-90 kHz).

ADC_delay : this module contains a set of helper functions to time-synchronise the audio channels digitised across multiple AD converters. Included are functions to estimate delay in digitisation, cut and time-align channels and save them into individual WAV files.

tests_adc_delay : basic unit tests to check if ADC_delay is working fine.

Other files:

DEVICE1_2017-11-21-10_44_20.wav DEVICE1_2017-11-21-10_44_20.wav These WAV files are required for the tests_adc_delay to work. Do not download these files if you're not interested in running the tests yourself.

The fieldrecorder set of modules were written and tested with Python 2.7.12 and sounddevice 0.3.5

fieldrecorder's People

Contributors

thejasvibr avatar

Stargazers

 avatar  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.