Name | pygoruut JSON |
Version |
0.6.3
JSON |
| download |
home_page | https://github.com/neurlang/pygoruut |
Summary | Text-to-IPA converter and phonetic translator for Python, powered by the Goruut phonemization engine |
upload_time | 2025-08-02 06:34:57 |
maintainer | None |
docs_url | None |
author | Neurlang Project |
requires_python | >=3.6 |
license | MIT License
Copyright (c) 2024 neurlang
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
|
keywords |
goruut
phonemization
tts
|
VCS |
 |
bugtrack_url |
|
requirements |
requests
|
Travis-CI |
No Travis.
|
coveralls test coverage |
No coveralls.
|
# pygoruut
## Getting started
```python
from pygoruut.pygoruut import Pygoruut
pygoruut = Pygoruut()
print(str(pygoruut.phonemize(language="EnglishAmerican", sentence="fast racing car")))
# Prints: fˈæst ɹˈeɪsɪŋ kˈɑɹ
# Now, convert it back
print(str(pygoruut.phonemize(language="EnglishAmerican", sentence="fˈæst ɹˈeɪsɪŋ kˈɑɹ", is_reverse=True)))
# Prints: fast racing car
```
> ℹ️ For English, we recommend using `EnglishBritish` or `EnglishAmerican` instead of `English`. These dialect-specific models use high-quality Kokoro Misaki dictionaries and produce better results, especially for reversing IPA back to text.
---
### Uyghur language, our highest quality language
```python
print(str(pygoruut.phonemize(language="Uyghur", sentence="قىزىل گۈل ئاتا")))
# Prints: qizil gyl ʔɑtɑ
# Now, convert it back
print(str(pygoruut.phonemize(language="Uyghur", sentence="qizil gyl ʔɑtɑ", is_reverse=True)))
# Prints: قىزىل گۈل ئاتا
```
The quality of translation varies across the 136 supported languages.
---
## Advanced Use
### Multi-lingual sentence handling
Use comma (`,`) separated languages in `language`. The first language is the preferred language:
```python
print(pygoruut.phonemize(language="EnglishBritish,Slovak", sentence="hello world ahojte notindictionary!!!!"))
# Prints: həlˈəʊ wəld aɦɔjcɛ nɔtɪndɪktˈɪoʊŋɑɹi!!!!
```
---
### Numerics handling (English, Arabic)
```python
print(str(pygoruut.phonemize(language="EnglishBritish", sentence="100 bottles")))
# Prints: wʌn ˈhʌndrəd bˈɒtlz
```
---
### Homograph handling (English)
```python
print(str(pygoruut.phonemize(language="EnglishBritish", sentence="He dove into the pool to join the dove")))
# Prints: hˈi dˈəʊv ˈɪntu ðə pˈuːl tə dʒˈɔɪn ðə dˈʌv
```
---
### No punctuation
```python
' '.join([w.Phonetic for w in pygoruut.phonemize(language="EnglishBritish", sentence="hello world!!!!").Words])
```
---
### Force a specific version
You can pin a specific version. It will translate all words in the same way forever:
```python
from pygoruut.pygoruut import Pygoruut
pygoruut = Pygoruut(version='v0.6.2')
```
---
### Use an online inference api
You can use an inference api. The model will not be downloaded:
```python
from pygoruut.pygoruut import Pygoruut
pygoruut = Pygoruut(api='https://hashtron.cloud')
```
---
### Configure a model download directory for faster startup
To cache models in a user-specified directory:
```python
from pygoruut.pygoruut import Pygoruut
pygoruut = Pygoruut(writeable_bin_dir='/home/john/')
```
To cache in the user's home subdirectory `.goruut`:
```python
from pygoruut.pygoruut import Pygoruut
pygoruut = Pygoruut(writeable_bin_dir='')
```
Raw data
{
"_id": null,
"home_page": "https://github.com/neurlang/pygoruut",
"name": "pygoruut",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.6",
"maintainer_email": null,
"keywords": "goruut, phonemization, tts",
"author": "Neurlang Project",
"author_email": "Neurlang Project <77860779+neurlang@users.noreply.github.com>",
"download_url": "https://files.pythonhosted.org/packages/da/7d/d74d63282a47e7ccba573a846b2ecd7b21997bbe40cb78bbf253fe5dc77e/pygoruut-0.6.3.tar.gz",
"platform": null,
"description": "# pygoruut\n\n## Getting started\n\n```python\nfrom pygoruut.pygoruut import Pygoruut\n\npygoruut = Pygoruut()\n\nprint(str(pygoruut.phonemize(language=\"EnglishAmerican\", sentence=\"fast racing car\")))\n\n# Prints: f\u02c8\u00e6st \u0279\u02c8e\u026as\u026a\u014b k\u02c8\u0251\u0279\n\n# Now, convert it back\n\nprint(str(pygoruut.phonemize(language=\"EnglishAmerican\", sentence=\"f\u02c8\u00e6st \u0279\u02c8e\u026as\u026a\u014b k\u02c8\u0251\u0279\", is_reverse=True)))\n\n# Prints: fast racing car\n```\n\n> \u2139\ufe0f For English, we recommend using `EnglishBritish` or `EnglishAmerican` instead of `English`. These dialect-specific models use high-quality Kokoro Misaki dictionaries and produce better results, especially for reversing IPA back to text.\n\n---\n\n### Uyghur language, our highest quality language\n\n```python\nprint(str(pygoruut.phonemize(language=\"Uyghur\", sentence=\"\u0642\u0649\u0632\u0649\u0644 \u06af\u06c8\u0644 \u0626\u0627\u062a\u0627\")))\n\n# Prints: qizil gyl \u0294\u0251t\u0251\n\n# Now, convert it back\n\nprint(str(pygoruut.phonemize(language=\"Uyghur\", sentence=\"qizil gyl \u0294\u0251t\u0251\", is_reverse=True)))\n\n# Prints: \u0642\u0649\u0632\u0649\u0644 \u06af\u06c8\u0644 \u0626\u0627\u062a\u0627\n```\n\nThe quality of translation varies across the 136 supported languages.\n\n---\n\n## Advanced Use\n\n### Multi-lingual sentence handling\n\nUse comma (`,`) separated languages in `language`. The first language is the preferred language:\n\n```python\nprint(pygoruut.phonemize(language=\"EnglishBritish,Slovak\", sentence=\"hello world ahojte notindictionary!!!!\"))\n\n# Prints: h\u0259l\u02c8\u0259\u028a w\u0259ld a\u0266\u0254jc\u025b n\u0254t\u026and\u026akt\u02c8\u026ao\u028a\u014b\u0251\u0279i!!!!\n```\n\n---\n\n### Numerics handling (English, Arabic)\n\n```python\nprint(str(pygoruut.phonemize(language=\"EnglishBritish\", sentence=\"100 bottles\")))\n\n# Prints: w\u028cn \u02c8h\u028cndr\u0259d b\u02c8\u0252tlz\n```\n\n---\n\n### Homograph handling (English)\n\n```python\nprint(str(pygoruut.phonemize(language=\"EnglishBritish\", sentence=\"He dove into the pool to join the dove\")))\n\n# Prints: h\u02c8i d\u02c8\u0259\u028av \u02c8\u026antu \u00f0\u0259 p\u02c8u\u02d0l t\u0259 d\u0292\u02c8\u0254\u026an \u00f0\u0259 d\u02c8\u028cv\n```\n\n---\n\n### No punctuation\n\n```python\n' '.join([w.Phonetic for w in pygoruut.phonemize(language=\"EnglishBritish\", sentence=\"hello world!!!!\").Words])\n```\n\n---\n\n### Force a specific version\n\nYou can pin a specific version. It will translate all words in the same way forever:\n\n```python\nfrom pygoruut.pygoruut import Pygoruut\n\npygoruut = Pygoruut(version='v0.6.2')\n```\n\n---\n\n### Use an online inference api\n\nYou can use an inference api. The model will not be downloaded:\n\n```python\nfrom pygoruut.pygoruut import Pygoruut\n\npygoruut = Pygoruut(api='https://hashtron.cloud')\n```\n\n---\n\n### Configure a model download directory for faster startup\n\nTo cache models in a user-specified directory:\n\n```python\nfrom pygoruut.pygoruut import Pygoruut\n\npygoruut = Pygoruut(writeable_bin_dir='/home/john/')\n```\n\nTo cache in the user's home subdirectory `.goruut`:\n\n```python\nfrom pygoruut.pygoruut import Pygoruut\n\npygoruut = Pygoruut(writeable_bin_dir='')\n```\n",
"bugtrack_url": null,
"license": "MIT License\n \n Copyright (c) 2024 neurlang\n \n Permission is hereby granted, free of charge, to any person obtaining a copy\n of this software and associated documentation files (the \"Software\"), to deal\n in the Software without restriction, including without limitation the rights\n to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n copies of the Software, and to permit persons to whom the Software is\n furnished to do so, subject to the following conditions:\n \n The above copyright notice and this permission notice shall be included in all\n copies or substantial portions of the Software.\n \n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n SOFTWARE.\n ",
"summary": "Text-to-IPA converter and phonetic translator for Python, powered by the Goruut phonemization engine",
"version": "0.6.3",
"project_urls": {
"Homepage": "https://github.com/neurlang/pygoruut"
},
"split_keywords": [
"goruut",
" phonemization",
" tts"
],
"urls": [
{
"comment_text": null,
"digests": {
"blake2b_256": "2c577f139d8b60a2cddc0e9d77ff6a3ce9708da4e6cc5f8b83ab6057dbc1d246",
"md5": "5ea8b81a622c8927d0dccabc68d3c4d1",
"sha256": "7e6f196641ce1b4480e8313d30ac51d609ad93def13f59f0e4719a9dfc242a70"
},
"downloads": -1,
"filename": "pygoruut-0.6.3-py3-none-any.whl",
"has_sig": false,
"md5_digest": "5ea8b81a622c8927d0dccabc68d3c4d1",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.6",
"size": 21150,
"upload_time": "2025-08-02T06:34:55",
"upload_time_iso_8601": "2025-08-02T06:34:55.672403Z",
"url": "https://files.pythonhosted.org/packages/2c/57/7f139d8b60a2cddc0e9d77ff6a3ce9708da4e6cc5f8b83ab6057dbc1d246/pygoruut-0.6.3-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": null,
"digests": {
"blake2b_256": "da7dd74d63282a47e7ccba573a846b2ecd7b21997bbe40cb78bbf253fe5dc77e",
"md5": "1bd6c288f59c920613393f392a74210e",
"sha256": "adec86b762360caa65e958ec2c3f0a51587003a3cb7bbaf28c26de8aa5e3d4c9"
},
"downloads": -1,
"filename": "pygoruut-0.6.3.tar.gz",
"has_sig": false,
"md5_digest": "1bd6c288f59c920613393f392a74210e",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.6",
"size": 24168,
"upload_time": "2025-08-02T06:34:57",
"upload_time_iso_8601": "2025-08-02T06:34:57.308060Z",
"url": "https://files.pythonhosted.org/packages/da/7d/d74d63282a47e7ccba573a846b2ecd7b21997bbe40cb78bbf253fe5dc77e/pygoruut-0.6.3.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2025-08-02 06:34:57",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "neurlang",
"github_project": "pygoruut",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"requirements": [
{
"name": "requests",
"specs": [
[
"==",
"2.32.3"
]
]
}
],
"lcname": "pygoruut"
}