{ "info": { "author": "William Droz", "author_email": "william.droz@idiap.ch", "bugtrack_url": null, "classifiers": [ "Intended Audience :: Science/Research", "License :: OSI Approved :: GNU General Public License v3 (GPLv3)", "Operating System :: POSIX :: Linux", "Programming Language :: Python :: 3", "Topic :: Multimedia :: Sound/Audio :: Speech" ], "description": "# pydiarization\n\npydiarization is a wrapper around the [IBDiarization](https://github.com/idiap/IBDiarization) toolkit.\n\n## Requirements\n\nYou must have the follow binaries in your path:\n* **ffmpeg**\n* **compute-mfcc-feats** and **copy-feats-to-htk** from Kaldi\n* **diarizeme** from the IBDiarization toolkit.\n\n## Installation\n\npydiarization can be installed by either conda\n```\nconda install -c wdroz pydiarization\n```\nor pip\n```\npip install pydiarization\n```\n\n## Usage\n\nBefore using the pywrapper, you have to create a folder that will contains the results of the IBDiarization toolkit. \n```bash\nmkdir result.dir\n```\n\n## Test the installation\n\nTo check if all binaries works and are recognized by pydiarization, you can run the tests by typing: ```python3 -m pydiarization.test_diarization_wrapper```\n\n### from code\n\nExample that convert a single video to a string (.rttm content)\n```python\nfrom pydiarization.diarization_wrapper import video_to_rttm_string\n\nrttm_content = video_to_rttm_string('MY_VIDEO_OR_URL.avi')\n```\n\nHere the list of all the high-levels API:\n```python\ndef video_to_rttm_string(video_path):\n \"\"\" High-level function that return the rttm as string from a video\n Arguments:\n video_path -- where the video is\n\n Return: the rttm content as string\n \"\"\"\ndef wav_to_rttm_string(wav_path):\n \"\"\" High-level function that return the rttm as string from a wav\n Arguments:\n wav_path -- where the wav is\n\n Return: the rttm content as string\n \"\"\"\ndef rttm_to_string(rttm_path):\n \"\"\" transform rttm file to string\n Arguments:\n rttm_path -- where is the rttm file\n\n Return: rttm content as string\n \"\"\"\ndef rttm_from_video(video_path, rttm_path):\n \"\"\" create a .rttm file from a video\n Arguments:\n video_path -- path to the video\n rttm_path -- path where the .rrtm file will be saved\n \"\"\"\ndef rttm_from_wav(wav_path, rttm_path):\n \"\"\" create a .rttm file from a wav\n Arguments:\n wav_path -- path to the wav file\n rttm_path -- path where the .rrtm file will be saved\n \"\"\"\n\n```\n\n### from CLI\n\nThe usage is the follow:\n
\n$ python3 -m pydiarization.run --help\nusage: run.py [-h] [--video VIDEO] [--wav WAV] [--output OUTPUT]\n\nDiarization Toolkit Wrapper CLI\n\noptional arguments:\n  -h, --help       show this help message and exit\n  --video VIDEO    take a video file or URL as input\n  --wav WAV        take a wav file as input\n  --output OUTPUT  specify to write as .rttm file\n
\n\n#### some examples\n\nAsk to get the .rttm content from a url:\n`python3 -m pydiarization.run --video http://data.cstr.inf.ed.ac.uk/summa/data/test.mp4`\n
SPEAKER tmp86hrhwsd 1 0.01 292.17   tmp86hrhwsd_spkr_9 \nSPEAKER tmp86hrhwsd 1 292.18 2.98   tmp86hrhwsd_spkr_2 
\n\nAsk to write to .rttm file instead:\n`python3 -m pydiarization.run --video http://data.cstr.inf.ed.ac.uk/summa/data/test.mp4 --output toto.rttm`\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/wdroz/IBDiarization/tree/master/src/pydiarization", "keywords": "", "license": "", "maintainer": "", "maintainer_email": "", "name": "pydiarization", "package_url": "https://pypi.org/project/pydiarization/", "platform": "", "project_url": "https://pypi.org/project/pydiarization/", "project_urls": { "Homepage": "https://github.com/wdroz/IBDiarization/tree/master/src/pydiarization" }, "release_url": "https://pypi.org/project/pydiarization/0.4/", "requires_dist": null, "requires_python": "", "summary": "Diarization toolkit wrapper", "version": "0.4" }, "last_serial": 4401654, "releases": { "0.2": [ { "comment_text": "", "digests": { "md5": "29d3ac6b9a462417bdd0c754cebafa03", "sha256": "10206e24eb141a6deca04e395706676f14f554e57d8d2951ff6b6464c270f83e" }, "downloads": -1, "filename": "pydiarization-0.2-py3-none-any.whl", "has_sig": false, "md5_digest": "29d3ac6b9a462417bdd0c754cebafa03", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 6299, "upload_time": "2018-10-10T07:08:22", "url": "https://files.pythonhosted.org/packages/14/20/0a8b24f1952017c92ded618eae944d4685e0e18639202c4190fc32bd0b98/pydiarization-0.2-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "de3eaba93922be87d39378c10b17a5bb", "sha256": "646952ab498a68493bd008135227119a7235e4486e3f3e485ab4beb11edb79cc" }, "downloads": -1, "filename": "pydiarization-0.2.tar.gz", "has_sig": false, "md5_digest": "de3eaba93922be87d39378c10b17a5bb", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4939, "upload_time": "2018-10-10T07:08:23", "url": "https://files.pythonhosted.org/packages/66/39/b99b0ed82b0627f019150d64066680f8d0171d922366f73b7f547f505d7b/pydiarization-0.2.tar.gz" } ], "0.3": [ { "comment_text": "", "digests": { "md5": "d323b9405fc511652fdae9bbd00eb190", "sha256": "d112791a88e99f9d9ce53ffc675240826fdb7088ef401513200fa51a87d639dd" }, "downloads": -1, "filename": "pydiarization-0.3-py3-none-any.whl", "has_sig": false, "md5_digest": "d323b9405fc511652fdae9bbd00eb190", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 7304, "upload_time": "2018-10-16T07:55:20", "url": "https://files.pythonhosted.org/packages/1e/3b/9eaa817f87900ad94593470c610014b3d5a9353e919b8b1b9b61a72ae508/pydiarization-0.3-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "864b2ad222b4985f896bfebd345575d3", "sha256": "d86572bcfeec0d0fb24bdfaaba9d245e3ac3f7a648d6c33e37ea953a0255f91e" }, "downloads": -1, "filename": "pydiarization-0.3.tar.gz", "has_sig": false, "md5_digest": "864b2ad222b4985f896bfebd345575d3", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5705, "upload_time": "2018-10-16T07:55:22", "url": "https://files.pythonhosted.org/packages/7e/a1/be330085ede651f25aaf018071502189792df013c6e0472c24d9743fa233/pydiarization-0.3.tar.gz" } ], "0.4": [ { "comment_text": "", "digests": { "md5": "ee4fdbfafa302a351b82862a2dc02751", "sha256": "27310c6026fcab3c966e259d262d75ad8cd0e2fb4a1fdafe458acfb5538c38f7" }, "downloads": -1, "filename": "pydiarization-0.4-py3-none-any.whl", "has_sig": false, "md5_digest": "ee4fdbfafa302a351b82862a2dc02751", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 7584, "upload_time": "2018-10-22T09:06:54", "url": "https://files.pythonhosted.org/packages/fb/c5/518261e06e0231afbc0a5767bd046bf624c0c0a7d9bdb56bf35040683158/pydiarization-0.4-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "dfbfd54afa813ac2b91ddf8fbe90d556", "sha256": "5da92b29c72e1cc4f5c35fb56199c33986059d33f8fd2cf6adaad3482584f2c1" }, "downloads": -1, "filename": "pydiarization-0.4.tar.gz", "has_sig": false, "md5_digest": "dfbfd54afa813ac2b91ddf8fbe90d556", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5973, "upload_time": "2018-10-22T09:06:56", "url": "https://files.pythonhosted.org/packages/5a/9f/16265eaa84229b015905a6be36d8734a37653160db48fa09ea41fb2abc03/pydiarization-0.4.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "ee4fdbfafa302a351b82862a2dc02751", "sha256": "27310c6026fcab3c966e259d262d75ad8cd0e2fb4a1fdafe458acfb5538c38f7" }, "downloads": -1, "filename": "pydiarization-0.4-py3-none-any.whl", "has_sig": false, "md5_digest": "ee4fdbfafa302a351b82862a2dc02751", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 7584, "upload_time": "2018-10-22T09:06:54", "url": "https://files.pythonhosted.org/packages/fb/c5/518261e06e0231afbc0a5767bd046bf624c0c0a7d9bdb56bf35040683158/pydiarization-0.4-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "dfbfd54afa813ac2b91ddf8fbe90d556", "sha256": "5da92b29c72e1cc4f5c35fb56199c33986059d33f8fd2cf6adaad3482584f2c1" }, "downloads": -1, "filename": "pydiarization-0.4.tar.gz", "has_sig": false, "md5_digest": "dfbfd54afa813ac2b91ddf8fbe90d556", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5973, "upload_time": "2018-10-22T09:06:56", "url": "https://files.pythonhosted.org/packages/5a/9f/16265eaa84229b015905a6be36d8734a37653160db48fa09ea41fb2abc03/pydiarization-0.4.tar.gz" } ] }