Skip to main content

Zero-dependency grapheme-to-phoneme for the 100 Whisper languages (Rust core)

Project description

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.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

g2p2-0.1.1.tar.gz (16.0 kB view details)

Uploaded Source

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

g2p2-0.1.1-cp38-abi3-win_amd64.whl (163.0 kB view details)

Uploaded CPython 3.8+Windows x86-64

g2p2-0.1.1-cp38-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (298.2 kB view details)

Uploaded CPython 3.8+manylinux: glibc 2.17+ x86-64

g2p2-0.1.1-cp38-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (294.5 kB view details)

Uploaded CPython 3.8+manylinux: glibc 2.17+ ARM64

g2p2-0.1.1-cp38-abi3-macosx_11_0_arm64.whl (258.8 kB view details)

Uploaded CPython 3.8+macOS 11.0+ ARM64

g2p2-0.1.1-cp38-abi3-macosx_10_12_x86_64.whl (262.1 kB view details)

Uploaded CPython 3.8+macOS 10.12+ x86-64

File details

Details for the file g2p2-0.1.1.tar.gz.

File metadata

  • Download URL: g2p2-0.1.1.tar.gz
  • Upload date:
  • Size: 16.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for g2p2-0.1.1.tar.gz
Algorithm Hash digest
SHA256 086110fe7dc76d64efc9322f770283adf2d484dbc9a54b7515d08dab4d0e91b7
MD5 669ca1f887338838e688dface0176e77
BLAKE2b-256 f52b61b73b067dcef92f6b2f6e4a93e04c4919c5c79b1598b21b31234ec5ff99

See more details on using hashes here.

Provenance

The following attestation bundles were made for g2p2-0.1.1.tar.gz:

Publisher: python.yml on jqueguiner/g2p2

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file g2p2-0.1.1-cp38-abi3-win_amd64.whl.

File metadata

  • Download URL: g2p2-0.1.1-cp38-abi3-win_amd64.whl
  • Upload date:
  • Size: 163.0 kB
  • Tags: CPython 3.8+, Windows x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for g2p2-0.1.1-cp38-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 b3d88a9b27ccfb9fb996e68707b1613b84bd2896d86bbd9c3886bf7a05cc65ff
MD5 a6f2f128abe368cb7cc487314b6f8487
BLAKE2b-256 c275bdf0778616f1dc0f5ab2cddf3008248beba9d7c9ee5e7f42ae8740e79215

See more details on using hashes here.

Provenance

The following attestation bundles were made for g2p2-0.1.1-cp38-abi3-win_amd64.whl:

Publisher: python.yml on jqueguiner/g2p2

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file g2p2-0.1.1-cp38-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for g2p2-0.1.1-cp38-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 383a130059b247094a89f6ed8cece2d9d69d0646eaab993b7f2ff68036943fdc
MD5 c43e2dcf7fdc395816f69b5d48626efa
BLAKE2b-256 60672b35c1657e9def3de49d0dfb84bd116282a2b2cccc25a2e9f0f6b35069aa

See more details on using hashes here.

Provenance

The following attestation bundles were made for g2p2-0.1.1-cp38-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl:

Publisher: python.yml on jqueguiner/g2p2

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file g2p2-0.1.1-cp38-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.

File metadata

File hashes

Hashes for g2p2-0.1.1-cp38-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 e889ab10ad6261456e75473251b4fd7dd5b08c98e3ec5ac741e713fab9f49d86
MD5 e43982d4af681eea2879604e32e8a3f7
BLAKE2b-256 d7e1d2b50d87bcc36fa0cdeab6912dfaf5f886ec3bcf8f4fc579b9778395258c

See more details on using hashes here.

Provenance

The following attestation bundles were made for g2p2-0.1.1-cp38-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl:

Publisher: python.yml on jqueguiner/g2p2

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file g2p2-0.1.1-cp38-abi3-macosx_11_0_arm64.whl.

File metadata

  • Download URL: g2p2-0.1.1-cp38-abi3-macosx_11_0_arm64.whl
  • Upload date:
  • Size: 258.8 kB
  • Tags: CPython 3.8+, macOS 11.0+ ARM64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for g2p2-0.1.1-cp38-abi3-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 7ebd88d3aae5d70abe2cae06f84c27f5bb09e74b09f582e8dd7ab136c00ad00e
MD5 5b59cdf308cc7df98ccc7d3c9d347da9
BLAKE2b-256 3c71ac68200ac8cdec22a726342a5f49ec7dadde1201cd61b8de91325b7c2a8f

See more details on using hashes here.

Provenance

The following attestation bundles were made for g2p2-0.1.1-cp38-abi3-macosx_11_0_arm64.whl:

Publisher: python.yml on jqueguiner/g2p2

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file g2p2-0.1.1-cp38-abi3-macosx_10_12_x86_64.whl.

File metadata

  • Download URL: g2p2-0.1.1-cp38-abi3-macosx_10_12_x86_64.whl
  • Upload date:
  • Size: 262.1 kB
  • Tags: CPython 3.8+, macOS 10.12+ x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for g2p2-0.1.1-cp38-abi3-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 3419fb639f99a9d15c22335935b4450215ade32b4d3918d614a064a334810a82
MD5 bd133d936c0fdf92a238ce3868326092
BLAKE2b-256 5ea81d9c44abc57e2140a13a5134ea7c6ec839f883dcde6cd60a90d4bb5ef571

See more details on using hashes here.

Provenance

The following attestation bundles were made for g2p2-0.1.1-cp38-abi3-macosx_10_12_x86_64.whl:

Publisher: python.yml on jqueguiner/g2p2

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page