Package: pyacoustics
pyAcousticsA collection of python scripts for extracting and analyzing acoustics from audio files.Table of contentsCommon use casesVersion historyRequirementsInstallationExample usageCiting pyAcousticsAcknowledgementsCommon Use CasesWhat 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!Version historyPraatio uses semantic versioning (Major.Minor.Patch)Please viewCHANGELOG.mdfor version history.RequirementsMany 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 requirespraatpyacoustics.intensity_and_pitch.get_f0 requires the ESPS getF0 function as implemented
bySnackalthough I recall having difficulty
installing it.pyacoustics.speech_rate/dictionary_estimate.py requires my librarypsylepyacoustics.signals.data_fitting.py requiresSciPy,NumPy, andscikit-learnMy praatIO library is used extensively and can be downloadedhereInstallationPyAcoustics is on pypi and can be installed or upgraded from the command-line shell with pip like so::python -m pip install pyacoustics --upgradeOtherwise, 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 installIf python is not in your path, you'll need to enter the full path e.g.::C:\Python36\python.exe setup.py installExample usageSee the example folders for a few real-world examples using this library.examples/split_audio_on_silence.pyDetects 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.pyDetects 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.pyCalculates the speech rate through a matlab script written byUwe Reichelthat estimates the location of syllable boundaries.Citing PyAcousticsPyAcoustics 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.AcknowledgementsPyAcoustics 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 grantIIS 07-03624to Jennifer Cole and Mark Hasegawa-Johnson,
NSF grant BCS12-51343to Jennifer Cole, José Hualde, and Caroline Smith, and
NSF grantIBSS SMA 14-16791to Jennifer Cole, Nancy McElwain, and Daniel Berry.