{ "info": { "author": "Tiago Bras", "author_email": "tiagodsbras@gmail.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 3 - Alpha", "Environment :: Console", "Intended Audience :: Developers", "Intended Audience :: End Users/Desktop", "License :: OSI Approved :: MIT License", "Natural Language :: English", "Operating System :: MacOS", "Operating System :: Microsoft :: Windows", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3.0", "Programming Language :: Python :: 3.1", "Programming Language :: Python :: 3.2", "Programming Language :: Python :: 3.3", "Programming Language :: Python :: 3.4", "Programming Language :: Python :: 3.5", "Topic :: Multimedia :: Sound/Audio :: Conversion", "Topic :: Utilities" ], "description": "Audio Clip Extractor\n====================\n\nThis utility allows one to cut multiple clips from a single or multiple audio files.\n\nThe idea of this project came up when I was doing some [Shadowing](https://en.wikipedia.org/wiki/Speech_shadowing), Japanese to be specific. The problem was that the dialogs were long, so if I wanted to practice a certain phrase or word I would have to manually rewind it. So I thought, if I can split them in different files I'll be able to practice each separately.\n\nAlso, since this script can embed text as metadata in the outputted clips themselves the next step would be to create an application (I'm thinking mobile first) that takes all these clips and automatically arranges them in a way that makes shadowing even easier to practice.\n\n\nRequirements\n------------\n\n*FFMPEG* executable is mandatory to be able to run this. It can be downloaded for free\n [here](https://ffmpeg.org/download.html).\nAfter installing it, you can either add it to your *PATH* or pass it as an argument `--ffmpeg `.\n\nFor each audio file there needs to be a file with the same name but with **.txt** extension with the respective clips' timestamps (check under section **How it works** for further information).\n\nNote: *In future versions it will be possible to pass timestamps as optional arguments.*\n\n\nInstallation\n------------\n\nUse **pip** with following command:\n\n ```Bash\n $ pip install audioclipextractor\n ```\n\n\nHow it works\n------------\n\n```\n$ audioclipextractor audio_to_cut_from.mp3\n\n```\n\nThe script looks for a file with the same name as the audio file but with the extension **.txt**. The format of this file is the same as the track labels' file that you can export using [Audacity](http://www.audacityteam.org/) by going to the menu **File > Export Labels...** or **Tracks > Edit Labels...** and then **Export**.\n\n```\n []\n```\n\n*Begin clip* **CANNOT** be equal or greater to *End clip*. \n\n\n**Example:**\n\n```\n1.50 6.20 Hello World!\n10 24.70 Because I said so.\n33.85 36\n```\n\nThe `` part is completely optional, but if provided it will be embedded in the respective outputted clip as metadata. The default name is `m_text` but it can be set by passing the option argument `--text-var ` or `-m `.\n\nIt can also be piped to, example:\n\n```\n$ find . -name '*.mp3' -type f | audioclipextractor --zip\n```\n\nBut since we can't have a single specifications file for multiple audio files, this isn't very useful yet. In the future we will be able to, for instance, cut out the first 15s for each file.\n\n\nComand Line Options\n-------------------\n\n```\n--version, -V\n Prints the version of the script\n\n--zip, -z\n Archive the output in a zip container\n\n--ffmpeg \n Specify the FFMPEG executable path\n\n--output-dir, -o\n Set the output directory\n\n--text-name, -m\n Specify the name of the embedded text variable\n\n[files]\n Audio files to process\n```\n\nHow to use it in your projects\n------------------------------\n\nI recommend installing [virtualenv](https://virtualenv.pypa.io/en/latest/installation.html) \nto create an isolated environment.\n\n**Example:**\n\n```\n$ pip install virtualenv\n$ virtualenv venv\n$ source venv/bin/activate\n$ pip install audioclipextractor\n(venv) $ python example.py\n```\n\nexample.py\n\n```Python\nfrom audioclipextractor import AudioClipExtractor, SpecsParser\n\n# Inicialize the extractor\next = AudioClipExtractor('/path/to/audio/file.mp3', '/path/to/ffmpeg')\n\n# Define the clips to extract\n# It's possible to pass a file instead of a string\nspecs = '''\n 3.5 17 Winter is coming.\n 26 32.4 Summer child.\n 40 58.9 Hodor. Hodor. Hodor.\n'''\n\n# Extract the clips according to the specs and save them as a zip archive\next.extractClips(specs, '/path/to/output/directory', zipOutput=True)\n```\n\n\nNotes\n-----\n\nThis won't probably be called this\nThis is still a work in progress. Feel free to use it, fork it and give suggestions.\n\n\nLicense\n-------\n\nAudioClipCutter is available under the [MIT License](http://opensource.org/licenses/MIT).", "description_content_type": null, "docs_url": null, "download_url": "https://github.com/TiagoBras/audio-clip-extractor/tarball/v0.2.4", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/TiagoBras/audio-clip-extractor", "keywords": null, "license": "MIT", "maintainer": null, "maintainer_email": null, "name": "audioclipextractor", "package_url": "https://pypi.org/project/audioclipextractor/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/audioclipextractor/", "project_urls": { "Download": "https://github.com/TiagoBras/audio-clip-extractor/tarball/v0.2.4", "Homepage": "https://github.com/TiagoBras/audio-clip-extractor" }, "release_url": "https://pypi.org/project/audioclipextractor/0.2.4/", "requires_dist": null, "requires_python": null, "summary": "Easily extract multiple clips from audio files", "version": "0.2.4" }, "last_serial": 2089831, "releases": { "0.2.3": [ { "comment_text": "", "digests": { "md5": "ef6544d1850ef7a09c4d4e1fd2fd4584", "sha256": "b15331e55109810155843f1762c366a8caf017d3b2b00eac97f511a8f7f87b38" }, "downloads": -1, "filename": "audioclipextractor-0.2.3.tar.gz", "has_sig": false, "md5_digest": "ef6544d1850ef7a09c4d4e1fd2fd4584", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 10879, "upload_time": "2016-04-28T23:07:27", "url": "https://files.pythonhosted.org/packages/e2/ad/449b305615e5a2ea64d82cf0faf343b32989f9d6df10e5c09367bc0b2731/audioclipextractor-0.2.3.tar.gz" } ], "0.2.4": [ { "comment_text": "", "digests": { "md5": "133a45fcb5758daa3362e54d6d8fcc5d", "sha256": "15a0a240daf4d8dfc730212d40feb3f29d2f83f725435356bc9ccbb44f0e933e" }, "downloads": -1, "filename": "audioclipextractor-0.2.4.tar.gz", "has_sig": false, "md5_digest": "133a45fcb5758daa3362e54d6d8fcc5d", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 10856, "upload_time": "2016-04-28T23:34:07", "url": "https://files.pythonhosted.org/packages/3d/86/21a8fa569f5a598f2b6df26d9803672bb4c900090024db7ef7aa11f96586/audioclipextractor-0.2.4.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "133a45fcb5758daa3362e54d6d8fcc5d", "sha256": "15a0a240daf4d8dfc730212d40feb3f29d2f83f725435356bc9ccbb44f0e933e" }, "downloads": -1, "filename": "audioclipextractor-0.2.4.tar.gz", "has_sig": false, "md5_digest": "133a45fcb5758daa3362e54d6d8fcc5d", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 10856, "upload_time": "2016-04-28T23:34:07", "url": "https://files.pythonhosted.org/packages/3d/86/21a8fa569f5a598f2b6df26d9803672bb4c900090024db7ef7aa11f96586/audioclipextractor-0.2.4.tar.gz" } ] }