{ "info": { "author": "Brent M. Spell", "author_email": "brent@pylon.com", "bugtrack_url": null, "classifiers": [ "License :: OSI Approved :: Apache Software License", "Operating System :: OS Independent", "Programming Language :: Python :: 3" ], "description": "# streamp3\n\nThis library implements streaming MP3 decompression using the LAME library.\n\n## Status\n[![PyPI](https://badge.fury.io/py/streamp3.svg)](https://badge.fury.io/py/streamp3)\n[![CircleCI](https://circleci.com/gh/pylon/streamp3.svg?style=shield)](https://circleci.com/gh/pylon/streamp3)\n[![Coveralls](https://coveralls.io/repos/github/pylon/streamp3/badge.svg?branch=master)](https://coveralls.io/github/pylon/streamp3?branch=master)\n\n## Installation\n\n### Pip\n```bash\npip install streamp3\n```\n\n## Usage\nTo begin decoding an MP3, construct an MP3Decoder, passing it in a binary\nstream or `bytes` object. You can then access the `bit_rate`, `sample_rate`,\nand `num_channels` properties for information about the MP3.\n\n```python\nfrom streamp3 import MP3Decoder\n\nwith open('my.mp3', 'rb') as mp3_file:\n decoder = MP3Decoder(mp3_file)\n print(decoder.bit_rate, decoder.sample_rate, decoder.num_channels)\n```\n\nYou can then read samples from the stream directly using the `read()` method\nor use the decoder as an iterator. Samples are returned as `bytes` objects,\nwhich are 16-bit PCM encoded, with samples interleaved across channels. This\nexample streams an MP3 file to the system speaker using\n[PyAudio](https://pypi.org/project/PyAudio/).\n\n```python\nimport pyaudio\nfrom streamp3 import MP3Decoder\n\nwith open('my.mp3', 'rb') as mp3_file:\n decoder = MP3Decoder(mp3_file)\n\n audio = pyaudio.PyAudio()\n device = audio.get_default_output_device_info()\n speaker = audio.open(output=True,\n input_device_index=device['index'],\n format=pyaudio.paInt16,\n channels=decoder.num_channels,\n rate=decoder.sample_rate)\n\n for chunk in decoder:\n speaker.write(chunk)\n```\n\n## Development\n\n### Setup\nWe generally use pyenv to create virtual environments. The following script\ncreates a virtual environment for the project and installs dependencies.\n\n```bash\npyenv install 3.6.4\npyenv virtualenv 3.6.4 streamp3\npip install -r requirements.txt\n```\n\nLAME must also be installed. This can be done on OSX via homebrew.\n\n```bash\nbrew install lame\n```\n\n### Deployment\nThe project uses setup.py for installation and is deployed to\n[PyPI](https://pypi.org). The project can be built for installation with\nthe following command:\n\n```bash\npython setup.py clean --all; rm -r ./dist\npython setup.py sdist bdist_wheel\n```\n\nThe wheel and source distribution can then be uploaded to PyPI using twine.\n\n```bash\ntwine upload --repository-url=https://upload.pypi.org/legacy/ dist/*\n```\n\n## License\n\nCopyright 2018 Pylon, Inc.\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may not use this file except in compliance with the License.\n You may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\n Unless required by applicable law or agreed to in writing, software\n distributed under the License is distributed on an \"AS IS\" BASIS,\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n See the License for the specific language governing permissions and\n limitations under the License.\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/pylon/streamp3/", "keywords": "", "license": "", "maintainer": "", "maintainer_email": "", "name": "streamp3", "package_url": "https://pypi.org/project/streamp3/", "platform": "", "project_url": "https://pypi.org/project/streamp3/", "project_urls": { "Homepage": "https://github.com/pylon/streamp3/" }, "release_url": "https://pypi.org/project/streamp3/0.1.6/", "requires_dist": [ "Cython (>=0.28.5)" ], "requires_python": "", "summary": "streaming mp3 decoder", "version": "0.1.6" }, "last_serial": 5425739, "releases": { "0.1.1": [ { "comment_text": "", "digests": { "md5": "f84958edddfb1a9facda53dbc1627b92", "sha256": "d9b91a9502f58437eff6046cd4bc93928ce5280eb3d2b3874e2fc83783b83be2" }, "downloads": -1, "filename": "streamp3-0.1.1-cp36-cp36m-macosx_10_13_x86_64.whl", "has_sig": false, "md5_digest": "f84958edddfb1a9facda53dbc1627b92", "packagetype": "bdist_wheel", "python_version": "cp36", "requires_python": null, "size": 18147, "upload_time": "2018-06-28T21:45:05", "url": "https://files.pythonhosted.org/packages/b8/a0/9590eb7e661a068aaca07e3d5c8028be5d1b95937712149acdea0a961690/streamp3-0.1.1-cp36-cp36m-macosx_10_13_x86_64.whl" }, { "comment_text": "", "digests": { "md5": "c8c0a4bafdd0af8560440e501313d206", "sha256": "8776ca378f51d5dd6abb5ffcd5d100cdfbd041c2485484678153372dcdfb37fc" }, "downloads": -1, "filename": "streamp3-0.1.1.tar.gz", "has_sig": false, "md5_digest": "c8c0a4bafdd0af8560440e501313d206", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 30168, "upload_time": "2018-06-28T21:45:06", "url": "https://files.pythonhosted.org/packages/91/d0/09c318ce7a1c3e85100386c21bb79ff5cafc2f6c579fc61e0d69116fa7ef/streamp3-0.1.1.tar.gz" } ], "0.1.2": [ { "comment_text": "", "digests": { "md5": "8c481faa979fd521b42bc90c89ac84b4", "sha256": "0bc37bacc458ad342b391f7589766e024bc5755ddb2742eb112d0fccbd55be0d" }, "downloads": -1, "filename": "streamp3-0.1.2-cp36-cp36m-macosx_10_13_x86_64.whl", "has_sig": false, "md5_digest": "8c481faa979fd521b42bc90c89ac84b4", "packagetype": "bdist_wheel", "python_version": "cp36", "requires_python": null, "size": 18287, "upload_time": "2018-07-02T13:27:34", "url": "https://files.pythonhosted.org/packages/d8/de/cb3316d2507b43a221cc7a07cc59f87794dd13d40c468affa31b123d7b05/streamp3-0.1.2-cp36-cp36m-macosx_10_13_x86_64.whl" }, { "comment_text": "", "digests": { "md5": "182771a211e1b227b8c34c634a920835", "sha256": "d043dd19d11b6d66fa6aabf2fdb7b33ed8ca3a539f7c9f9936cb4d09f1cadbad" }, "downloads": -1, "filename": "streamp3-0.1.2.tar.gz", "has_sig": false, "md5_digest": "182771a211e1b227b8c34c634a920835", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 31174, "upload_time": "2018-07-02T13:27:35", "url": "https://files.pythonhosted.org/packages/df/b9/d54ee01b38fb074d31c4f5848b7c939b6b46e41542c226215b4af094b08c/streamp3-0.1.2.tar.gz" } ], "0.1.3": [ { "comment_text": "", "digests": { "md5": "198aa20a47edf4192bd69d342b7fbf4c", "sha256": "f4618ffb67ed32726c498b16d73042b953f203e4f8db5b6c3d731505ad8ed458" }, "downloads": -1, "filename": "streamp3-0.1.3-cp36-cp36m-macosx_10_13_x86_64.whl", "has_sig": false, "md5_digest": "198aa20a47edf4192bd69d342b7fbf4c", "packagetype": "bdist_wheel", "python_version": "cp36", "requires_python": null, "size": 18275, "upload_time": "2018-07-02T13:44:40", "url": "https://files.pythonhosted.org/packages/ea/d7/c96fe7a39dc209070718f7db1d81785f8fe7226dc069587d25bb6e63d2fe/streamp3-0.1.3-cp36-cp36m-macosx_10_13_x86_64.whl" }, { "comment_text": "", "digests": { "md5": "85ef00fb762194feff5af49b1643cef2", "sha256": "794e388d71bba895c06f4afab229ceb80883819916af36ca94938217440a6331" }, "downloads": -1, "filename": "streamp3-0.1.3.tar.gz", "has_sig": false, "md5_digest": "85ef00fb762194feff5af49b1643cef2", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 31194, "upload_time": "2018-07-02T13:44:41", "url": "https://files.pythonhosted.org/packages/c0/74/f0f09fdf33bf3e9bb5e42564d08f3f10a128c3adc24ea6dfcf6dbd3a393d/streamp3-0.1.3.tar.gz" } ], "0.1.4": [ { "comment_text": "", "digests": { "md5": "939de85b6a8f4639b2b2f1f67c039679", "sha256": "46f3240eeb8f595830b91f7b4188ab453d7f068d4bbcefe6497c89d42135e1e5" }, "downloads": -1, "filename": "streamp3-0.1.4-cp36-cp36m-macosx_10_13_x86_64.whl", "has_sig": false, "md5_digest": "939de85b6a8f4639b2b2f1f67c039679", "packagetype": "bdist_wheel", "python_version": "cp36", "requires_python": null, "size": 18285, "upload_time": "2018-07-02T13:51:03", "url": "https://files.pythonhosted.org/packages/a8/71/eba30f92665d471523eef1dfb0da8554c8b3e9b7a5ec1633be3452cf02c1/streamp3-0.1.4-cp36-cp36m-macosx_10_13_x86_64.whl" }, { "comment_text": "", "digests": { "md5": "67497d413fa1db3129e0353fea221f96", "sha256": "357e130510c60ba2dc080c26eff6594f7737a54a75a2344af110d7c81268b317" }, "downloads": -1, "filename": "streamp3-0.1.4.tar.gz", "has_sig": false, "md5_digest": "67497d413fa1db3129e0353fea221f96", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 31209, "upload_time": "2018-07-02T13:51:04", "url": "https://files.pythonhosted.org/packages/20/f7/35a8e9b2218cff342fbc72ab78182f1c1d731825f71b10cffca87b99dd5b/streamp3-0.1.4.tar.gz" } ], "0.1.5": [ { "comment_text": "", "digests": { "md5": "25e8b6de59ebe550efc4ddf4f622d7ba", "sha256": "32a315496b929cdc230549b697ad866a599754b7d404dbee7a9c7bc248f89595" }, "downloads": -1, "filename": "streamp3-0.1.5-cp36-cp36m-macosx_10_13_x86_64.whl", "has_sig": false, "md5_digest": "25e8b6de59ebe550efc4ddf4f622d7ba", "packagetype": "bdist_wheel", "python_version": "cp36", "requires_python": null, "size": 18255, "upload_time": "2018-07-02T13:56:14", "url": "https://files.pythonhosted.org/packages/41/95/1f941a0372a3145cc023237d99c9fb91bc5be4fc04f1a83542090fd23bf1/streamp3-0.1.5-cp36-cp36m-macosx_10_13_x86_64.whl" }, { "comment_text": "", "digests": { "md5": "2e9e3f12973747c59ebe9bde9e67bd56", "sha256": "6538d57f3063088d7f22e69c4458bc51c98d7789ba7e6874e6b93d96df53270a" }, "downloads": -1, "filename": "streamp3-0.1.5.tar.gz", "has_sig": false, "md5_digest": "2e9e3f12973747c59ebe9bde9e67bd56", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5636, "upload_time": "2018-07-02T13:56:15", "url": "https://files.pythonhosted.org/packages/ae/0a/4df7eee7d6868c025f8a71958a199e9d087f7beaa7ca11fbd417ac346949/streamp3-0.1.5.tar.gz" } ], "0.1.6": [ { "comment_text": "", "digests": { "md5": "904b97dd9ae4108a19a9ad6cec16c2a1", "sha256": "73af67b3d6189af57585ec12eceb4b971dbc685f408fe3b77b812b93e0aa87b5" }, "downloads": -1, "filename": "streamp3-0.1.6-cp36-cp36m-macosx_10_13_x86_64.whl", "has_sig": false, "md5_digest": "904b97dd9ae4108a19a9ad6cec16c2a1", "packagetype": "bdist_wheel", "python_version": "cp36", "requires_python": null, "size": 21985, "upload_time": "2019-06-20T12:35:32", "url": "https://files.pythonhosted.org/packages/c6/e8/3e28b6f6990abe2786875d1cb457bc2a9201028a0e46f022b9a7ae40c50b/streamp3-0.1.6-cp36-cp36m-macosx_10_13_x86_64.whl" }, { "comment_text": "", "digests": { "md5": "4cb7a9826c7b4d5a1fad639eb830c670", "sha256": "61fbb78971c6b8b9835fd4b45373452b7742e2d09395baad798dd590116bc7b0" }, "downloads": -1, "filename": "streamp3-0.1.6.tar.gz", "has_sig": false, "md5_digest": "4cb7a9826c7b4d5a1fad639eb830c670", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5671, "upload_time": "2019-06-20T12:35:33", "url": "https://files.pythonhosted.org/packages/c4/00/6030c571ccddd2bc4883f0ebb352c9deb98097a95f118d429f6b6031958c/streamp3-0.1.6.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "904b97dd9ae4108a19a9ad6cec16c2a1", "sha256": "73af67b3d6189af57585ec12eceb4b971dbc685f408fe3b77b812b93e0aa87b5" }, "downloads": -1, "filename": "streamp3-0.1.6-cp36-cp36m-macosx_10_13_x86_64.whl", "has_sig": false, "md5_digest": "904b97dd9ae4108a19a9ad6cec16c2a1", "packagetype": "bdist_wheel", "python_version": "cp36", "requires_python": null, "size": 21985, "upload_time": "2019-06-20T12:35:32", "url": "https://files.pythonhosted.org/packages/c6/e8/3e28b6f6990abe2786875d1cb457bc2a9201028a0e46f022b9a7ae40c50b/streamp3-0.1.6-cp36-cp36m-macosx_10_13_x86_64.whl" }, { "comment_text": "", "digests": { "md5": "4cb7a9826c7b4d5a1fad639eb830c670", "sha256": "61fbb78971c6b8b9835fd4b45373452b7742e2d09395baad798dd590116bc7b0" }, "downloads": -1, "filename": "streamp3-0.1.6.tar.gz", "has_sig": false, "md5_digest": "4cb7a9826c7b4d5a1fad639eb830c670", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5671, "upload_time": "2019-06-20T12:35:33", "url": "https://files.pythonhosted.org/packages/c4/00/6030c571ccddd2bc4883f0ebb352c9deb98097a95f118d429f6b6031958c/streamp3-0.1.6.tar.gz" } ] }