mindaudio


Namemindaudio JSON
Version 0.3.0 PyPI version JSON
download
home_pagehttps://github.com/mindspore-lab/mindaudio
SummaryA toolbox of audio models and algorithms based on MindSpore.
upload_time2024-01-26 08:44:23
maintainer
docs_urlNone
authorMindSpore Lab
requires_python>=3.8
licenseApache Software License 2.0
keywords
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            <div align="center">


# MindAudio

[![GitHub Workflow Status](https://img.shields.io/github/actions/workflow/status/mindspore-lab/mindaudio/ut_test.yaml)
![GitHub issues](https://img.shields.io/github/issues/mindspore-lab/mindaudio)
![GitHub pull requests](https://img.shields.io/github/issues-pr/mindspore-lab/mindaudio)
![GitHub](https://img.shields.io/github/license/mindspore-lab/mindaudio)](<img alt="GitHub" src="https://img.shields.io/github/license/mindspore-lab/mindaudio">)
[![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black)
[![Imports: isort](https://img.shields.io/badge/%20imports-isort-%231674b1?style=flat&labelColor=ef8336)](https://pycqa.github.io/isort/)

[Introduction](#introduction) |
[Installation](#installation) |
[Get Started](#get-started)

</div>

## Introduction

MindAudio is a toolbox of audio models and algorithms based on [MindSpore](https://www.mindspore.cn/). It provides a series of API for common audio data processing,data enhancement,feature extraction, so that users can preprocess data conveniently. Also provides examples to show how to build audio deep learning models with mindaudio.

### data processing


```python
# read audio
>>> import mindaudio.data.io as io
>>> audio_data, sr = io.read(data_file)
# feature extraction
>>> import mindaudio.data.features as features
>>> feats = features.fbanks(audio_data)
```

## Installation

### Install with PyPI

The released version of MindAudio can be installed via `PyPI` as follows:

```shell
pip install mindaudio
```

### Install from Source

The latest version of MindAudio can be installed as follows:

```shell
git clone https://github.com/mindspore-lab/mindaudio.git
cd mindaudio
pip install -r requirements/requirements.txt
python setup.py install
```

## Get started with audio data analysis

###

mindaudio provides a series of commonly used audio data processing apis, which can be easily invoked for data analysis and feature extraction.

```python
>>> import mindaudio.data.io as io
>>> import mindaudio.data.spectrum as spectrum
>>> import numpy as np
>>> import matplotlib.pyplot as plt
# read audio
>>> audio_data, sr = io.read("./tests/samples/ASR/BAC009S0002W0122.wav")
# feature extraction
>>> n_fft = 512
>>> matrix = spectrum.stft(audio_data, n_fft=n_fft)
>>> magnitude, _ = spectrum.magphase(matrix, 1)
# display
>>> x = [i for i in range(0, 256*750, 256)]
>>> f = [i/n_fft * sr for i in range(0, int(n_fft/2+1))]
>>> plt.pcolormesh(x,f,magnitude, shading='gouraud', vmin=0, vmax=np.percentile(magnitude, 98))
>>> plt.title('STFT Magnitude')
>>> plt.ylabel('Frequency [Hz]')
>>> plt.xlabel('Time [sec]')
>>> plt.show()
```

Result presentation:

![image-20230310165349460](https://raw.githubusercontent.com/mindspore-lab/mindaudio/main/tests/result/stft_magnitude.png)

## What's New
- 2023/06/24: version 0.1.1, bug fix and readme update
- 2023/03/30: version 0.1.0, including 50+ data processing APIs, 5 models supported.
- 2022/09/30: beta, 33 data APIs + 3 models

## Contributing

We appreciate all contributions to improve MindSpore Audio. Please refer to [CONTRIBUTING.md](CONTRIBUTING.md) for the contributing guideline.

## License

This project is released under the [Apache License 2.0](LICENSE).

## Citation

If you find this project useful in your research, please consider citing:

```latex
@misc{MindSpore Audio 2022,
    title={{MindSpore Audio}:MindSpore Audio Toolbox and Benchmark},
    author={MindSpore Audio Contributors},
    howpublished = {\url{https://github.com/mindspore-lab/mindaudio}},
    year={2022}
}
```

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/mindspore-lab/mindaudio",
    "name": "mindaudio",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.8",
    "maintainer_email": "",
    "keywords": "",
    "author": "MindSpore Lab",
    "author_email": "mindspore-lab@example.com",
    "download_url": "https://files.pythonhosted.org/packages/a2/48/26a6fdce982e412f16c6b453eb973680bc9aa6aef15452a4fbe407eb27cd/mindaudio-0.3.0.tar.gz",
    "platform": null,
    "description": "<div align=\"center\">\n\n\n# MindAudio\n\n[![GitHub Workflow Status](https://img.shields.io/github/actions/workflow/status/mindspore-lab/mindaudio/ut_test.yaml)\n![GitHub issues](https://img.shields.io/github/issues/mindspore-lab/mindaudio)\n![GitHub pull requests](https://img.shields.io/github/issues-pr/mindspore-lab/mindaudio)\n![GitHub](https://img.shields.io/github/license/mindspore-lab/mindaudio)](<img alt=\"GitHub\" src=\"https://img.shields.io/github/license/mindspore-lab/mindaudio\">)\n[![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black)\n[![Imports: isort](https://img.shields.io/badge/%20imports-isort-%231674b1?style=flat&labelColor=ef8336)](https://pycqa.github.io/isort/)\n\n[Introduction](#introduction) |\n[Installation](#installation) |\n[Get Started](#get-started)\n\n</div>\n\n## Introduction\n\nMindAudio is a toolbox of audio models and algorithms based on [MindSpore](https://www.mindspore.cn/). It provides a series of API for common audio data processing,data enhancement,feature extraction, so that users can preprocess data conveniently. Also provides examples to show how to build audio deep learning models with mindaudio.\n\n### data processing\n\n\n```python\n# read audio\n>>> import mindaudio.data.io as io\n>>> audio_data, sr = io.read(data_file)\n# feature extraction\n>>> import mindaudio.data.features as features\n>>> feats = features.fbanks(audio_data)\n```\n\n## Installation\n\n### Install with PyPI\n\nThe released version of MindAudio can be installed via `PyPI` as follows:\n\n```shell\npip install mindaudio\n```\n\n### Install from Source\n\nThe latest version of MindAudio can be installed as follows:\n\n```shell\ngit clone https://github.com/mindspore-lab/mindaudio.git\ncd mindaudio\npip install -r requirements/requirements.txt\npython setup.py install\n```\n\n## Get started with audio data analysis\n\n###\n\nmindaudio provides a series of commonly used audio data processing apis, which can be easily invoked for data analysis and feature extraction.\n\n```python\n>>> import mindaudio.data.io as io\n>>> import mindaudio.data.spectrum as spectrum\n>>> import numpy as np\n>>> import matplotlib.pyplot as plt\n# read audio\n>>> audio_data, sr = io.read(\"./tests/samples/ASR/BAC009S0002W0122.wav\")\n# feature extraction\n>>> n_fft = 512\n>>> matrix = spectrum.stft(audio_data, n_fft=n_fft)\n>>> magnitude, _ = spectrum.magphase(matrix, 1)\n# display\n>>> x = [i for i in range(0, 256*750, 256)]\n>>> f = [i/n_fft * sr for i in range(0, int(n_fft/2+1))]\n>>> plt.pcolormesh(x,f,magnitude, shading='gouraud', vmin=0, vmax=np.percentile(magnitude, 98))\n>>> plt.title('STFT Magnitude')\n>>> plt.ylabel('Frequency [Hz]')\n>>> plt.xlabel('Time [sec]')\n>>> plt.show()\n```\n\nResult presentation:\n\n![image-20230310165349460](https://raw.githubusercontent.com/mindspore-lab/mindaudio/main/tests/result/stft_magnitude.png)\n\n## What's New\n- 2023/06/24: version 0.1.1, bug fix and readme update\n- 2023/03/30: version 0.1.0, including 50+ data processing APIs, 5 models supported.\n- 2022/09/30: beta, 33 data APIs + 3 models\n\n## Contributing\n\nWe appreciate all contributions to improve MindSpore Audio. Please refer to [CONTRIBUTING.md](CONTRIBUTING.md) for the contributing guideline.\n\n## License\n\nThis project is released under the [Apache License 2.0](LICENSE).\n\n## Citation\n\nIf you find this project useful in your research, please consider citing:\n\n```latex\n@misc{MindSpore Audio 2022,\n    title={{MindSpore Audio}:MindSpore Audio Toolbox and Benchmark},\n    author={MindSpore Audio Contributors},\n    howpublished = {\\url{https://github.com/mindspore-lab/mindaudio}},\n    year={2022}\n}\n```\n",
    "bugtrack_url": null,
    "license": "Apache Software License 2.0",
    "summary": "A toolbox of audio models and algorithms based on MindSpore.",
    "version": "0.3.0",
    "project_urls": {
        "Homepage": "https://github.com/mindspore-lab/mindaudio",
        "Issue Tracker": "https://github.com/mindspore-lab/mindaudio/issues",
        "Sources": "https://github.com/mindspore-lab/mindaudio"
    },
    "split_keywords": [],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "0b082651ef3dbf670e298ee785d7c915f94893d571e62c7b030e2f7e9de66ebf",
                "md5": "97320ef378402b3f00fc86ea596203a4",
                "sha256": "5e24f2f84f17be1588beaa65278c6b9c48c34277912060285de9c125de4cfa67"
            },
            "downloads": -1,
            "filename": "mindaudio-0.3.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "97320ef378402b3f00fc86ea596203a4",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.8",
            "size": 144059,
            "upload_time": "2024-01-26T08:44:21",
            "upload_time_iso_8601": "2024-01-26T08:44:21.116130Z",
            "url": "https://files.pythonhosted.org/packages/0b/08/2651ef3dbf670e298ee785d7c915f94893d571e62c7b030e2f7e9de66ebf/mindaudio-0.3.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "a24826a6fdce982e412f16c6b453eb973680bc9aa6aef15452a4fbe407eb27cd",
                "md5": "5fde9fc5dcb2b11e71e10e615e2b2177",
                "sha256": "34896941f1f163739e64a588c9070ec7253056f8172a68eaccecaf3efbaa14ba"
            },
            "downloads": -1,
            "filename": "mindaudio-0.3.0.tar.gz",
            "has_sig": false,
            "md5_digest": "5fde9fc5dcb2b11e71e10e615e2b2177",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.8",
            "size": 125413,
            "upload_time": "2024-01-26T08:44:23",
            "upload_time_iso_8601": "2024-01-26T08:44:23.144547Z",
            "url": "https://files.pythonhosted.org/packages/a2/48/26a6fdce982e412f16c6b453eb973680bc9aa6aef15452a4fbe407eb27cd/mindaudio-0.3.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-01-26 08:44:23",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "mindspore-lab",
    "github_project": "mindaudio",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "requirements": [],
    "lcname": "mindaudio"
}
        
Elapsed time: 0.18194s