Phonetisaurus for Python
Python wrapper for the excellent phonetisaurus grapheme to phoneme tool (license).
Includes pre-built binaries for:
x86_64- desktop/laptop/server (64-bit)armv6l- Raspberry Pi 0/1armv7l- Raspberry Pi 2/3/4 (32-bit)aarch64- Raspberry Pi 3/4 (64-bit)
Requirements
- Python 3.7+
- Linux
- Tested with Debian Buster
Installing
For x86_64 systems:
$ pip install phonetisaurus
For Raspberry Pi, see Releases for compatible wheels:
- Raspberry Pi 0/1
phonetisaurus-<VERSION>-py3-none-linux_armv6l.whl
- Raspberry Pi 2/3/4 (32-bit)
phonetisaurus-<VERSION>-py3-none-linux_armv7l.whl
- Raspberry Pi 3/4 (64-bit)
phonetisaurus-<VERSION>-py3-none-linux_aarch64.whl
Training
Assuming you have a lexicon formatted like the CMU pronouncing dictionary:
word1 phoneme1 phoneme2 ...
word2 phoneme1 phoneme2 phoneme3 ...
saved to lexicon.dict run:
$ phonetisaurus train --model /path/to/write/g2p.fst /path/to/lexicon.dict
You may supply more than one lexicon.
See phonetisaurus train --help for more options.
Predicting
$ phonetisaurus predict --model /path/to/g2p.fst word1 word2 ...
If no words are provided on the command line, they will be read line-by-line from standard in.
You may optionally supply one or more --lexicon /path/to/lexicon.dict arguments to avoid guessing pronunciations for known words.
See phonetisaurus predict --help for more options.
Metadata
Release files for phonetisaurus 0.3.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| phonetisaurus-0.3.0-py3-none-manylinux1_x86_64.whl | Python 3 | none | Linux glibc 2.5+ x86-64 | Details for phonetisaurus-0.3.0-py3-none-manylinux1_x86_64.whl |
Release files / phonetisaurus-0.3.0-py3-none-manylinux1_x86_64.whl
| Download URL | phonetisaurus-0.3.0-py3-none-manylinux1_x86_64.whl |
|---|---|
| Size | 12.1 MB |
| Tags | Linux glibc 2.5+ x86-64 Python 3 |
|
SHA-256 checksum How to use checksums |
4ad830d748234d778c9e55da731df319f92805120d158825cf8162616bbccc09
|
|
BLAKE2b-256 checksum How to use checksums |
f8dd8bee1dc1f6944fec8a5a8a3a1e5a70e2680ef1e129c0ee946202a65ecf37
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/50.3.2 requests-toolbelt/0.9.1 tqdm/4.51.0 CPython/3.6.9
|
Security for phonetisaurus 0.3.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.