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
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
Any-to-any voice conversion using synthetic specific-speaker speeches as intermedium features

MediumVC MediumVC is an utterance-level method towards any-to-any VC. Before that, we propose SingleVC to perform A2O tasks(Xi → Ŷi) , Xi means utter

谷下雨 47 Dec 25, 2022
A Quick Music Player Made Fully in Python

Quick Music Player Made Fully In Python. Pure Python, cross platform, single function module with no dependencies for playing sounds. Installation & S

1 Dec 24, 2021
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
Python module for handling audio metadata

Mutagen is a Python module to handle audio metadata. It supports ASF, FLAC, MP4, Monkey's Audio, MP3, Musepack, Ogg Opus, Ogg FLAC, Ogg Speex, Ogg The

Quod Libet 1.1k Dec 31, 2022
Audio book player for senior visually impaired.

PI Zero W Audio Book Motivation and requirements My dad is practically blind and at 80 years has trouble hearing and operating tiny or more complicate

Andrej Hosna 29 Dec 25, 2022
Code for "Audio-driven Talking Face Video Generation with Learning-based Personalized Head Pose"

Audio-driven Talking Face Video Generation with Learning-based Personalized Head Pose We provide PyTorch implementations for our arxiv paper "Audio-dr

Ran Yi 497 Jan 09, 2023
This is an OverPowered Vc Music Player! Will work for you and play music in Voice Chatz

VcPlayer This is an OverPowered Vc Music Player! Will work for you and play music in Voice Chatz Telegram Voice-Chat Bot [PyTGCalls] ⇝ Requirements ⇜

1 Dec 20, 2021
This is a short program that takes the input from your microphone and uses OpenGL to draw a live colourful pattern

Visual-Music This is a short program that takes the input from your microphone and uses OpenGL to draw a live colourful pattern Installation and Setup

Tom Jebbo 1 Dec 26, 2021
Extract the songs from your osu! libary into proper mp3 form, complete with metadata and album art!

osu-Extract Extract the songs from your osu! libary into proper mp3 form, complete with metadata and album art! Requirements python3 mutagen pillow Us

William Carter 2 Mar 09, 2022
Simple, hackable offline speech to text - using the VOSK-API.

Nerd Dictation Offline Speech to Text for Desktop Linux. This is a utility that provides simple access speech to text for using in Linux without being

Campbell Barton 844 Jan 07, 2023
Telegram Bot to play music in VoiceChat with Channel Support and autostarts Radio.

VCPlayerBot Telegram bot to stream videos in telegram voicechat for both groups and channels. Supports live streams, YouTube videos and telegram media

Abdisamad Omar Mohamed 1 Oct 15, 2021
:sound: Play and Record Sound with Python :snake:

Play and Record Sound with Python This Python module provides bindings for the PortAudio library and a few convenience functions to play and record Nu

spatialaudio.net 750 Dec 31, 2022
Vixtify - Python Controlled Music Player

Strumm Sound Playlist : Click me to listen Welcome to GitHub Pages You can use the editor on GitHub to maintain and preview the content for your websi

Vicky Kumar 2 Feb 03, 2022
digital audio workstation, instrument and effect plugins, wave editor

digital audio workstation, instrument and effect plugins, wave editor

306 Jan 05, 2023
PatrikZero's CS:GO Hearing protection

Program that lowers volume when you die and get flashed in CS:GO. It aims to lower the chance of hearing damage by reducing overall sound exposure. Uses game state integration. Anti-cheat safe.

Patrik Žúdel 224 Dec 04, 2022
A python library for working with praat, textgrids, time aligned audio transcripts, and audio files.

praatIO Questions? Comments? Feedback? A library for working with praat, time aligned audio transcripts, and audio files that comes with batteries inc

Tim 224 Dec 19, 2022
Convert complex chord names to midi notes

ezchord Simple python script that can convert complex chord names to midi notes Prerequisites pip install midiutil Usage ./ezchord.py Dmin7 G7 C timi

Alex Zhang 2 Dec 20, 2022
Minimal command-line music player written in Python

pyms Minimal command-line music player written in Python. Designed with elegance and minimalism. Resizes dynamically with your terminal. Dependencies

12 Sep 23, 2022
A voice control utility for Spotify

Spotify Voice Control A voice control utility for Spotify · Report Bug · Request

Shoubhit Dash 27 Jan 01, 2023