{ "info": { "author": "Tino Wagner", "author_email": "ich@tinowagner.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 3 - Alpha", "Environment :: Console", "Intended Audience :: Developers", "Intended Audience :: Science/Research", "License :: OSI Approved :: MIT License", "Operating System :: OS Independent", "Programming Language :: Python :: 2", "Programming Language :: Python :: 3", "Topic :: Multimedia :: Sound/Audio", "Topic :: Scientific/Engineering" ], "description": "python-samplerate\n=================\n\nThis is a wrapper around Erik de Castro Lopo's `libsamplerate`_ (aka Secret\nRabbit Code) for high-quality sample rate conversion.\n\nIt implements all three `APIs\n`_ available in\n`libsamplerate`_:\n\n* **Simple API**: for resampling a large chunk of data with a single library\n call\n* **Full API**: for obtaining the resampled signal from successive chunks of\n data\n* **Callback API**: like Full API, but input samples are provided by a callback\n function\n\nLibrary calls to `libsamplerate`_ are performed using `CFFI\n`_.\n\n\nInstallation\n------------\n\n $ pip install samplerate\n\nBinaries of `libsamplerate`_ for macOS and Windows (32 and 64 bit) are included\nand used if not present on the system.\n\n\nUsage\n-----\n\n.. code-block:: python\n\n import numpy as np\n import samplerate\n\n # Synthesize data\n fs = 1000.\n t = np.arange(fs * 2) / fs\n input_data = np.sin(2 * np.pi * 5 * t)\n\n # Simple API\n ratio = 1.5\n converter = 'sinc_best' # or 'sinc_fastest', ...\n output_data_simple = samplerate.resample(input_data, ratio, converter)\n\n # Full API\n resampler = samplerate.Resampler(converter, channels=1)\n output_data_full = resampler.process(input_data, ratio, end_of_input=True)\n\n # The result is the same for both APIs.\n assert np.allclose(output_data_simple, output_data_full)\n\n # See `samplerate.CallbackResampler` for the Callback API, or\n # `examples/play_modulation.py` for an example.\n\nSee ``samplerate.resample``, ``samplerate.Resampler``, and\n``samplerate.CallbackResampler`` in the API documentation for details.\n\n\nSee also\n--------\n\n* `scikits.samplerate `_\n implements only the Simple API and uses `Cython `_ for\n extern calls. The `resample` function of `scikits.samplerate` and this package\n share the same function signature for compatiblity.\n\n* `resampy `_: sample rate conversion in\n Python + Cython.\n\n\nLicense\n-------\n\nThis project is licensed under the `MIT license\n`_.\n\nAs of version 0.1.9, `libsamplerate`_ is licensed under the `2-clause BSD\nlicense `_.\n\n\n.. _libsamplerate: http://www.mega-nerd.com/libsamplerate/", "description_content_type": null, "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/tuxu/python-samplerate", "keywords": "samplerate converter signal processing audio", "license": "MIT", "maintainer": "", "maintainer_email": "", "name": "samplerate", "package_url": "https://pypi.org/project/samplerate/", "platform": "any", "project_url": "https://pypi.org/project/samplerate/", "project_urls": { "Homepage": "https://github.com/tuxu/python-samplerate" }, "release_url": "https://pypi.org/project/samplerate/0.1.0/", "requires_dist": null, "requires_python": "", "summary": "Python bindings for libsamplerate based on CFFI and NumPy", "version": "0.1.0" }, "last_serial": 2664609, "releases": { "0.1.0": [ { "comment_text": "", "digests": { "md5": "79be4b973d23617c602b54e7d35d10af", "sha256": "f55e5c9d0a8ba3c82a53b7d9c34a2d145439c61166a7f310efaec88f2781b8f8" }, "downloads": -1, "filename": "samplerate-0.1.0-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "79be4b973d23617c602b54e7d35d10af", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 4028658, "upload_time": "2017-02-24T00:01:44", "url": "https://files.pythonhosted.org/packages/0c/3c/4c1aa376332d18e708dcc3289e4dbdd2c508bcac1b8eb1b35b73092fa00f/samplerate-0.1.0-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "8309a43d9c362da4bc38eac979ee8857", "sha256": "75ef725e6cd9c4545569caf4c47147beab7b53b2c36e5122e8c285d348f88847" }, "downloads": -1, "filename": "samplerate-0.1.0.tar.gz", "has_sig": false, "md5_digest": "8309a43d9c362da4bc38eac979ee8857", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4044998, "upload_time": "2017-02-24T00:01:56", "url": "https://files.pythonhosted.org/packages/da/9c/6a13fbc59b1ceaef194a53d3aeafa983057133fb13660c423854184eafa7/samplerate-0.1.0.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "79be4b973d23617c602b54e7d35d10af", "sha256": "f55e5c9d0a8ba3c82a53b7d9c34a2d145439c61166a7f310efaec88f2781b8f8" }, "downloads": -1, "filename": "samplerate-0.1.0-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "79be4b973d23617c602b54e7d35d10af", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 4028658, "upload_time": "2017-02-24T00:01:44", "url": "https://files.pythonhosted.org/packages/0c/3c/4c1aa376332d18e708dcc3289e4dbdd2c508bcac1b8eb1b35b73092fa00f/samplerate-0.1.0-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "8309a43d9c362da4bc38eac979ee8857", "sha256": "75ef725e6cd9c4545569caf4c47147beab7b53b2c36e5122e8c285d348f88847" }, "downloads": -1, "filename": "samplerate-0.1.0.tar.gz", "has_sig": false, "md5_digest": "8309a43d9c362da4bc38eac979ee8857", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4044998, "upload_time": "2017-02-24T00:01:56", "url": "https://files.pythonhosted.org/packages/da/9c/6a13fbc59b1ceaef194a53d3aeafa983057133fb13660c423854184eafa7/samplerate-0.1.0.tar.gz" } ] }