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.2.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.2.0
File Size Uploaded Provenance Actions
techiaith_g2p-1.2.0.tar.gz 7.1 MB Without provenance Details for techiaith_g2p-1.2.0.tar.gz

Built distribution (wheel)

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

Total release size: 13.0 MB

Release files / techiaith_g2p-1.2.0.tar.gz

Download URL techiaith_g2p-1.2.0.tar.gz
Size 7.1 MB
Tags Source
SHA-256 checksum
How to use checksums
975198cdb58f4f21fe08d9aa63d60e136dd39d7443167df188436671bcaa2878
BLAKE2b-256 checksum
How to use checksums
deb775f8f7a3e38dd75fd8552d58d28bb9ec33390a35e95788404cddee52c584
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.10.21

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

Download URL techiaith_g2p-1.2.0-py3-none-any.whl
Size 5.9 MB
Tags Python 3
SHA-256 checksum
How to use checksums
3506b0ee9e06e4681d164a494b1d87cd0a2ed840b9782b44977525d1d36abf6d
BLAKE2b-256 checksum
How to use checksums
551487e7bbd15b58c86055bf8cc58c329ea64ef84af20616570bf6dd5275940d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.10.21

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