paderbox


Namepaderbox JSON
Version 0.0.7 PyPI version JSON
download
home_pagehttps://github.com/fgnt/paderbox/
SummaryCollection of utilities in the department of communications engineering of the UPB
upload_time2024-06-17 11:21:25
maintainerNone
docs_urlNone
authorDepartment of Communications Engineering, Paderborn University
requires_pythonNone
licenseMIT
keywords audio speech
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # Paderbox: A collection of utilities for audio / speech processing

[![Build Status](https://dev.azure.com/fgnt/fgnt/_apis/build/status/fgnt.paderbox?branchName=master)](https://dev.azure.com/fgnt/fgnt/_build/latest?definitionId=2&branchName=master)
[![Azure DevOps tests](https://img.shields.io/azure-devops/tests/fgnt/fgnt/2/master)](https://dev.azure.com/fgnt/fgnt/_build/latest?definitionId=2&branchName=master)
[![Azure DevOps coverage](https://img.shields.io/azure-devops/coverage/fgnt/fgnt/2/master)](https://dev.azure.com/fgnt/fgnt/_build/latest?definitionId=2&branchName=master)
[![MIT License](https://img.shields.io/badge/license-MIT-blue.svg)](https://raw.githubusercontent.com/fgnt/paderbox/master/LICENSE)

This repository started in late 2014 as an internal development repository for the [Communications Engineering Group](https://ei.uni-paderborn.de/nt/) at Paderborn University, Germany.
Over the years it emerged to a collection of [IO helper](https://github.com/fgnt/paderbox/tree/master/paderbox/io), [feature extraction](https://github.com/fgnt/paderbox/tree/master/paderbox/transform) modules and numerous smaller tools adding functionality to Numpy, Pandas, and others.

The main purpose here is to limit code duplication across our [other public repositories](https://github.com/fgnt).

We ensured that most functions/ classes contain Python Docstrings such that automatic tooltips for most functions are supported.
It was deliberately decided against a lengthy documentation: most emphasis is put on the Python Docstrings and code readability itself.


# Examples
Without going through all functions, we here select two examples which demonstrate why we rely on this very implementation.


## Short-time Fourier transform

The Short-time Fourier transform (STFT) is a widely used feature extraction method when dealing with time series such as audio/ speech.
Most repositories, including Deep Learning frameworks such as TensorFlow, provide an STFT implementation.
However, it is rarely seen, that these implementations allow an exact reconstruction when applying the STFT followed by an inverse STFT.

Two important issues often overseen are:
- How do I need to calculate the biorthogonal reconstruction window when using *any* STFT window function?
- How much padding depeding on STFT window length, DFT length, and shift is needed to compensate for fade-in, fade-out, and uneven signal length?

Our [STFT implementation](https://github.com/fgnt/paderbox/blob/master/paderbox/transform/module_stft.py) addresses aforementioned issues, can operate on any number of independent dimensions and is already battle tested in our publications on audio/ speech since 2015.
Numerous [STFT tests](https://github.com/fgnt/paderbox/blob/master/tests/transform_tests/test_stft.py) ensure that the code remains stable and in particular test for the aforementioned problems.

## Fast access to the IPython audio player

The function `paderbox.play.play()` is a somewhat elaborated wrapper around `IPython.display.Audio`.
A single function allows to play audio from the waveform, from the STFT signal, and from file.
It therefore serves as a great tool within Jupyter Notebooks and helps for quick inspection of simulation results.

# Installation
Install it from PyPI with pip
```bash
pip install paderbox[all]
```
The `[all]` flag is optional and indicates to install all dependencies.
Remove it, when you want to have the minimal dependencies.

Alternatively, you can clone this repository and install it as follows
```bash
git clone https://github.com/fgnt/paderbox.git
cd paderbox
pip install --editable .[all]
```

# How to cite?

There is no clear way how to cite this repository for research.
However, we would be grateful for direct imports from this repository if you use, e.g., the STFT.
We are also fine when you copy the code as long as it remains visible where you copied the code from.

If you use one of our other repositories relying on this work we would be thankful if you respect citation hints for that repository.

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/fgnt/paderbox/",
    "name": "paderbox",
    "maintainer": null,
    "docs_url": null,
    "requires_python": null,
    "maintainer_email": null,
    "keywords": "audio speech",
    "author": "Department of Communications Engineering, Paderborn University",
    "author_email": "sek@nt.upb.de",
    "download_url": "https://files.pythonhosted.org/packages/74/6d/0fc6f53a28e57118db5d3c3a4f26d828ad3cb523ccfaaa621a15ec7991e4/paderbox-0.0.7.tar.gz",
    "platform": null,
    "description": "# Paderbox: A collection of utilities for audio / speech processing\n\n[![Build Status](https://dev.azure.com/fgnt/fgnt/_apis/build/status/fgnt.paderbox?branchName=master)](https://dev.azure.com/fgnt/fgnt/_build/latest?definitionId=2&branchName=master)\n[![Azure DevOps tests](https://img.shields.io/azure-devops/tests/fgnt/fgnt/2/master)](https://dev.azure.com/fgnt/fgnt/_build/latest?definitionId=2&branchName=master)\n[![Azure DevOps coverage](https://img.shields.io/azure-devops/coverage/fgnt/fgnt/2/master)](https://dev.azure.com/fgnt/fgnt/_build/latest?definitionId=2&branchName=master)\n[![MIT License](https://img.shields.io/badge/license-MIT-blue.svg)](https://raw.githubusercontent.com/fgnt/paderbox/master/LICENSE)\n\nThis repository started in late 2014 as an internal development repository for the [Communications Engineering Group](https://ei.uni-paderborn.de/nt/) at Paderborn University, Germany.\nOver the years it emerged to a collection of [IO helper](https://github.com/fgnt/paderbox/tree/master/paderbox/io), [feature extraction](https://github.com/fgnt/paderbox/tree/master/paderbox/transform) modules and numerous smaller tools adding functionality to Numpy, Pandas, and others.\n\nThe main purpose here is to limit code duplication across our [other public repositories](https://github.com/fgnt).\n\nWe ensured that most functions/ classes contain Python Docstrings such that automatic tooltips for most functions are supported.\nIt was deliberately decided against a lengthy documentation: most emphasis is put on the Python Docstrings and code readability itself.\n\n\n# Examples\nWithout going through all functions, we here select two examples which demonstrate why we rely on this very implementation.\n\n\n## Short-time Fourier transform\n\nThe Short-time Fourier transform (STFT) is a widely used feature extraction method when dealing with time series such as audio/ speech.\nMost repositories, including Deep Learning frameworks such as TensorFlow, provide an STFT implementation.\nHowever, it is rarely seen, that these implementations allow an exact reconstruction when applying the STFT followed by an inverse STFT.\n\nTwo important issues often overseen are:\n- How do I need to calculate the biorthogonal reconstruction window when using *any* STFT window function?\n- How much padding depeding on STFT window length, DFT length, and shift is needed to compensate for fade-in, fade-out, and uneven signal length?\n\nOur [STFT implementation](https://github.com/fgnt/paderbox/blob/master/paderbox/transform/module_stft.py) addresses aforementioned issues, can operate on any number of independent dimensions and is already battle tested in our publications on audio/ speech since 2015.\nNumerous [STFT tests](https://github.com/fgnt/paderbox/blob/master/tests/transform_tests/test_stft.py) ensure that the code remains stable and in particular test for the aforementioned problems.\n\n## Fast access to the IPython audio player\n\nThe function `paderbox.play.play()` is a somewhat elaborated wrapper around `IPython.display.Audio`.\nA single function allows to play audio from the waveform, from the STFT signal, and from file.\nIt therefore serves as a great tool within Jupyter Notebooks and helps for quick inspection of simulation results.\n\n# Installation\nInstall it from PyPI with pip\n```bash\npip install paderbox[all]\n```\nThe `[all]` flag is optional and indicates to install all dependencies.\nRemove it, when you want to have the minimal dependencies.\n\nAlternatively, you can clone this repository and install it as follows\n```bash\ngit clone https://github.com/fgnt/paderbox.git\ncd paderbox\npip install --editable .[all]\n```\n\n# How to cite?\n\nThere is no clear way how to cite this repository for research.\nHowever, we would be grateful for direct imports from this repository if you use, e.g., the STFT.\nWe are also fine when you copy the code as long as it remains visible where you copied the code from.\n\nIf you use one of our other repositories relying on this work we would be thankful if you respect citation hints for that repository.\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "Collection of utilities in the department of communications engineering of the UPB",
    "version": "0.0.7",
    "project_urls": {
        "Homepage": "https://github.com/fgnt/paderbox/"
    },
    "split_keywords": [
        "audio",
        "speech"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "746d0fc6f53a28e57118db5d3c3a4f26d828ad3cb523ccfaaa621a15ec7991e4",
                "md5": "d2f933400843ed450047a38831a6af05",
                "sha256": "00fb708e654609ef5890acc2e048cf3f73dee0f73d39878ac6a48ff0f901ae0f"
            },
            "downloads": -1,
            "filename": "paderbox-0.0.7.tar.gz",
            "has_sig": false,
            "md5_digest": "d2f933400843ed450047a38831a6af05",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 228792,
            "upload_time": "2024-06-17T11:21:25",
            "upload_time_iso_8601": "2024-06-17T11:21:25.572776Z",
            "url": "https://files.pythonhosted.org/packages/74/6d/0fc6f53a28e57118db5d3c3a4f26d828ad3cb523ccfaaa621a15ec7991e4/paderbox-0.0.7.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-06-17 11:21:25",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "fgnt",
    "github_project": "paderbox",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "paderbox"
}
        
Elapsed time: 2.86025s