Analyze, visualize and process sound field data recorded by spherical microphone arrays.

Overview

Sound Field Analysis toolbox for Python

Mentioned in Awesome Python for Scientific Audio icon_travis icon_appveyor

The sound_field_analysis toolbox (short: sfa) is a Python port of the Sound Field Analysis Toolbox (SOFiA) toolbox, originally by Benjamin Bernschütz [1]. The main goal of the sfa toolbox is to analyze, visualize and process sound field data recorded by spherical microphone arrays. Furthermore, various types of test-data may be generated to evaluate the implemented functions. It is an essential building block of ReTiSAR, an implementation of real time binaural rendering of spherical microphone array data.

Requirements

We use Python 3.9 for development. Chances are that earlier version will work too but this is currently untested.

The following external libraries are required:

Installation

For performance and convenience reasons we highly recommend to use Conda (miniconda for simplicity) to manage your Python installation. Once installed, you can use the following steps to receive and use sfa, depending on your use case:

  • From PyPI / pip:

    Install into an existing environment (without example Jupyter Notebooks):
    pip install sound_field_analysis
  • By cloning (or downloading) the repository and setting up a new environment:

    git clone https://github.com/AppliedAcousticsChalmers/sound_field_analysis-py.git
    cd sound_field_analysis-py/
    Create a new Conda environment from the specified dependencies:
    conda env create --file environment.yml --force
    Activate the environment:
    source activate sfa
    Optional: Install additional dependencies for development purposes (locally run Jupyter Notebooks with example, run tests, generate documentation):
    conda env update --file environment_dev.yml

Documentation

https://appliedacousticschalmers.github.io/sound_field_analysis-py/ and offline as PDF.

Note: Verify the version number of the documentation to see if it reflects the latest changes.

Examples

The following examples are available as Jupyter Notebooks, either statically on GitHub or interactively on nbviewer. You can of course also simply download the examples and run them locally!

Exp1: Ideal plane wave

Ideal unity plane wave simulation and 3D plot.

View interactively on nbviewer

AE1_img

Exp2: Measured plane wave

A measured plane wave from AZ=180°, EL=90° in the anechoic chamber using a cardioid mic.

View interactively on nbviewer

AE2_img

Exp4: Binaural rendering

Render a spherical microphone array impulse response measurement binaurally. The example shows examples for loading miro or SOFA files.

View interactively on nbviewer

AE4_img

Version history

unreleased
  • Update miro_to_struct() to work in modern Matlab versions
  • Update MIRO struct loading for SphericalGrid (forgiving empty radius and quadrature weights)
  • Add optional automatic limitation of y-axis range in plot2D()
  • Implement frac_oct_smooth_fd() with fractional octave smoothing of magnitude spectra
  • Add option for fractional octave smoothing of magnitude spectra to plot2D()
  • Fix Exp4 to replace removed deg2rad and rad2deg utility functions
v2021.2.4
  • Implement option to use real spherical harmonic basis functions
  • Update Exp4 to optionally utilize real spherical harmonics
  • Fix testing of spherical harmonics against reference Matlab implementation
  • Add testing for generation of real spherical harmonics
  • Add evaluation of performance for generation of complex and real spherical harmonics
  • Add evaluation of performance for spatial sound field decomposition
  • Remove deg2rad and rad2deg utility functions (replaced by NumPy equivalent)
  • Update Conda environment setup to combine all development dependencies
  • Update online and offline documentation
v2021.1.12
  • Update MIRO struct loading for SphericalGrid (quadrature weights are now optional)
  • Fix to prevent Python 3.8 syntax warnings
  • Improve Exp4 (general code structure and utilizing Spherical Head Filter and Spherical Harmonics Tapering)
v2020.1.30
  • Update README and PyPI package
v2019.11.6
  • Update internal documentation and string formatting
v2019.8.15
  • Change version number scheme to CalVer
  • Improve Exp4
  • Update read_SOFA_file()
  • Update 2D plotting functions
  • Improve write_SSR_IRs()
  • Improve Conda environment setup for Jupyter Notebooks
  • Update miro_to_struct()
2019-07-30 (v0.9)
  • Implement SOFA import
  • Update Exp4 to contain SOFA import
  • Delete obsolete Exp3
  • Add named tuple HRIRSignal
  • Implement cart2sph() and sph2cart() utility functions
  • Add Conda environment file for convenient installation of required packages
2019-07-11 (v0.8)
  • Implement Spherical Harmonics coefficients tapering
  • Update Spherical Head Filter to consider tapering
2019-06-17 (v0.7)
  • Implement Bandwidth Extension for Microphone Arrays (BEMA)
  • Edit read_miro_struct(), named tuple ArraySignal and miro_to_struct.m to load center measurements
2019-06-11 (v0.6)
2019-05-23 (v0.5)
  • Implement Spherical Head Filter
  • Implement Spherical Fourier Transform using pseudo-inverse
  • Extract real time capable spatial Fourier transform
  • Extract reversed m index function (Update Exp4)

Contribute

See CONTRIBUTE.rst for full details.

License

This software is licensed under the MIT License (see LICENSE for full details).

References

The sound_field_analysis toolbox is based on the Matlab/C++ Sound Field Analysis Toolbox (SOFiA) toolbox by Benjamin Bernschütz. For more information you may refer to the original publication:

[1] Bernschütz, B., Pörschmann, C., Spors, S., and Weinzierl, S. (2011). SOFiA Sound Field Analysis Toolbox. Proceedings of the ICSA International Conference on Spatial Audio

The Lebedev grid generation was adapted from an implementation by Richard P. Muller.

Owner
Division of Applied Acoustics at Chalmers University of Technology
Division of Applied Acoustics at Chalmers University of Technology
DeepMusic is an easy to use Spotify like app to manage and listen to your favorites musics.

DeepMusic is an easy to use Spotify like app to manage and listen to your favorites musics. Technically, this project is an Android Client and its ent

Labrak Yanis 1 Jul 12, 2021
A useful tool to generate chord progressions according to melody MIDIs

Auto chord generator, pure python package that generate chord progressions according to given melodies

Billy Yi 53 Dec 30, 2022
Improved Python UI to convert Youtube URL to .mp3 file.

YT-MP3 Improved Python UI to convert Youtube URL to .mp3 file. How to use? Just run python3 main.py Enter the URL of the video Enter the PATH of where

8 Jun 19, 2022
Musillow is a music recommender app that finds songs similar to your favourites.

MUSILLOW The music recommender app Check it out now!!! View Demo · Report Bug · Request Feature About The App Musillow is a music recommender app that

3 Feb 03, 2022
Terminal-based audio-to-text converter

att Terminal-based audio-to-text converter Project description A terminal-based audio-to-text converter written in python, enabling you to convert .wa

Sven Eschlbeck 4 Dec 15, 2022
A library for augmenting annotated audio data

muda A library for Musical Data Augmentation. muda package implements annotation-aware musical data augmentation, as described in the muda paper. The

Brian McFee 214 Nov 22, 2022
Python CD-DA ripper preferring accuracy over speed

Whipper Whipper is a Python 3 (3.6+) CD-DA ripper based on the morituri project (CDDA ripper for *nix systems aiming for accuracy over speed). It star

671 Jan 04, 2023
Accompanying code for our paper "Point Cloud Audio Processing"

Point Cloud Audio Processing Krishna Subramani1, Paris Smaragdis1 1UIUC Paper For the necessary libraries/prerequisites, please use conda/anaconda to

Krishna Subramani 17 Nov 17, 2022
A collection of free MIDI chords and progressions ready to be used in your DAW, Akai MPC, or Roland MC-707/101

A collection of free MIDI chords and progressions ready to be used in your DAW, Akai MPC, or Roland MC-707/101

921 Jan 05, 2023
A python script that can play .mp3 URLs upon the ringing or motion detection of a Ring doorbell. The sound plays through Sonos speakers.

Ring x Sonos A python script that plays .mp3 files whenever a doorbell is rung or a doorbell detects motion. Features Music! Authors @braden Running T

braden 0 Nov 12, 2021
BART aids transcribe tasks by taking a source audio file and creating automatic repeated loops, allowing transcribers to listen to fragments multiple times

BART (Beyond Audio Replay Technology) aids transcribe tasks by taking a source audio file and creating automatic repeated loops, allowing transcribers to listen to fragments multiple times (with poss

2 Feb 04, 2022
A python program to cut longer MP3 files (i.e. recordings of several songs) into the individual tracks.

I'm writing a python script to cut longer MP3 files (i.e. recordings of several songs) into the individual tracks called ReCut. So far there are two

Dönerspiess 1 Oct 27, 2021
An audio-solving python funcaptcha solving module

funcapsolver funcapsolver is a funcaptcha audio-solving module, which allows captchas to be interacted with and solved with the use of google's speech

Acier 8 Nov 21, 2022
Gateware for the Terasic/Arrow DECA board, to become a USB2 high speed audio interface

DECA USB Audio Interface DECA based USB 2.0 High Speed audio interface Status / current limitations enumerates as class compliant audio device on Linu

Hans Baier 16 Mar 21, 2022
A GUI-based audio player with support for a large variety of formats

Miza-Player A GUI-based audio player with support for a large variety of formats, able to play from web-hosted media platforms such as YouTube, includ

Thomas Xin 3 Dec 14, 2022
This library provides common speech features for ASR including MFCCs and filterbank energies.

python_speech_features This library provides common speech features for ASR including MFCCs and filterbank energies. If you are not sure what MFCCs ar

James Lyons 2.2k Jan 04, 2023
A music player designed for a University Project.

A music player designed for a University Project. Very flexibe and easy to use, a real life working application with user friendly controls. Hope u enjoy!!

Aditya Johorey 1 Nov 19, 2021
Library for Python 3 to communicate with the Google Chromecast.

pychromecast Library for Python 3.6+ to communicate with the Google Chromecast. It currently supports: Auto discovering connected Chromecasts on the n

Home Assistant Libraries 2.4k Jan 02, 2023
cross-library (GStreamer + Core Audio + MAD + FFmpeg) audio decoding for Python

audioread Decode audio files using whichever backend is available. The library currently supports: Gstreamer via PyGObject. Core Audio on Mac OS X via

beetbox 419 Dec 26, 2022
voice assistant made with python that search for covid19 data(like total cases, deaths and etc) in a specific country

covid19-voice-assistant voice assistant made with python that search for covid19 data(like total cases, deaths and etc) in a specific country installi

Miguel 2 Dec 05, 2021