{ "info": { "author": "Tim Mahrt", "author_email": "timmahrt@gmail.com", "bugtrack_url": null, "classifiers": [], "description": "\n# pyJuliusAlign\n\n [![](https://badges.gitter.im/pyJuliusAlign/Lobby.svg)](https://gitter.im/pyJuliusAlign/Lobby?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge) [![](https://img.shields.io/badge/license-MIT-blue.svg?)](http://opensource.org/licenses/MIT) [![](https://img.shields.io/pypi/v/pyjuliusalign.svg)](https://pypi.org/project/pyjuliusalign/)\n\n*Questions? Comments? Feedback? Chat with us on gitter!*\n\n-----\n\nInput and output of pyJuliusAlign:\n\n![PyJuliusAlign example](./examples/files/pyjulius_example.png)\n\n\u9332\u97f3\u97f3\u58f0\u3068\u30c8\u30e9\u30f3\u30b9\u30af\u30ea\u30d7\u30c8\u306f\u3042\u308b\u3051\u3069\u3001\u3069\u3053\u306b\u305d\u306e\u5358\u8a9e\u307e\u305f\u306f\u305d\u306e\u5b50\u97f3\u3001\u6bcd\u97f3\u304c\u3042\u308b\u306e\u304b\u6b63\u78ba\u306b\u5206\u304b\u3089\u306a\u3044\u6642\u3001\u305d\u308c\u3089\u3092\u63a2\u3059\u305f\u3081\u306b\u300cforced alignment\u300d\u3068\u3044\u3046\u6a5f\u80fd\u3092\u4f7f\u3044\u307e\u3059\u3002\u300cJulius\u300d\u3068\u3044\u3046\u97f3\u58f0\u8a8d\u8b58\u30b7\u30b9\u30c6\u30e0\u306f\u65e5\u672c\u8a9e\u3067\u300cforced alignment\u300d\u3092\u884c\u3046\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u304c\u3001\u97f3\u58f0\u5185\u306b\u767a\u97f3\u3092\u5165\u308c\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002\u304c\u3057\u304b\u3057\u3001\u57fa\u672c\u7684\u306b\u306f\u30c8\u30e9\u30f3\u30b9\u30af\u30ea\u30d7\u30c8\u306f\u6587\u5b57\u3060\u3051\u3067\u3059\u3002\u300ccabocha\u300d\u3068\u3044\u3046\u30bd\u30d5\u30c8\u30a6\u30a7\u30a2\u306f\u6587\u7ae0\u3092\u5143\u306b\u305d\u308c\u305e\u308c\u306e\u5358\u8a9e\u304b\u3089\u305d\u306e\u767a\u97f3\u307e\u3067\u5909\u63db\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002\u300cpyJuliusAlign\u300d\u3068\u3044\u3046\u30e9\u30a4\u30d6\u30e9\u30ea\u306f\u65e5\u672c\u8a9e\u3092\u300cforced alignment\u300d\u3059\u308b\u70ba\u306b\u300cJulius\u300d\u3068\u300ccabocha\u300d\u3092\u4e00\u7dd2\u306b\u4f7f\u3044\u307e\u3059\u3002TextGrid\u3055\u308c\u305f\u97f3\u58f0\u9332\u97f3\u306b\u306f\u3001\u5358\u8a9e\u3068\u305d\u306e\u5b50\u97f3\u3001\u6bcd\u97f3\u3092\u76f4\u63a5\u633f\u5165\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002\n\nWhen we have a speech recording and a text transcript but we don't know where the words, vowels, and consonants are, we can use a tool called \"forced alignment\" to find them. There is a speech recognition system called \"Julius\" that can do forced alignment in Japanese. However, it requires the pronunciation used in the recording. Usually, in the text transcript, there is only words. The \"Cabocha\" software can convert sentences to individual words and their pronunciations. The software library \"pyJuliusAlign\" uses \"Julius\" and \"cabocha\" together. In textgrid speech transcripts, words, vowels, and consonants can be directly inserted.\n\n----\n\n\u82f1\u8a9e\u3084\u30d5\u30e9\u30f3\u30b9\u8a9e\u3084\u30b9\u30da\u30a4\u30f3\u8a9e\u306a\u3069\u300cforced alignment\u300d\u3092\u3057\u305f\u3044\u306a\u3089\u300cSPPAS\u300d\u3068\u8a00\u3046\u30bd\u30d5\u30c8\u30a6\u30a7\u30a2\u3092\u304a\u52e7\u3081\u3057\u307e\u3059\u3002\n\nIf you want to do forced alignment in English, French, or Spanish, I recommend SPPAS.\n\n[http://www.sppas.org](http://www.sppas.org/)\n\n\n----\n\nTo get started:\n\n*/examples/align_example.py* should be sufficient for a large number of cases.\n\n*/pyjuliusalign/alignFromTextgrid.py* provides a good example of building your own custom alignment code (with different inputs and outputs than textgrids). \n\n\n# Table of contents\n1. [Major Revisions](#major-revisions)\n2. [Requirements](#requirements)\n * [Mac-specific Requirements Information](#mac-specific-requirements-information)\n * [Windows-specific Requirements Information](#windows-specific-requirements-information)\n3. [Installation](#installation)\n4. [Testing Installation](#testing-installation)\n5. [Example Usage](#example-usage)\n6. [Troubleshooting](#troubleshooting)\n\n\n## Major Revisions\n\nVer 2.0 (January 12, 2019)\n- pyJuliusAlign now works with the latest version of Julius and the Julius Segmentation Kit.\n - If you need to use the old segmentation kit (segment_julius4.pl), please use pyJuliusAlign ver 1.1 \n- Quality of life improvements + documentation\n\nVer 1.1 (August 12, 2018)\n- Python 3.x support\n\nVer 1.0 (September 2, 2014)\n- Users can force-align words and phones for transcribed speech in Japanese\n\n\n## Requirements\n\npython - https://www.python.org/\n\npyPraat - https://github.com/timmahrt/pyPraat\n - for textgrid manipulations\n\nJulius - https://github.com/julius-speech/julius\n - the speech recognition engine\n - pyJuliusAlign has been tested with Julius 4.5, released on January 2nd, 2019.\n\nJulius Segmentation Kit - https://github.com/julius-speech/segmentation-kit\n - it's not a file you \"install\" but something you'll want to put in a stable folder where you can access it when needed\n - Change line 33 to:\n ```perl\n ## data directory\n $datadir = \"./wav\";\n if (defined $ARGV[0]) {\n $datadir = $ARGV[0];\n }\n ```\n - Also in the configuration section, I recommend setting `$hmmdefs` to an absolute path e.g. `$hmmdefs=\"/Users/tmahrt/segmentation-kit/models/hmmdefs_monof_mix16_gid.binhmm\"; # monophone model`\n - Make sure to set silence appropriately. If you have clearly marked the edges of speech, you'll want to turn off silence marking. If you have not done so (for example, your recording only includes a single utterance) then you'll want to have the segmentation kit expect silence at the start and end of your recording.\n\nSox - http://sox.sourceforge.net/\n - Converts the sampling frequency of the audio if needed.\n - Optional. If you choose to not install sox, you'll need to make sure your audio files are at the same sampling frequency as the model data (the included data is 14khz)\n - If you forced the script to run Julius on audio that has a different sampling frequency, the aligner would completely fail.\n\nCabocha - http://taku910.github.io/cabocha/ \n - used to convert typical Japanese text into romaji/phones.\n - (throw it into google translate if you need it in English)\n - make a note of which encoding you use for the dictionary file--you'll need it in the code\n\nPerl (for Julius)\n\n\n### Mac-specific Requirements Information\n\nI use a mac and was able to easily install many requirements using Homebrew. Here are some guides that I found useful (they translate well enough from Japanese using google translate):\n - Sox https://qiita.com/samurai20000@github/items/2af98b6c468af317bb09\n - Cabocha https://qiita.com/musaprg/items/9a572ad5c4e28f79d2ae\n - I manually built Julius using the configure and make scripts included in that project\n\n\n### Windows-specific Requirements Information\n\nI currently don't have access to a Windows machine. Earlier, I tested installation and got as far as running Julius. Perl tried to run gzip which I couldn't get to install.\n\nOne user was able to get it working on Windows by installing cygwin and adding cygwin to the path in environment variables. Also, they had to install MeCab before running Cabocha, otherwise, they would receive an exception saying there's something wrong with Cabocha.\n\n\n## Installation\n\nPyJuliusAlign is on pypi and can be installed or upgraded from the command-line shell with pip like so::\n\n python -m pip install pyjuliusalign --upgrade\n\nOtherwise, to manually install, after downloading the source from github, from a command-line shell, navigate to the directory containing setup.py and type::\n\n python setup.py install\n\nIf python is not in your path, you'll need to enter the full path e.g.::\n\n\tC:\\Python36\\python.exe setup.py install\n\n\n## Testing Installation\n\nIn the folder 'examples' run the file 'align_example.py'.\n\nIf sox, cabocha, julius, and perl are all in your path, you won't need to specify them in any of the arguments--leave them with your default values. Otherwise, you'll need to specify the full path of their bin/executable files.\n\nIf you have difficulties running the code without specifying the full path, try using the full paths anyways.\n\nAlso, you will need to configure \"segment_julius.pl\" which is a part of the Julius Segmentation Kit.\n\n\n## Example Usage\n\nPlease see /examples for an example usage.\n\nThere is pretty much only one way to use this library at the moment. Please contact me if you are having difficulties using this library.\n\n\n## Troubleshooting\n\nThe scripts should catch any issues along the way with the exception of issues stemming from Julius. If you get bogus/null results, most likely Julius hasn't been set up correctly.\n\nThe Julius Segmentation kit comes with an example. If you can force align that, then you should be able to force align using this script as well.\n\n\n\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/timmahrt/pyJuliusAlign", "keywords": "", "license": "LICENSE", "maintainer": "", "maintainer_email": "", "name": "pyjuliusalign", "package_url": "https://pypi.org/project/pyjuliusalign/", "platform": "", "project_url": "https://pypi.org/project/pyjuliusalign/", "project_urls": { "Homepage": "https://github.com/timmahrt/pyJuliusAlign" }, "release_url": "https://pypi.org/project/pyjuliusalign/2.0.3/", "requires_dist": null, "requires_python": "", "summary": "A helper library for doing forced-alignment in Japanese with Julius.", "version": "2.0.3" }, "last_serial": 5208734, "releases": { "1.1.0": [ { "comment_text": "", "digests": { "md5": "8b8dac54c9610e092a2eaaf3b0d26b60", "sha256": "2bc3b519732e720911a5e5d13cc8761f044abdaadccedd2d0e42213613b4268d" }, "downloads": -1, "filename": "pyjuliusalign-1.1.0-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "8b8dac54c9610e092a2eaaf3b0d26b60", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 38063, "upload_time": "2018-08-12T03:23:29", "url": "https://files.pythonhosted.org/packages/97/52/2911b387eb95dd6cc8c523f7dc9ed6c672d18b77a94a3558bc41939daefd/pyjuliusalign-1.1.0-py2.py3-none-any.whl" } ], "2.0.0": [ { "comment_text": "", "digests": { "md5": "947388fec01b849512b35c59e89f5685", "sha256": "b378a9af802a8dbab6c680127f40554bfe7db4bf331acd8678120a52b8858cb4" }, "downloads": -1, "filename": "pyjuliusalign-2.0.0-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "947388fec01b849512b35c59e89f5685", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 22563, "upload_time": "2019-01-12T10:36:24", "url": "https://files.pythonhosted.org/packages/28/1d/ddccd87386a37359548b0466faffc9bc35ec98d9ecefd24a4c86a7d3a952/pyjuliusalign-2.0.0-py2.py3-none-any.whl" } ], "2.0.1": [ { "comment_text": "", "digests": { "md5": "ebe706e5c6a5b9d29371ceb2488029fc", "sha256": "790affebadb3aa9fcbd4bb983fe50790fc71de9c6c5152b853506d635acaf8f2" }, "downloads": -1, "filename": "pyjuliusalign-2.0.1-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "ebe706e5c6a5b9d29371ceb2488029fc", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 22584, "upload_time": "2019-01-12T10:44:54", "url": "https://files.pythonhosted.org/packages/f0/d7/fdaefee3305fe4436b1d3472688e417a35a3a728378955a9d01da590227c/pyjuliusalign-2.0.1-py2.py3-none-any.whl" } ], "2.0.2": [ { "comment_text": "", "digests": { "md5": "0504e1dd3b5c991a7b5b03ff7f64a94e", "sha256": "dc2f12552d9b2e6090da5b853f9159598f68e3ee9a9815fe93a21034cb631d38" }, "downloads": -1, "filename": "pyjuliusalign-2.0.2-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "0504e1dd3b5c991a7b5b03ff7f64a94e", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 23494, "upload_time": "2019-01-14T14:30:14", "url": "https://files.pythonhosted.org/packages/b2/a4/0eabbe843ca8ebf33589c6567c9e10ad20d562878542e657a961584e6c3c/pyjuliusalign-2.0.2-py2.py3-none-any.whl" } ], "2.0.3": [ { "comment_text": "", "digests": { "md5": "dd11ecbf5483229ffe157ac14dae07d2", "sha256": "2f1eeb184c2ab2208a92dba4e7a4601fe0bfd2bce4736e0bbb988ceeb8e80487" }, "downloads": -1, "filename": "pyjuliusalign-2.0.3-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "dd11ecbf5483229ffe157ac14dae07d2", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 23500, "upload_time": "2019-02-23T23:45:39", "url": "https://files.pythonhosted.org/packages/25/25/60a9887a52967990372e380377f4978e3828cb0847a2d6145a46e9f322fb/pyjuliusalign-2.0.3-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "5836830878084b79e0a827020898f2db", "sha256": "fd74aecfe133dfe53e017c3cebc24b9ce74669b75c039a438d10b1f5871635e3" }, "downloads": -1, "filename": "pyjuliusalign-2.0.3.tar.gz", "has_sig": false, "md5_digest": "5836830878084b79e0a827020898f2db", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 22612, "upload_time": "2019-04-30T15:38:34", "url": "https://files.pythonhosted.org/packages/5c/59/20d7d67e3dd3837c86dcf4aced1e09bd85d485cec24d7a8eb2042573b546/pyjuliusalign-2.0.3.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "dd11ecbf5483229ffe157ac14dae07d2", "sha256": "2f1eeb184c2ab2208a92dba4e7a4601fe0bfd2bce4736e0bbb988ceeb8e80487" }, "downloads": -1, "filename": "pyjuliusalign-2.0.3-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "dd11ecbf5483229ffe157ac14dae07d2", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 23500, "upload_time": "2019-02-23T23:45:39", "url": "https://files.pythonhosted.org/packages/25/25/60a9887a52967990372e380377f4978e3828cb0847a2d6145a46e9f322fb/pyjuliusalign-2.0.3-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "5836830878084b79e0a827020898f2db", "sha256": "fd74aecfe133dfe53e017c3cebc24b9ce74669b75c039a438d10b1f5871635e3" }, "downloads": -1, "filename": "pyjuliusalign-2.0.3.tar.gz", "has_sig": false, "md5_digest": "5836830878084b79e0a827020898f2db", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 22612, "upload_time": "2019-04-30T15:38:34", "url": "https://files.pythonhosted.org/packages/5c/59/20d7d67e3dd3837c86dcf4aced1e09bd85d485cec24d7a8eb2042573b546/pyjuliusalign-2.0.3.tar.gz" } ] }