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.0.1

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.0.1
File Size Uploaded Provenance Actions
techiaith_g2p-1.0.1.tar.gz 4.1 MB Without provenance Details for techiaith_g2p-1.0.1.tar.gz

Built distribution (wheel)

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

Total release size: 7.1 MB

Release files / techiaith_g2p-1.0.1.tar.gz

Download URL techiaith_g2p-1.0.1.tar.gz
Size 4.1 MB
Tags Source
SHA-256 checksum
How to use checksums
750e3e996f70fee8b1f63f1f8030110e83bb4f04d85a46726fe1dee52639f7a6
BLAKE2b-256 checksum
How to use checksums
8dd6d26533523b21dd72cebd95a76f4aafeea69c12810c2227a5bd0b36de7e83
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.10.20

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

Download URL techiaith_g2p-1.0.1-py3-none-any.whl
Size 3.0 MB
Tags Python 3
SHA-256 checksum
How to use checksums
4ee6a25fc4ccf1054c8e96660f7d9cfa176f06076b6867388334b93e82d8f28f
BLAKE2b-256 checksum
How to use checksums
1f2b420ca9115ef6fbcdf77c7813238ef62f71938c237b2fe58648909679cd36
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.10.20

Security for techiaith-g2p 1.0.1

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