Skip to main content

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

Project description


.. image::

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

.. sectnum::
.. contents::

Common Use Cases

What can you do with this library?

- Extract pitch and intensity::


- Extract segments of a wav file::


- Perform simple manipulations on wav files::



- Split audio files on segments of silence or on pure tones::


- Programmatically manipulate pitch or duration of a file::


- Mask speech with speech shaped noise::


- And more!

Major revisions

Ver 1.0 (June 7, 2015)

- first public release.

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)


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/ requires my library
`psyle <>`_ requires
`SciPy <>`_,
`NumPy <>`_, and
`scikit-learn <>`_

My praatIO library is used extensively and can be downloaded
`here <>`_


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 and type::

python install

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

C:\Python36\python.exe install

Example usage

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

- examples/

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/

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

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/

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

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., 2016.


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.

Project details

Release history Release notifications

Download files

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

Filename, size & hash SHA256 hash help File type Python version Upload date
pyacoustics-1.0.1-py2.py3-none-any.whl (52.3 kB) Copy SHA256 hash SHA256 Wheel py2.py3

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN SignalFx SignalFx Supporter DigiCert DigiCert EV certificate StatusPage StatusPage Status page