{ "info": { "author": "Adrian Sampson", "author_email": "adrian@radbox.org", "bugtrack_url": null, "classifiers": [ "Development Status :: 4 - Beta", "Intended Audience :: Developers", "License :: OSI Approved :: GNU Library or Lesser General Public License (LGPL)", "Topic :: Multimedia :: Sound/Audio :: Analysis" ], "description": "This is a Python interface to Last.fm's acoustic fingerprinting library (called\n`fplib`_) and its related API services. It performs fingerprint extraction,\nfingerprint ID lookup, and track metadata lookup.\n\n.. _fplib: http://github.com/lastfm/Fingerprinter\n\n\nInstallation\n------------\n\nTo install, you will need a compiler and the dependencies required by fplib\nitself: `fftw`_ (compiled for single-precision floats) and `libsamplerate`_.\n(On Debian/Ubuntu, the packages are ``libfftw3-dev`` and\n``libsamplerate0-dev``.)\n\nOnce you have these, you can easily install from PyPI using `pip`_::\n\n $ pip install pylastfp\n\nOr, if you don't have pip (or easy_install), head to the `download page`_.\nThe normal install command should work::\n\n $ python setup.py install\n \nTo build from the version control source (i.e., not from a release\ntarball), you will also need `Cython`_. (The source distributions include\nthe generated C++ file, avoiding the need for Cython. This package's\n``setup.py`` plays tricks to detect whether you have Cython installed.)\n\n.. _fftw: http://www.fftw.org/\n.. _libsamplerate: http://www.mega-nerd.com/SRC/\n.. _Cython: http://cython.org/\n.. _pip: http://pip.openplans.org/\n.. _download page: http://github.com/sampsyo/pylastfp/downloads\n\nThis library also depends on `audioread`_ to decode audio, although this\ndependency is technically optional. If you already have a mechanism for decoding\naudio files, there is no need to install audioread.\n\n.. _audioread: https://github.com/sampsyo/audioread\n\n\nRunning\n-------\n\nYou can run the included fingerprinter/lookup script, ``lastmatch.py``,\nto test your installation::\n\n $ lastmatch.py mysterious_music.mp3\n\nThis will show metadata matches from Last.fm's database. The script uses\n`audioread`_ to decode music, so it should transparently use a media library\navailable on your system (GStreamer, FFmpeg, MAD, or Core Audio on Mac OS X).\n\n\nUsing in Your Code\n------------------\n\nThe script exhibits the usual way to use pylastfp, which is this::\n\n >>> import lastfp\n >>> xml = lastfp.match_file(apikey, path)\n >>> matches = lastfp.parse_metadata(xml)\n >>> print matches[0]['artist'], '-', matches[0]['title']\n The National - Fake Emprire\n\nThis example uses the ``match_file`` convenience function, which uses\n`audioread`_ to decode audio data. The function imports the ``audioread`` module\nwhen called, so if you don't want to depend on that, just don't call this\nfunction.\n\nIf you have your own way of decoding audio, you can use the lower-level\ninterface::\n\n >>> xml = lastfp.match(apikey, pcmdata, samplerate, time_in_secs)\n\nOf course, you'll need a PCM stream for the audio you want to\nfingerprint. The pcmdata parameter must be an iterable of Python\n``str`` or ``buffer`` objects containing PCM data as arrays of C ``short``\n(16-bit integer) values.\n\nBoth functions (``match`` and ``match_file``) accept an additional optional\nparameter called ``metadata``. It should be a dict containing your current guess\nat the file's metadata. Last.fm might use this information to improve their\ndatabase. The dict should use these keys (all of which are optional):\n``\"artist\"``, ``\"album\"``, and ``\"track\"``.\n\nThe module internally performs thread-safe API limiting to 5 queries per\nsecond, in accordance with `Last.fm's API TOS`_.\n\n.. _Last.fm's API TOS: http://www.last.fm/api/tos\n\n\nTo-Do\n-----\n\nThe fingerprinting library allows for an optimization that skips decoding\na few milliseconds at the beginning of every file. (See\n``FingerprintExtractor::getToSkipMs()``, as demonstrated by the\n`example client`_.) Taking advantage of this will complicate the module's\ninterface a bit because the decoding source will need to know the amount of\ntime to skip.\n\n.. _example client:\n http://github.com/lastfm/Fingerprinter/blob/master/lastfmfpclient/\n src/main.cpp#L372\n\n\nVersion History\n---------------\n\n0.6\n Use `audioread`_ instead of the included `pygst`_ and `pymad`_ decoders.\n\n0.5\n Handle empty responses from the API.\n ``setup.py`` now searches the `Homebrew`_ user-local prefix.\n\n0.4\n Fix cleanup bug in gstdec that was causing files to remain open.\n\n0.3\n Fix typo in handling of HTTP errors.\n Handle cases when HTTP status line is malformed.\n\n0.2\n Fix a horrible memory leak.\n Fail safely when file is too short.\n Safely handle malformed XML returned from the API.\n Handle and expose HTTP failures.\n\n0.1\n Initial release.\n\n.. _Homebrew: http://mxcl.github.com/homebrew/\n.. _pymad: http://spacepants.org/src/pymad/\n.. _pygst: http://gstreamer.freedesktop.org/modules/gst-python.html\n\n\nCredits\n-------\n\nThis library is by `Adrian Sampson`_. It includes the fplib source code, which\nis by `Last.fm`_. fplib is licensed under the LGPLv3, so pylastfp uses the same\nlicense. pylastfp was written to be used with `beets`_, which you should\nprobably check out.\n\n.. _Adrian Sampson: mailto:adrian@radbox.org\n.. _Last.fm: http://last.fm/\n.. _beets: http://beets.radbox.org/", "description_content_type": null, "docs_url": null, "download_url": "UNKNOWN", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "http://github.com/sampsyo/pylastfp/", "keywords": null, "license": "LGPL", "maintainer": null, "maintainer_email": null, "name": "pylastfp", "package_url": "https://pypi.org/project/pylastfp/", "platform": "ALL", "project_url": "https://pypi.org/project/pylastfp/", "project_urls": { "Download": "UNKNOWN", "Homepage": "http://github.com/sampsyo/pylastfp/" }, "release_url": "https://pypi.org/project/pylastfp/0.6/", "requires_dist": null, "requires_python": null, "summary": "bindings for Last.fm's acoustic fingerprinting (fplib)", "version": "0.6" }, "last_serial": 660538, "releases": { "0.1": [ { "comment_text": "", "digests": { "md5": "f40b3e6dfa04b8ffcddc22a3782c8ea7", "sha256": "f5363bd374f2d778e62aa999498d0936136e32f0949c966980d8e261a89071b6" }, "downloads": -1, "filename": "pylastfp-0.1.tar.gz", "has_sig": false, "md5_digest": "f40b3e6dfa04b8ffcddc22a3782c8ea7", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 51132, "upload_time": "2010-08-31T23:15:58", "url": "https://files.pythonhosted.org/packages/66/09/85a60625c61fb3f3c05520ce10dd70e407ec2b88b0d1bf17d027acf6ba38/pylastfp-0.1.tar.gz" } ], "0.2": [ { "comment_text": "", "digests": { "md5": "1aa0d8bc00b715497efb1097153c4fd0", "sha256": "2c53c6415e5154e9e4ee7c1b08652bf6830685512bd3050f77ed6a7cc99d8e11" }, "downloads": -1, "filename": "pylastfp-0.2.tar.gz", "has_sig": false, "md5_digest": "1aa0d8bc00b715497efb1097153c4fd0", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 52265, "upload_time": "2010-09-27T03:37:09", "url": "https://files.pythonhosted.org/packages/c0/e8/64c1ba6ae0d44596f492abcc0692fe96faa32da5d769a4f66207f032c0e4/pylastfp-0.2.tar.gz" } ], "0.3": [ { "comment_text": "", "digests": { "md5": "7596fb7f37e278064475798ea93ce3fb", "sha256": "b83aff8d9537931bf6daed35446d6c9b2c3fb223a94aa3b4d0ace0a631e1b976" }, "downloads": -1, "filename": "pylastfp-0.3.tar.gz", "has_sig": false, "md5_digest": "7596fb7f37e278064475798ea93ce3fb", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 49995, "upload_time": "2011-04-03T02:06:41", "url": "https://files.pythonhosted.org/packages/12/ec/bbcced8470527a67d86d82021ccc5ee01d23cdcf1161addbdc47f95026e5/pylastfp-0.3.tar.gz" } ], "0.4": [ { "comment_text": "", "digests": { "md5": "e2ee632788f6cf27625a24db63596089", "sha256": "b3c0bb057ddc3734733a2ea7f5f4875f372c20bbfdced96d65b943967487764d" }, "downloads": -1, "filename": "pylastfp-0.4.tar.gz", "has_sig": false, "md5_digest": "e2ee632788f6cf27625a24db63596089", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 52716, "upload_time": "2011-04-28T04:15:17", "url": "https://files.pythonhosted.org/packages/88/f4/a98789ecd4e26b01dd1bea3b5e32878b1620195c9ffeac9ac8544cb4fc4b/pylastfp-0.4.tar.gz" } ], "0.5": [ { "comment_text": "", "digests": { "md5": "2965ca4a444efc1c3b2578399ac022e3", "sha256": "4fbf6405a45063f693ba408bc9db5d5bb87b98129d11ddfd237bc9134657b738" }, "downloads": -1, "filename": "pylastfp-0.5.tar.gz", "has_sig": false, "md5_digest": "2965ca4a444efc1c3b2578399ac022e3", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 50812, "upload_time": "2011-09-20T19:29:14", "url": "https://files.pythonhosted.org/packages/b3/80/ea46ca1f47fa016ae94dfd5db89cabeb5a96487c6a47e026cdb5939f7f68/pylastfp-0.5.tar.gz" } ], "0.6": [ { "comment_text": "", "digests": { "md5": "292946bd34f24f533029085e063d5155", "sha256": "5f9a32e532ab62e5663298b4b3b1db86f5466404f111ccaa9030c23ffee140f7" }, "downloads": -1, "filename": "pylastfp-0.6.tar.gz", "has_sig": false, "md5_digest": "292946bd34f24f533029085e063d5155", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 47231, "upload_time": "2011-11-12T02:00:11", "url": "https://files.pythonhosted.org/packages/d1/5c/b373ec5171cc19ed88c5c18633dd1c34043a29699f747e3704b830a96854/pylastfp-0.6.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "292946bd34f24f533029085e063d5155", "sha256": "5f9a32e532ab62e5663298b4b3b1db86f5466404f111ccaa9030c23ffee140f7" }, "downloads": -1, "filename": "pylastfp-0.6.tar.gz", "has_sig": false, "md5_digest": "292946bd34f24f533029085e063d5155", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 47231, "upload_time": "2011-11-12T02:00:11", "url": "https://files.pythonhosted.org/packages/d1/5c/b373ec5171cc19ed88c5c18633dd1c34043a29699f747e3704b830a96854/pylastfp-0.6.tar.gz" } ] }