Skip to main content

g2p2

Zero-dependency grapheme-to-phoneme for the 100 Whisper languages, with a Rust core exposed to Python.

pip install g2p2
from g2p2 import Model

m = Model.load("fr.g2p")
print(m.phonemize("bonjour"))            # bɔ̃ʒuʁ
print(m.phonemize_many(["chat", "eau"])) # ['ʃa', 'o']

Model blobs (*.g2p) are built from WikiPron / epitran / LLM data — see the main repo. Download a language's .g2p from the GitHub releases or build with cargo run -p xtask -- build-all.

API

  • Model.load(path) -> Model — load a .g2p file
  • Model.from_bytes(bytes) -> Model — load from raw bytes
  • Model.phonemize(word) -> str — IPA for one word
  • Model.phonemize_many(words) -> list[str] — IPA for many

License: MIT OR Apache-2.0.

Metadata

Release files for g2p2 0.2.3

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

Source distribution (sdist)

Source distribution for g2p2 0.2.3
File Size Uploaded Provenance
g2p2-0.2.3.tar.gz 26.1 kB With provenance Details

Built distributions (wheels)

Table of built distributions (wheels) for g2p2 0.2.3
File
g2p2-0.2.3-cp38-abi3-win_amd64.whl CPython 3.8 abi3 Windows x86-64 Details
g2p2-0.2.3-cp38-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl CPython 3.8 abi3 Linux glibc 2.17+ x86-64 Details
g2p2-0.2.3-cp38-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl CPython 3.8 abi3 Linux glibc 2.17+ ARM64 Details
g2p2-0.2.3-cp38-abi3-macosx_11_0_arm64.whl CPython 3.8 abi3 macOS 11.0+ ARM64 Details
g2p2-0.2.3-cp38-abi3-macosx_10_12_x86_64.whl CPython 3.8 abi3 macOS 10.12+ x86-64 Details

Total release size: 15.4 MB

Release files / g2p2-0.2.3.tar.gz

Download URL g2p2-0.2.3.tar.gz
Size 26.1 kB
Tags Source
SHA-256 checksum
How to use checksums
2561ea37a17d36b7d4492bb1993341125c51352b9455de49e988d4f3994028bd
BLAKE2b-256 checksum
How to use checksums
2fc58f3abd00b8e5412fc49f1b2aed22b0600c669a9ca3e431c38bc9d7300c85
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 17, 2026.

Transparency log

Release files / g2p2-0.2.3-cp38-abi3-win_amd64.whl

Download URL g2p2-0.2.3-cp38-abi3-win_amd64.whl
Size 2.9 MB
Tags CPython 3.8 Windows x86-64 abi3
SHA-256 checksum
How to use checksums
71cd3e667b7586eefe1dbe6fb07ceecae091beeb1f153c1dd40e08503ac90eaa
BLAKE2b-256 checksum
How to use checksums
2a6ef555d3cadcbe0994b1852d75c5f256857c03a09fe70c7059a991fa3e669c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 17, 2026.

Transparency log

Release files / g2p2-0.2.3-cp38-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl

Download URL g2p2-0.2.3-cp38-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Size 3.2 MB
Tags CPython 3.8 Linux glibc 2.17+ x86-64 abi3
SHA-256 checksum
How to use checksums
47cbe5ab874d43bf811beacfb8a309010a31803435323648733759133b5aa802
BLAKE2b-256 checksum
How to use checksums
1558e31edb32cbdfaee71d80f8bd447a36c1b481109481f21a6c4080f5fcf049
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 17, 2026.

Transparency log

Release files / g2p2-0.2.3-cp38-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl

Download URL g2p2-0.2.3-cp38-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Size 3.2 MB
Tags CPython 3.8 Linux glibc 2.17+ ARM64 abi3
SHA-256 checksum
How to use checksums
6c48798dfef397cfc8c2915a57f1345b85d0b76e37b092a447d5afb4470a7bc0
BLAKE2b-256 checksum
How to use checksums
09833f48c0d5db6079a6d8d78e372e4210a85ac74a27df7b335f435d7e5d41f1
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 17, 2026.

Transparency log

Release files / g2p2-0.2.3-cp38-abi3-macosx_11_0_arm64.whl

Download URL g2p2-0.2.3-cp38-abi3-macosx_11_0_arm64.whl
Size 2.9 MB
Tags CPython 3.8 abi3 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
81df08d7ac1bafd303af5110c0419f98649f61cdebb8706a626cf0de917bc21d
BLAKE2b-256 checksum
How to use checksums
2ef58a66852164bbbda261f9c4a6088d6dd40082c1c7ed8430092df39fc145b2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 17, 2026.

Transparency log

Release files / g2p2-0.2.3-cp38-abi3-macosx_10_12_x86_64.whl

Download URL g2p2-0.2.3-cp38-abi3-macosx_10_12_x86_64.whl
Size 3.0 MB
Tags CPython 3.8 abi3 macOS 10.12+ x86-64
SHA-256 checksum
How to use checksums
a63d97991862b2c5b5ceb542e351d676626543cb17db80158d729cc2dd4a7b2c
BLAKE2b-256 checksum
How to use checksums
20e0e2aa67f889c01d20fd1be3e44fb641443c932714910256239ff7e5b7d93c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 17, 2026.

Transparency log

Security for g2p2 0.2.3

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.

Full provenance

All 6 files in this release have been uploaded with provenance metadata.

Select from 6 files

Attestation for g2p2-0.2.3.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 17, 2026.

Transparency log

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