{ "info": { "author": "Tim Sainburg", "author_email": "", "bugtrack_url": null, "classifiers": [ "Intended Audience :: Science/Research", "License :: OSI Approved :: BSD License", "Operating System :: OS Independent", "Programming Language :: Python :: 3", "Topic :: Education", "Topic :: Scientific/Engineering" ], "description": "[](https://travis-ci.com/timsainb/noisereduce)\n[](https://coveralls.io/github/timsainb/noisereduce?branch=master)\n[](https://mybinder.org/v2/gh/timsainb/noisereduce/master?filepath=notebooks%2F1.0-test-noise-reduction.ipynb)\n[](https://badge.fury.io/py/noisereduce)\n[](https://zenodo.org/badge/latestdoi/174219582)\n\n\n# Noise reduction in python using spectral gating\n- This algorithm is based (but not completely reproducing) on the one [outlined by Audacity](https://wiki.audacityteam.org/wiki/How_Audacity_Noise_Reduction_Works) for the **noise reduction effect** ([Link to C++ code](https://github.com/audacity/audacity/blob/master/src/effects/NoiseReduction.cpp))\n- The algorithm requires two inputs: \n 1. A *noise* audio clip comtaining prototypical noise of the audio clip\n 2. A *signal* audio clip containing the signal and the noise intended to be removed\n\n## Steps of algorithm\n1. An FFT is calculated over the noise audio clip\n2. Statistics are calculated over FFT of the the noise (in frequency)\n3. A threshold is calculated based upon the statistics of the noise (and the desired sensitivity of the algorithm) \n4. An FFT is calculated over the signal\n5. A mask is determined by comparing the signal FFT to the threshold\n6. The mask is smoothed with a filter over frequency and time\n7. The mask is appled to the FFT of the signal, and is inverted\n\n## Installation\n`pip install noisereduce`\n\n*noisereduce optionally uses Tensorflow as a backend to speed up FFT and gaussian convolution. It is not listed in the requirements.txt so because (1) it is optional and (2) tensorflow-gpu and tensorflow (cpu) are both compatible with this package. The package requires Tensorflow 2+ for all tensorflow operations.* \n\n## Usage\n(see notebooks)\n\n```\nimport noisereduce as nr\n# load data\nrate, data = wavfile.read(\"mywav.wav\")\n# select section of data that is noise\nnoisy_part = data[10000:15000]\n# perform noise reduction\nreduced_noise = nr.reduce_noise(audio_clip=data, noise_clip=noisy_part, verbose=True)\n```\n\n### Arguments to `noise_reduce`\n```\nn_grad_freq (int): how many frequency channels to smooth over with the mask.\nn_grad_time (int): how many time channels to smooth over with the mask.\nn_fft (int): number audio of frames between STFT columns.\nwin_length (int): Each frame of audio is windowed by `window()`. The window will be of length `win_length` and then padded with zeros to match `n_fft`..\nhop_length (int):number audio of frames between STFT columns.\nn_std_thresh (int): how many standard deviations louder than the mean dB of the noise (at each frequency level) to be considered signal\nprop_decrease (float): To what extent should you decrease noise (1 = all, 0 = none)\npad_clipping (bool): Pad the signals with zeros to ensure that the reconstructed data is equal length to the data\n use_tensorflow (bool): Use tensorflow as a backend for convolution and fft to speed up computation\nverbose (bool): Whether to plot the steps of the algorithm\n```\n
\n
\n
Project based on the cookiecutter data science project template. #cookiecutterdatascience
\n\n\n", "description_content_type": "text/markdown", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/timsainb/noisereduce", "keywords": "", "license": "MIT", "maintainer": "", "maintainer_email": "", "name": "noisereduce", "package_url": "https://pypi.org/project/noisereduce/", "platform": "", "project_url": "https://pypi.org/project/noisereduce/", "project_urls": { "Homepage": "https://github.com/timsainb/noisereduce" }, "release_url": "https://pypi.org/project/noisereduce/1.0.1/", "requires_dist": [ "scipy", "matplotlib", "librosa", "numpy", "tqdm", "tensorflow (>=2.0) ; extra == 'tensorflow'" ], "requires_python": "", "summary": "Noise reduction using Spectral Gating in python", "version": "1.0.1" }, "last_serial": 5387634, "releases": { "0.1.0": [ { "comment_text": "", "digests": { "md5": "1730b25f17802887399af0f53669c110", "sha256": "1854b4dbe1a1764756289817397745053762bfc6fdc173de6d1e0a07831cf85c" }, "downloads": -1, "filename": "noisereduce-0.1.0-py3-none-any.whl", "has_sig": false, "md5_digest": "1730b25f17802887399af0f53669c110", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 5426, "upload_time": "2019-03-06T21:47:29", "url": "https://files.pythonhosted.org/packages/5c/48/11d6b1196dab0b967adb9f87b360d78db32d3bbbc636e243715f7ec09ed3/noisereduce-0.1.0-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "b44604a96fb097bbedf3be72383a50ae", "sha256": "5e23fbe6e5ffb8ba8e1c1e497243f9a7a99c32fe34ad9a918d28daa7209e7cee" }, "downloads": -1, "filename": "noisereduce-0.1.0.tar.gz", "has_sig": false, "md5_digest": "b44604a96fb097bbedf3be72383a50ae", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4470, "upload_time": "2019-03-06T21:47:31", "url": "https://files.pythonhosted.org/packages/c5/77/47583fb6eb57c5d1d9c807e31e3be29464064374929919020eee81c17eb9/noisereduce-0.1.0.tar.gz" } ], "0.1.1": [ { "comment_text": "", "digests": { "md5": "c3597ea5a2c07d785d6132b3200b7ef7", "sha256": "f9731745855bf2f1a74997fc69bc4d829a9022efb7fb26afa9f736ed42a3cf95" }, "downloads": -1, "filename": "noisereduce-0.1.1-py3-none-any.whl", "has_sig": false, "md5_digest": "c3597ea5a2c07d785d6132b3200b7ef7", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 6681, "upload_time": "2019-03-06T22:06:38", "url": "https://files.pythonhosted.org/packages/be/6e/c3bfca1431a8020e4990b85d2a3eae1a59ebe0aac7d48415993a875ef669/noisereduce-0.1.1-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "931aac6ff3396d02fbc4ffcb8c8add88", "sha256": "664ed1c6bf7d8ecb2dabeb00e02541173b0c8a5e76d9bf3024b37b011c4fb390" }, "downloads": -1, "filename": "noisereduce-0.1.1.tar.gz", "has_sig": false, "md5_digest": "931aac6ff3396d02fbc4ffcb8c8add88", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5146, "upload_time": "2019-03-06T22:06:40", "url": "https://files.pythonhosted.org/packages/3f/22/0d75b357390ba861ded11fb653d6c41bfeac3f3f30db6660ff4c0edbbbf4/noisereduce-0.1.1.tar.gz" } ], "0.1.2": [ { "comment_text": "", "digests": { "md5": "0ff525af87909bd8e41871e6cebeac22", "sha256": "935cdf1b0d0d6dc6a6bcb792b91c866a0f65a63ee5ea7de028255c0c23ddd58d" }, "downloads": -1, "filename": "noisereduce-0.1.2-py3-none-any.whl", "has_sig": false, "md5_digest": "0ff525af87909bd8e41871e6cebeac22", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 6893, "upload_time": "2019-03-06T22:10:22", "url": "https://files.pythonhosted.org/packages/82/05/3d8641c4495270de325cb46543fd174f2feabbd5394b77e7e3367d0b453e/noisereduce-0.1.2-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "0ac70ec8ab90ad7a9cd965e7277f7002", "sha256": "65f0e73c720e2cb1216563e39c226ff3a3214f5dfd995a93cc3c13e27984a155" }, "downloads": -1, "filename": "noisereduce-0.1.2.tar.gz", "has_sig": false, "md5_digest": "0ac70ec8ab90ad7a9cd965e7277f7002", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5087, "upload_time": "2019-03-06T22:10:24", "url": "https://files.pythonhosted.org/packages/7d/01/fae8f896ac1b29cc29d59bc4e9fde92daf4c9a2e709818754cd4d4d4eb52/noisereduce-0.1.2.tar.gz" } ], "1.0": [ { "comment_text": "", "digests": { "md5": "089a37552e0ba3afca95050647b6ae99", "sha256": "2dd9822e647649a55df08de7c20c1981e1ed47ed827f48da48a7dd5c7e668738" }, "downloads": -1, "filename": "noisereduce-1.0.tar.gz", "has_sig": false, "md5_digest": "089a37552e0ba3afca95050647b6ae99", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6362, "upload_time": "2019-06-11T05:51:09", "url": "https://files.pythonhosted.org/packages/89/09/aed2851e5b1b9d41ab33505a670dbad72549c45688adba99d508fc13e0fe/noisereduce-1.0.tar.gz" } ], "1.0.1": [ { "comment_text": "", "digests": { "md5": "5c5ede847e7c06f8d66fce6f04cbd1e0", "sha256": "2de880ea5b7060eb1b602163b81cc8056b12e9172ed49d482775b7f195dec5d0" }, "downloads": -1, "filename": "noisereduce-1.0.1-py3-none-any.whl", "has_sig": false, "md5_digest": "5c5ede847e7c06f8d66fce6f04cbd1e0", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 8609, "upload_time": "2019-06-11T18:06:17", "url": "https://files.pythonhosted.org/packages/0c/13/0ee17d420953f5db6aa417d6278b0e3eff799e809905f577625e694c8964/noisereduce-1.0.1-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "bf55477d0d6686bae0a6269f68a6eea4", "sha256": "9e7d8ac0465d8bce01a68c19e6255355951be72861a5587d7583bcd664caaf24" }, "downloads": -1, "filename": "noisereduce-1.0.1.tar.gz", "has_sig": false, "md5_digest": "bf55477d0d6686bae0a6269f68a6eea4", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6595, "upload_time": "2019-06-11T18:06:19", "url": "https://files.pythonhosted.org/packages/4d/50/d6ef4d748837fa66229d70fe4ae808c971f3c3d4886459572ef78386b8cc/noisereduce-1.0.1.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "5c5ede847e7c06f8d66fce6f04cbd1e0", "sha256": "2de880ea5b7060eb1b602163b81cc8056b12e9172ed49d482775b7f195dec5d0" }, "downloads": -1, "filename": "noisereduce-1.0.1-py3-none-any.whl", "has_sig": false, "md5_digest": "5c5ede847e7c06f8d66fce6f04cbd1e0", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 8609, "upload_time": "2019-06-11T18:06:17", "url": "https://files.pythonhosted.org/packages/0c/13/0ee17d420953f5db6aa417d6278b0e3eff799e809905f577625e694c8964/noisereduce-1.0.1-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "bf55477d0d6686bae0a6269f68a6eea4", "sha256": "9e7d8ac0465d8bce01a68c19e6255355951be72861a5587d7583bcd664caaf24" }, "downloads": -1, "filename": "noisereduce-1.0.1.tar.gz", "has_sig": false, "md5_digest": "bf55477d0d6686bae0a6269f68a6eea4", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6595, "upload_time": "2019-06-11T18:06:19", "url": "https://files.pythonhosted.org/packages/4d/50/d6ef4d748837fa66229d70fe4ae808c971f3c3d4886459572ef78386b8cc/noisereduce-1.0.1.tar.gz" } ] }