![PyPI version](https://badge.fury.io/py/audian.svg)
audian - AUDIoANalyzer
Python- and pyqtgraph-based GUI
for viewing and analyzing recordings of animal vocalizations.
![audian](docs/audian-v1.7.png)
Features
- Interactive viewer for single and multi-channel audio signals.
- Can handle many file formats and long recordings - holds only part of the recordings in memory.
- Displays raw traces, filtered traces, envelopes, and spectrogram.
- Change spectrogramm resolution, overlap, color bar range and color map interactively.
- Change low- and high-pass filter cutoff frequencies interactively.
- Optional envelope with lowpass-filter cutoff frequency that can be changed interactively.
- Hide and show channels as well as plot panels.
- Extensive and intuitive key shortcuts for most functions.
- Plugins for additional computed traces, plot panels, and analysis.
audian data.wav
I currently explore various possibilities for interactive analysis of
audio signals. In the end, audian should be easily extensible via
plugins that provide processing and analysis algorithms, and audian
handles all GUI aspects.
Incomplete list of TODOs:
Structure
Eventually we want audian to be neatly separated into a data model,
widgets that display the data, and controllers.
Model
At the core of audian are time-series data that are loaded from a
file. In addition it supports varous derived time-series data, like
for example filtered data, computed envelopes, spectrograms,
etc. Audian can handle very large data sets, but holds only a small
part in memory (buffer).
-
class BufferedData
: Base class for computed data (buffereddata.py
).
-
class BufferedFilter
: Filter source data on the fly (bufferedfilter.py
).
-
class BufferedEnvelope
: Compute envelope on the fly (bufferedenvelope.py
).
-
class BufferedSpectrogram
: Spectrogram of source data on the fly (bufferedspectrogram.py
).
-
class Data
: Handles all the raw and derived data traces like filtered data, spectrogram data, etc (data.py
).
-
markerdata.py
: All marker related stuff. TODO: Split it into widgets and marker data.
View
All the data audian is dealing with are displayed in plots.
A few classes specializing some pyqtgraph features:
timeaxisitem.py
: Label time-axis of TimePlot.yaxisitem.py
: Label y-axis of TimePlot.selectviewbox.py
: Handles zooming and selection on all RangePlot.
Managing plots:
plotranges.py
: Manage ranges of plot axes.panels.py
: Manage plot panels.
Basic plots for time-series data:
rangeplot.py
: Plot displaying any data with specified range type.timeplot.py
: Plot displaying data as a function of time.spectrogramplot.py
: Plot displaying spectrograms.
Basic plot items:
traceitem.py
: PlotDataItem for TimePlot.specitem.py
: ImageItem for SpectrogramPlot.fulltraceplot.py
: GraphicsLayoutWidget showing the full raw data traces.
Controller
audiangui.py
: Main GUI, handles DataBrowser widgets and key shortcuts.databrowser.py
: Each data file is displayed in a DataBrowser widget.
Plugins
plugins.py
: Discover and manage plugins.analyzer.py
: Base class for analyzer plugins.statisticsanalyzer.py
: Compute basic descriptive statistics.
Installation of audian in Anaconda3 on windows
Anaconda supports really old versions of PyQt5 and Qt5 only that are
not compatible with a recent pyqtgraph. No fun.
A workaround is to first create a new conda environment. For this open
the windows powershell from the Anaconda navigator. Type in and execute
conda create -n Qt python=3.9
Then activate the new Qt
environment:
conda activate Qt
Then we use pip
to install PyQt5:
pip install PyQt5
Change into a directory where you want to put
AudioIO,
ThunderLab, and
audian. First, download AudioIO
and install it:
git clone https://github.com/janscience/audioio.git
cd audioio
pip install .
cd ..
And then do the same with ThunderLab
git clone https://github.com/bendalab/thunderlab.git
cd thunderlab
pip install .
cd ..
and with audian:
git cone https://github.com/bendalab/audian.git
cd audian
pip install .
This installs many other packages (numpy, scipy, etc.).
Then you should be able to run audian
from the power shell
For updating audian do
cd audian
git pull origin master
pip install .
Same for audioio and thunderlab.
Run Audian from Spyder IPython console:
In the IPython console do:
%set_env MPLBACKEND=
! audian -f 1000 -l 15000 data.wav
Installation
Simply run (as superuser):
pip install audian
This should also install:
Options
Output of audian --help
:
usage: audian [-h] [--version] [-v] [-c [cfgfile]] [-f FREQ] [-l FREQ] [file] [channel]
Display waveform, spectrogram, power spectrum, envelope, and envelope spectrum of time series data.
positional arguments:
file name of the file with the time series data
channel channel to be displayed
optional arguments:
-h, --help show this help message and exit
--version show program's version number and exit
-v print debug information
-c [cfgfile], --save-config [cfgfile]
save configuration to file cfgfile (defaults to /usr/local/bin/audian.cfg)
-f FREQ cutoff frequency of highpass filter in Hz
-l FREQ cutoff frequency of lowpass filter in Hz
version 1.0 by Jan Benda (2015-2022)
Other scientific software for working on timeseries data
- BioSPPy: The toolbox
bundles together various signal processing and pattern recognition
methods geared towards the analysis of biosignals.