pyacoustics


Namepyacoustics JSON
Version 2.0.0 PyPI version JSON
download
home_pagehttps://github.com/timmahrt/pyAcoustics
SummaryA collection of python scripts for extracting and analyzing acoustics from audio files.
upload_time2023-07-15 16:23:10
maintainer
docs_urlNone
authorTim Mahrt
requires_python>3.6.0
licenseLICENSE
keywords
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            
# pyAcoustics

[![](https://img.shields.io/badge/license-MIT-blue.svg?)](http://opensource.org/licenses/MIT)

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

# Table of contents
1. [Common use cases](#common-use-cases)
2. [Version history](#version-history)
3. [Requirements](#requirements)
4. [Installation](#installation)
5. [Example usage](#example-usage)
6. [Citing pyAcoustics](#citing-pyacoustics)
7. [Acknowledgements](#acknowledgements)

## 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!


## Version history

*Praatio uses semantic versioning (Major.Minor.Patch)*

Please view [CHANGELOG.md](<https://github.com/timmahrt/pyAcoustics/blob/main/CHANGELOG.md>) for version history.


## 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](<http://www.fon.hum.uva.nl/praat/>)

pyacoustics.intensity_and_pitch.get_f0 requires the ESPS getF0 function as implemented 
by [Snack](<http://www.speech.kth.se/snack/>) although I recall having difficulty 
installing it.

pyacoustics.speech_rate/dictionary_estimate.py requires my library 
[psyle](<https://github.com/timmahrt/pysle>)

pyacoustics.signals.data_fitting.py requires
[SciPy](<http://www.scipy.org/>),
[NumPy](<http://www.numpy.org/>), and
[scikit-learn](<http://scikit-learn.org/>)

My praatIO library is used extensively and can be downloaded 
[here](<https://github.com/timmahrt/praatIO>)


## Installation

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

    
## 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](<http://www.phonetik.uni-muenchen.de/~reichelu/>)
    that estimates the location of syllable boundaries.

## Citing PyAcoustics

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.


## 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.



            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/timmahrt/pyAcoustics",
    "name": "pyacoustics",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">3.6.0",
    "maintainer_email": "",
    "keywords": "",
    "author": "Tim Mahrt",
    "author_email": "timmahrt@gmail.com",
    "download_url": "https://files.pythonhosted.org/packages/8a/c3/7587965d2149467a83b69e9d2ecf2ad729950034cf74e7850aec19ce7fae/pyacoustics-2.0.0.tar.gz",
    "platform": null,
    "description": "\n# pyAcoustics\n\n[![](https://img.shields.io/badge/license-MIT-blue.svg?)](http://opensource.org/licenses/MIT)\n\nA collection of python scripts for extracting and analyzing acoustics from audio files.\n\n# Table of contents\n1. [Common use cases](#common-use-cases)\n2. [Version history](#version-history)\n3. [Requirements](#requirements)\n4. [Installation](#installation)\n5. [Example usage](#example-usage)\n6. [Citing pyAcoustics](#citing-pyacoustics)\n7. [Acknowledgements](#acknowledgements)\n\n## Common Use Cases\n\nWhat can you do with this library?\n\n- Extract pitch and intensity::\n\n    pyacoustics.intensity_and_pitch.praat_pi.getPraatPitchAndIntensity()\n\n- Extract segments of a wav file::\n\n    pyacoustics.signals.audio_scripts.getSubwav()\n\n- Perform simple manipulations on wav files::\n\n    pyacoustics.signals.resampleAudio()\n\n    pyacoustics.signals.splitStereoAudio()\n\n- Split audio files on segments of silence or on pure tones::\n\n    pyacoustics.speech_detection.split_on_tone.splitFileOnTone()\n\n- Programmatically manipulate pitch or duration of a file::\n\n    pyacoustics.morph.morph_utils.praat_pitch()\n    \n- Mask speech with speech shaped noise::\n\n    pyacoustics.speech_filters.speech_shaped_noise.batchMaskSpeakerData()\n\n- And more!\n\n\n## Version history\n\n*Praatio uses semantic versioning (Major.Minor.Patch)*\n\nPlease view [CHANGELOG.md](<https://github.com/timmahrt/pyAcoustics/blob/main/CHANGELOG.md>) for version history.\n\n\n## Requirements\n\nMany of the individual features require different packages.  If you aren't using those\npackages then you don't need to install the dependencies.\n\npyacoustics.intensity_and_pitch.praat_pi requires \n[praat](<http://www.fon.hum.uva.nl/praat/>)\n\npyacoustics.intensity_and_pitch.get_f0 requires the ESPS getF0 function as implemented \nby [Snack](<http://www.speech.kth.se/snack/>) although I recall having difficulty \ninstalling it.\n\npyacoustics.speech_rate/dictionary_estimate.py requires my library \n[psyle](<https://github.com/timmahrt/pysle>)\n\npyacoustics.signals.data_fitting.py requires\n[SciPy](<http://www.scipy.org/>),\n[NumPy](<http://www.numpy.org/>), and\n[scikit-learn](<http://scikit-learn.org/>)\n\nMy praatIO library is used extensively and can be downloaded \n[here](<https://github.com/timmahrt/praatIO>)\n\n\n## Installation\n\nPyAcoustics is on pypi and can be installed or upgraded from the command-line shell with pip like so::\n\n    python -m pip install pyacoustics --upgrade\n\nOtherwise, to manually install, after downloading the source from github, from a command-line shell, navigate to the directory containing setup.py and type::\n\n    python setup.py install\n\nIf python is not in your path, you'll need to enter the full path e.g.::\n\n\tC:\\Python36\\python.exe setup.py install\n\n    \n## Example usage\n\nSee the example folders for a few real-world examples using this library.\n\n- examples/split_audio_on_silence.py\n\n    Detects the presence of speech in a recording based on acoustic \n    intensity.  Everything louder than some threshold specified by\n    the user is considered speech.\n    \n- examples/split_audio_on_tone.py\n\n    Detects the presence of pure tones in a recording.  One can use\n    this to automatically segment stimuli.  Beeps can be played while\n    the speech is being recorded and then later this tool can\n    automatically segment the speech, based on the presence of those\n    tones.\n    \n    Also detects speech using a pitch analysis.  Most syllables\n    contain some voicing, so a stream of modulating pitch values\n    suggests that someone is speaking.  This aspect is not extensively\n    tested but it works well for the example files.\n\n- examples/estimate_speech_rate.py\n\n    Calculates the speech rate through a matlab script written by\n    [Uwe Reichel](<http://www.phonetik.uni-muenchen.de/~reichelu/>)\n    that estimates the location of syllable boundaries.\n\n## Citing PyAcoustics\n\nPyAcoustics is general purpose coding and doesn't need to be cited\nbut if you would like to, it can be cited like so:\n\nTim Mahrt. PyAcoustics. https://github.com/timmahrt/pyAcoustics, 2016.\n\n\n## Acknowledgements\n\nPyAcoustics is an ongoing collection of code with contributions from a\nnumber of projects worked on over several years.  Development of various\naspects of PyAcoustics was possible thanks to\nNSF grant **IIS 07-03624**\nto Jennifer Cole and Mark Hasegawa-Johnson,\nNSF grant BCS **12-51343**\nto Jennifer Cole, Jos\u00e9 Hualde, and Caroline Smith, and\nNSF grant\n**IBSS SMA 14-16791** to Jennifer Cole, Nancy McElwain, and Daniel Berry.\n\n\n",
    "bugtrack_url": null,
    "license": "LICENSE",
    "summary": "A collection of python scripts for extracting and analyzing acoustics from audio files.",
    "version": "2.0.0",
    "project_urls": {
        "Homepage": "https://github.com/timmahrt/pyAcoustics"
    },
    "split_keywords": [],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "73812002f7c6d084c8ec33802a97e1e10f848375ce67d41d96ff7d741da01933",
                "md5": "38ec194a8bdf3bac19d000842b231a86",
                "sha256": "39459bd64fe08f33403d14ef2c1efcc41d87427d2ff84482f69e180938e4a338"
            },
            "downloads": -1,
            "filename": "pyacoustics-2.0.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "38ec194a8bdf3bac19d000842b231a86",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">3.6.0",
            "size": 37438,
            "upload_time": "2023-07-15T16:23:08",
            "upload_time_iso_8601": "2023-07-15T16:23:08.449920Z",
            "url": "https://files.pythonhosted.org/packages/73/81/2002f7c6d084c8ec33802a97e1e10f848375ce67d41d96ff7d741da01933/pyacoustics-2.0.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "8ac37587965d2149467a83b69e9d2ecf2ad729950034cf74e7850aec19ce7fae",
                "md5": "e2d7c7ce0a9291dcbd48a47593aa59f9",
                "sha256": "10803dd348b901b44213050cd98714c3a6429f6f00c092ad8ae7593d9008a26b"
            },
            "downloads": -1,
            "filename": "pyacoustics-2.0.0.tar.gz",
            "has_sig": false,
            "md5_digest": "e2d7c7ce0a9291dcbd48a47593aa59f9",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">3.6.0",
            "size": 29047,
            "upload_time": "2023-07-15T16:23:10",
            "upload_time_iso_8601": "2023-07-15T16:23:10.394276Z",
            "url": "https://files.pythonhosted.org/packages/8a/c3/7587965d2149467a83b69e9d2ecf2ad729950034cf74e7850aec19ce7fae/pyacoustics-2.0.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-07-15 16:23:10",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "timmahrt",
    "github_project": "pyAcoustics",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "lcname": "pyacoustics"
}
        
Elapsed time: 0.23872s