Skip to main content

techiaith-g2p

The permissive Bangor Welsh grapheme-to-phoneme (G2P) engine: turns Welsh (and code-switched English) text into the phoneme-id sequence consumed by Bangor University's retrained Piper/VITS voices. Dictionary-based, permissively licensed data only, and dependency-free -- it imports nothing beyond the Python standard library, so it drops into an inference server, a screen-reader add-on, or a CLI without pulling in a model runtime.

Install

pip install techiaith-g2p

Use

from techiaith.g2p import BangorG2P

g2p = BangorG2P(english_mode="native")
ids = g2p.text_to_ids("Bore da. Sut wyt ti'n teimlo heddiw?")
print(ids)

english_mode and the package's data_version() must match the target voice's .onnx.json. For the full text-to-audio example, see the model card: https://huggingface.co/techiaith/cy_en_GB-bu_tts

Do not feed this voice to stock piper. Its phoneme_type: "text" path treats phonemes as individual codepoints, one at a time -- it does not understand the multi-codepoint phoneme ids this G2P produces, and the output will be mispronounced. Use the ids from text_to_ids directly against the model's input layer, as the model card describes.

Metadata

Release files for techiaith-g2p 1.5.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for techiaith-g2p 1.5.0
File Size Uploaded Provenance Actions
techiaith_g2p-1.5.0.tar.gz 7.4 MB Without provenance Details for techiaith_g2p-1.5.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for techiaith-g2p 1.5.0
File Interpreter ABI Platform Actions
techiaith_g2p-1.5.0-py3-none-any.whl Python 3 none any Details for techiaith_g2p-1.5.0-py3-none-any.whl

Total release size: 13.4 MB

Release files / techiaith_g2p-1.5.0.tar.gz

Download URL techiaith_g2p-1.5.0.tar.gz
Size 7.4 MB
Tags Source
SHA-256 checksum
How to use checksums
f65752ee9846ca783fa2d2b4ed5cb86447d143d532f706512c6a61dd0f6b6172
BLAKE2b-256 checksum
How to use checksums
53189de2cacc20a6d3be73224e47d4a7cb23ed066a406202c5afa7bc93e505a9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.10.22

Release files / techiaith_g2p-1.5.0-py3-none-any.whl

Download URL techiaith_g2p-1.5.0-py3-none-any.whl
Size 6.0 MB
Tags Python 3
SHA-256 checksum
How to use checksums
32d41bfaa92f728e702651d2bc62005204ec033518f8ff339768f26e28079ae7
BLAKE2b-256 checksum
How to use checksums
03a35e8c67ea6d866b89d481321152a23b2d7dfb8588322962123c219217fa49
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.10.22

Security for techiaith-g2p 1.5.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.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page