A collection of python scripts for extracting and analyzing acoustics from audio files.

Related tags

AudiopyAcoustics
Overview

pyAcoustics

https://img.shields.io/badge/license-MIT-blue.svg?

A collection of python scripts for extracting and analyzing acoustics from audio files.

1   Common Use Cases

What can you do with this library?

  • Extract pitch and intensity:

    pyacoustics.intensity_and_pitch.praat_pi.getPraatPitchAndIntensity()
    
  • Extract segments of a wav file:

    pyacoustics.signals.audio_scripts.getSubwav()
    
  • Perform simple manipulations on wav files:

    pyacoustics.signals.resampleAudio()
    
    pyacoustics.signals.splitStereoAudio()
    
  • Split audio files on segments of silence or on pure tones:

    pyacoustics.speech_detection.split_on_tone.splitFileOnTone()
    
  • Programmatically manipulate pitch or duration of a file:

    pyacoustics.morph.morph_utils.praat_pitch()
    
  • Mask speech with speech shaped noise:

    pyacoustics.speech_filters.speech_shaped_noise.batchMaskSpeakerData()
    
  • And more!

2   Major revisions

Ver 1.0 (June 7, 2015)

  • first public release.

3   Features as they are added

Mask speech with speech shaped noise (March 21, 2016)

Find syllable nuclei/estimate speech rate using Uwe Reichel's matlab code (July 29, 2015)

Find the valley bottom between peaks (July 7th, 2015)

4   Requirements

Many of the individual features require different packages. If you aren't using those packages then you don't need to install the dependencies.

pyacoustics.intensity_and_pitch.praat_pi requires praat

pyacoustics.intensity_and_pitch.get_f0 requires the ESPS getF0 function as implemented by Snack although I recall having difficulty installing it.

pyacoustics.speech_rate/dictionary_estimate.py requires my library psyle

pyacoustics.signals.data_fitting.py requires SciPy, NumPy, and scikit-learn

My praatIO library is used extensively and can be downloaded here

5   Installation

If you on Windows, you can use the installer found here (check that it is up to date though) Windows installer

PyAcoustics is on pypi and can be installed or upgraded from the command-line shell with pip like so:

python -m pip install pyacoustics --upgrade

Otherwise, to manually install, after downloading the source from github, from a command-line shell, navigate to the directory containing setup.py and type:

python setup.py install

If python is not in your path, you'll need to enter the full path e.g.:

C:\Python36\python.exe setup.py install

6   Example usage

See the example folders for a few real-world examples using this library.

  • examples/split_audio_on_silence.py

    Detects the presence of speech in a recording based on acoustic intensity. Everything louder than some threshold specified by the user is considered speech.

  • examples/split_audio_on_tone.py

    Detects the presence of pure tones in a recording. One can use this to automatically segment stimuli. Beeps can be played while the speech is being recorded and then later this tool can automatically segment the speech, based on the presence of those tones.

    Also detects speech using a pitch analysis. Most syllables contain some voicing, so a stream of modulating pitch values suggests that someone is speaking. This aspect is not extensively tested but it works well for the example files.

  • examples/estimate_speech_rate.py

    Calculates the speech rate through a matlab script written by Uwe Reichel that estimates the location of syllable boundaries.

7   Citing LMEDS

PyAcoustics is general purpose coding and doesn't need to be cited but if you would like to, it can be cited like so:

Tim Mahrt. PyAcoustics. https://github.com/timmahrt/pyAcoustics, 2016.

8   Acknowledgements

PyAcoustics is an ongoing collection of code with contributions from a number of projects worked on over several years. Development of various aspects of PyAcoustics was possible thanks to NSF grant IIS 07-03624 to Jennifer Cole and Mark Hasegawa-Johnson, NSF grant BCS 12-51343 to Jennifer Cole, Josรฉ Hualde, and Caroline Smith, and NSF grant IBSS SMA 14-16791 to Jennifer Cole, Nancy McElwain, and Daniel Berry.

Owner
Tim
I write tools for working with speech data.
Tim
Guide & Examples to create deeplearning gstreamer plugins and use them in your pipeline

upai-gst-dl-plugins Guide & Examples to create deeplearning gstreamer plugins and use them in your pipeline Introduction Thanks to the work done by @j

UPAI.IO 11 Dec 11, 2022
MelGAN test on audio decoding

Official repository for the paper MelGAN: Generative Adversarial Networks for Conditional Waveform Synthesis The original work URL: https://github.com

Jurio 1 Apr 29, 2022
A Python port and library-fication of the midicsv tool by John Walker.

A Python port and library-fication of the midicsv tool by John Walker. If you need to convert MIDI files to human-readable text files and back, this is the library for you.

Tim Wedde 52 Dec 29, 2022
Voice to Text using Raspberry Pi

This module will help to convert your voice (speech) into text using Speech Recognition Library. You can control the devices or you can perform the desired tasks by the word recognition

Raspberry_Pi Pakistan 2 Dec 15, 2021
nicfit 425 Jan 01, 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
L-SpEx: Localized Target Speaker Extraction

L-SpEx: Localized Target Speaker Extraction The data configuration and simulation of L-SpEx. The code scripts will be released in the future. Data Gen

Meng Ge 20 Jan 02, 2023
Hide Your Secret Message in any Wave Audio File.

HiddenWave Embedding secret messages in wave audio file What is HiddenWave Hiddenwave is a python based program for simple audio steganography. You ca

TechChip 99 Dec 28, 2022
Real-Time Spherical Microphone Renderer for binaural reproduction in Python

ReTiSAR Implementation of the Real-Time Spherical Microphone Renderer for binaural reproduction in Python [1][2]. Contents: | Requirements | Setup | Q

Division of Applied Acoustics at Chalmers University of Technology 51 Dec 17, 2022
Anaphones are like anagrams, but for sounds.

Anaphones Anaphones are like anagrams but for sounds (phonemes). Examples include: salami-awesomely, atari-tiara, and beefy-phoebe. Anaphones can be a

James Murphy 18 Nov 02, 2022
Mopidy is an extensible music server written in Python

Mopidy Mopidy is an extensible music server written in Python. Mopidy plays music from local disk, Spotify, SoundCloud, Google Play Music, and more. Y

Mopidy 7.6k Jan 05, 2023
The venturimeter works on the principle of Bernoulli's equation, i.e., the pressure decreases as the velocity increases.

The venturimeter works on the principle of Bernoulli's equation, i.e., the pressure decreases as the velocity increases. The cross-section of the throat is less than the cross-section of the inlet pi

Shankar Mahadevan L 1 Dec 03, 2021
Frescobaldi LilyPond Editor

README for Frescobaldi Homepage: http://www.frescobaldi.org/ Main author: Wilbert Berendsen Frescobaldi is a LilyPond sheet music text editor. It aims

Frescobaldi 600 Dec 29, 2022
๏ปฟ๏ปฟPythonic bindings for FFmpeg's libraries.

PyAV PyAV is a Pythonic binding for the FFmpeg libraries. We aim to provide all of the power and control of the underlying library, but manage the gri

PyAV 1.8k Jan 03, 2023
A python package for calculating the PESQ.

PyPESQ (WIP) Pypesq is a python wrapper for the PESQ score calculation C routine. It only can be used in evaluation purpose. INSTALL pip install https

Jingdong Li 269 Dec 18, 2022
Stream Music ๐ŸŽต ๐˜ผ ๐™—๐™ค๐™ฉ ๐™ฉ๐™๐™–๐™ฉ ๐™˜๐™–๐™ฃ ๐™ฅ๐™ก๐™–๐™ฎ ๐™ข๐™ช๐™จ๐™ž๐™˜ ๐™ค๐™ฃ ๐™๐™š๐™ก๐™š๐™œ๐™ง๐™–๐™ข ๐™‚๐™ง๐™ค๐™ช๐™ฅ ๐™–๐™ฃ๐™™ ๐˜พ๐™๐™–๐™ฃ๐™ฃ๐™š๐™ก ๐™‘๐™ค๐™ž๐™˜๐™š ๐˜พ๐™๐™–๐™ฉ๐™จ ๐˜ผ๐™ซ๐™–๐™ž๐™ก?

Stream Music ๐ŸŽต ๐˜ผ ๐™—๐™ค๐™ฉ ๐™ฉ๐™๐™–๐™ฉ ๐™˜๐™–๐™ฃ ๐™ฅ๐™ก๐™–๐™ฎ ๐™ข๐™ช๐™จ๐™ž๐™˜ ๐™ค๐™ฃ ๐™๐™š๐™ก๐™š๐™œ๐™ง๐™–๐™ข ๐™‚๐™ง๐™ค๐™ช๐™ฅ ๐™–๐™ฃ๐™™ ๐˜พ๐™๐™–๐™ฃ๐™ฃ๐™š๐™ก ๐™‘๐™ค๐™ž๐™˜๐™š ๐˜พ๐™๐™–๐™ฉ๐™จ ๐˜ผ๐™ซ๐™–๐™ž๐™ก?

Sadew Jayasekara 15 Nov 12, 2022
Basically Play Pauses the song when it is safe to do so. when you die in a round

Basically Play Pauses the song when it is safe to do so. when you die in a round

AG_1436 1 Feb 13, 2022
The project aims to develop a personal-assistant for Windows & Linux-based systems

The project aims to develop a personal-assistant for Windows & Linux-based systems. Samiksha draws its inspiration from virtual assistants like Cortana for Windows, and Siri for iOS. It has been desi

SHUBHANSHU RAI 1 Jan 16, 2022
Sequencer: Deep LSTM for Image Classification

Sequencer: Deep LSTM for Image Classification Created by Yuki Tatsunami Masato Taki This repository contains implementation for Sequencer. Abstract In

Yuki Tatsunami 111 Dec 16, 2022
Just-Music - Spotify API Driven Music Web app, that allows to listen and control and share songs

Just Music... Just Music Is A Web APP That Allows Users To Play Song Using Spoti

Ayush Mishra 3 May 01, 2022