{ "info": { "author": "yliess", "author_email": "hatiyliess86@gmail.com", "bugtrack_url": null, "classifiers": [], "description": "\nLPC Utility for Pytorch Library.\n\n# LPC Torch\n\nLPCTorch is a small pytorch utility for Linear Predictive Coding. It provides a simple way to compute windowed Linear Predictive Coding Coefficients on a input audio signal. The repo uses the Burg's methods [[1]] and is heavily inspired from the librosa audio library implementation [[2]].\n\n## Install\n\nInstall the module using the pip utility ( may require to run as sudo )\n\n```bash\npip3 install lpctorch\n```\n\n## Usage\n\n### LPC Coefficients\n\n```python\nfrom lpctorch import LPCCoefficients\n\n# Parameters\n# * sr : sample rate of the signal ( 16 kHz )\n# * frame_duration: duration of the window in seconds ( 16 ms )\n# * frame_overlap : frame overlapping factor\n# * K : number of linear predictive coding coefficients\nsr = 16000\nframe_duration = .016\nframe_overlap = .5\nK = 32\n\n# Initialize the module given all the parameters\nlpc_prep = LPCCoefficients(\n sr,\n frame_duration,\n frame_overlap,\n order = ( K - 1 )\n)\n\n# Get the coefficients given a signal\n# torch.Tensor of size ( Batch, Samples )\nalphas = lpc_prep( X )\n```\n\n## Example\n\nThe repository provides an example application with a 'sample.wav' file.\nThe output is the same as the one provided by librosa (bottom).\n\n![ Ex ]( ./examples/comparison.png )\n\n## Benchmarks\n\nHere are some benchmarks comparing cpu vs gpu inference times in seconds of the utility from 1 to 32 batch size.\n\n![ Bench ]( ./examples/benchmark.png )\n\n## References\n\n* [[1]] Larry Marple A New Autoregressive Spectrum Analysis Algorithm IEEE Transactions on Accoustics, Speech, and Signal Processing vol 28, no. 4, 1980\n* [[2]] Librosa LPC Burg's Method Implementation\n\n[1]: https://ieeexplore.ieee.org/document/1163429\n[2]: https://librosa.github.io/librosa/_modules/librosa/core/audio.html#lpc\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/TowardHumanizedInteraction/LPCTorch", "keywords": "", "license": "MIT", "maintainer": "", "maintainer_email": "", "name": "LPCTorch", "package_url": "https://pypi.org/project/LPCTorch/", "platform": "", "project_url": "https://pypi.org/project/LPCTorch/", "project_urls": { "Homepage": "https://github.com/TowardHumanizedInteraction/LPCTorch" }, "release_url": "https://pypi.org/project/LPCTorch/0.1.1/", "requires_dist": [ "numpy (==1.17.2)", "torch (==1.2.0)", "torchaudio (==0.3.0)", "tqdm (==4.36.1)", "matplotlib (==3.1.1)", "librosa (==0.7.1)" ], "requires_python": ">=3.4, <4", "summary": "LPC Utility for Pytorch Library.", "version": "0.1.1" }, "last_serial": 5970820, "releases": { "0.1.0": [ { "comment_text": "", "digests": { "md5": "8e5927456e3ae6f2bd2db0d4898d6ac0", "sha256": "0a162a182259167c9ee116c5f419e8c429b130763776ce2ed470de514e3ba499" }, "downloads": -1, "filename": "LPCTorch-0.1.0-py3-none-any.whl", "has_sig": false, "md5_digest": "8e5927456e3ae6f2bd2db0d4898d6ac0", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3.4, <4", "size": 4556, "upload_time": "2019-10-13T21:22:12", "url": "https://files.pythonhosted.org/packages/31/36/15667c07216da6b274c3b23baf8a3c6dfd05bdda80f8d6745e698aacc360/LPCTorch-0.1.0-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "e7c0fde8a946a2ae5e21eb7acc3a7257", "sha256": "e9244fc19b226dd7c849f0a700e8df84d7f0ae3eed558502bf5a8546e279fe52" }, "downloads": -1, "filename": "LPCTorch-0.1.0.tar.gz", "has_sig": false, "md5_digest": "e7c0fde8a946a2ae5e21eb7acc3a7257", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.4, <4", "size": 4177, "upload_time": "2019-10-13T21:22:15", "url": "https://files.pythonhosted.org/packages/10/0e/0b635940954bf4888aaacdff1664d314236193feff5e6bdaf40e0532f778/LPCTorch-0.1.0.tar.gz" } ], "0.1.1": [ { "comment_text": "", "digests": { "md5": "08fef2c409dd809e7e4af3640091617b", "sha256": "9ca71bffefa34b59efcaae90d694eb3e76f8fa09b272c6bcf6d9743fa3619e75" }, "downloads": -1, "filename": "LPCTorch-0.1.1-py3-none-any.whl", "has_sig": false, "md5_digest": "08fef2c409dd809e7e4af3640091617b", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3.4, <4", "size": 4604, "upload_time": "2019-10-14T10:31:19", "url": "https://files.pythonhosted.org/packages/22/79/fa71400b2a63ece6e37e9c34a239a84f6652befa9f689b8537b1485cfbb0/LPCTorch-0.1.1-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "47815e2b9c646ad6e076484d3200cb37", "sha256": "4f1475c4bba7eb5ff3ab3285e66aec5980361d431d1a2d1c5397860e267e5563" }, "downloads": -1, "filename": "LPCTorch-0.1.1.tar.gz", "has_sig": false, "md5_digest": "47815e2b9c646ad6e076484d3200cb37", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.4, <4", "size": 4216, "upload_time": "2019-10-14T10:31:21", "url": "https://files.pythonhosted.org/packages/ed/2a/bf9f604f7678d78e3dc35d2774658fa649a15d61dfe591a201292f4059be/LPCTorch-0.1.1.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "08fef2c409dd809e7e4af3640091617b", "sha256": "9ca71bffefa34b59efcaae90d694eb3e76f8fa09b272c6bcf6d9743fa3619e75" }, "downloads": -1, "filename": "LPCTorch-0.1.1-py3-none-any.whl", "has_sig": false, "md5_digest": "08fef2c409dd809e7e4af3640091617b", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3.4, <4", "size": 4604, "upload_time": "2019-10-14T10:31:19", "url": "https://files.pythonhosted.org/packages/22/79/fa71400b2a63ece6e37e9c34a239a84f6652befa9f689b8537b1485cfbb0/LPCTorch-0.1.1-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "47815e2b9c646ad6e076484d3200cb37", "sha256": "4f1475c4bba7eb5ff3ab3285e66aec5980361d431d1a2d1c5397860e267e5563" }, "downloads": -1, "filename": "LPCTorch-0.1.1.tar.gz", "has_sig": false, "md5_digest": "47815e2b9c646ad6e076484d3200cb37", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.4, <4", "size": 4216, "upload_time": "2019-10-14T10:31:21", "url": "https://files.pythonhosted.org/packages/ed/2a/bf9f604f7678d78e3dc35d2774658fa649a15d61dfe591a201292f4059be/LPCTorch-0.1.1.tar.gz" } ] }