Skip to main content

Saraswati - a robust, multi-channel audio recording, transmission and storage system

Project description

https://github.com/hiveeyes/saraswati/workflows/Tests/badge.svg https://codecov.io/gh/hiveeyes/saraswati/branch/main/graph/badge.svg https://img.shields.io/pypi/pyversions/saraswati.svg https://img.shields.io/pypi/v/saraswati.svg License https://img.shields.io/pypi/status/saraswati.svg

Saraswati

About

Saraswati is a robust, multi-channel audio recording, transmission and storage system.

The software is based on GStreamer and the GStreamer Python Bindings, in turn using the fine PyGObject under the hood. It is designed to run on Single-board computer (SBC) systems as well as larger machines.

The system might become the designated work horse for flexible field recording of audio signals in environmental monitoring systems.

Saraswati is developed by an independent community of scientists from different domains working collaboratively on this project. You are welcome to join our efforts.

Etymology

Saraswati is the Hindu goddess of knowledge, music, art, wisdom and learning.

Status

The software was tested successfully with Python 3.x, GStreamer 1.10.4, 1.14.4 and 1.18.4, on both Linux and macOS.

THIS IS A WORK IN PROGRESS. THERE MIGHT BE DRAGONS. YOU HAVE BEEN WARNED.

Setup

This part of the documentation covers the installation of Saraswati. The first step to using any software package is getting it properly installed. Please read this section carefully.

Install prerequisites

As Saraswati is based on GStreamer and, optionally, ALSA, let’s install the relevant packages.

Debian-based systems

GStreamer:

apt-get install gstreamer1.0 gstreamer1.0-tools gstreamer1.0-alsa gstreamer1.0-plugins-base gstreamer1.0-plugins-good

Python 3.x:

apt-get install python3 python3-gst-1.0 python3-gi python3-tz
macOS systems
brew install gstreamer gst-python gst-libav gst-plugins-base gst-plugins-good mkvtoolnix

Configure system

Synchronize system time with NTP, this is important for appropriate timestamping:

timedatectl set-ntp true

Install Saraswati

pip install saraswati

Usage

This part of the documentation covers how to run Saraswati. Please read this section carefully.

Recording audio

saraswati record is an implementation to

  • ingest audio from a GStreamer audio source element,

  • run it through flacenc to encode audio with the FLAC lossless audio encoder, and

  • finally store it using splitmuxsink, a GStreamer component which multiplexes incoming streams into multiple time- or size-limited files

Each audio fragment will be timestamped with the current date/time information in an ISO8601-like format, using a qualified UTC offset of +0000.

In order to learn about the command line syntax, please invoke saraswati --help or saraswati record --help.

Example output when being started at 03:35 CET:

recording_channel1_20210620T122642+0000_0000.mka
recording_channel1_20210620T122652+0000_0001.mka
recording_channel1_20210620T122702+0000_0002.mka
recording_channel1_20210620T122712+0000_0003.mka
recording_channel1_20210620T122722+0000_0004.mka

Display segment metadata information embedded into the file:

mkvinfo var/spool/recording_channel1_20210620T122642+0000_0065.mka  | grep -E 'Date|duration'
| + Date: Sun Jun 20 12:26:42 2021 UTC
|  + Default duration: 00:00:00.104489796 (9.570 frames/fields per second for a video track)

Project information

Background

This software gets developed for the “Bee Observer” (BOB) project, a joint endeavour initiated by the Cognitive neuroinformatics group at the University of Bremen and the people of the independent research and development project Hiveeyes. See also:

Details

The “Saraswati” program is released under the GNU AGPL license. Its source code lives on GitHub and the Python package is published to PyPI. You might also want to have a look at the documentation.

If you’d like to contribute you’re most welcome! Spend some time taking a look around, locate a bug, design issue or spelling mistake and then send us a pull request or create an issue.

Thanks in advance for your efforts, we really appreciate any help or feedback.

Code license

The code is licensed under the GNU AGPL license. See LICENSE file for details.


Have fun!

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

saraswati-0.1.0.tar.gz (25.5 kB view details)

Uploaded Source

File details

Details for the file saraswati-0.1.0.tar.gz.

File metadata

  • Download URL: saraswati-0.1.0.tar.gz
  • Upload date:
  • Size: 25.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.5.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.59.0 CPython/3.9.5

File hashes

Hashes for saraswati-0.1.0.tar.gz
Algorithm Hash digest
SHA256 fc4056a6ae05bd581414bf071313d1ffa3d10a2457c184c793584668a5202f4a
MD5 eeb6821b959ab6ae50579b2607e7e06a
BLAKE2b-256 c272e9a24d34a4e75912ac60fe6c53730364ae98fcd61b23e5945a72f91ab46f

See more details on using hashes here.

Provenance

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page