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.2.0.tar.gz (18.1 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.2.0-cp38-abi3-win_amd64.whl (165.0 kB view details)

Uploaded CPython 3.8+Windows x86-64

g2p2-0.2.0-cp38-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (300.2 kB view details)

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

g2p2-0.2.0-cp38-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (296.7 kB view details)

Uploaded CPython 3.8+manylinux: glibc 2.17+ ARM64

g2p2-0.2.0-cp38-abi3-macosx_11_0_arm64.whl (260.8 kB view details)

Uploaded CPython 3.8+macOS 11.0+ ARM64

g2p2-0.2.0-cp38-abi3-macosx_10_12_x86_64.whl (264.6 kB view details)

Uploaded CPython 3.8+macOS 10.12+ x86-64

File details

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

File metadata

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

File hashes

Hashes for g2p2-0.2.0.tar.gz
Algorithm Hash digest
SHA256 b5e8fc4ea33bfcc7f0b950a76a117a34d3a4f595357c2215d696fe94a49750b9
MD5 61613c08c841e4e93776bb31d52effcc
BLAKE2b-256 7e44f74c17b7441e8f4e085b2759cfa867e7aa221f76a0c3cdda500ed0e37990

See more details on using hashes here.

Provenance

The following attestation bundles were made for g2p2-0.2.0.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.2.0-cp38-abi3-win_amd64.whl.

File metadata

  • Download URL: g2p2-0.2.0-cp38-abi3-win_amd64.whl
  • Upload date:
  • Size: 165.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.2.0-cp38-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 6fa70feb4f37c2c85889a65f221de8c20afd036a83d25b79ebedcb284deca9b7
MD5 1f1c7a1538fcfdfed511b35a982548ce
BLAKE2b-256 3fd0e680758fbd490c9073d7b2b5279c05790f0b0d9bcc6bc6fe9564334213c8

See more details on using hashes here.

Provenance

The following attestation bundles were made for g2p2-0.2.0-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.2.0-cp38-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for g2p2-0.2.0-cp38-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 d4e2706b6440bd35a5f80d1b275e57a32a5f6e08842277399ac79e10d69d8888
MD5 d01b5b49c1b9535b1e95e2dc601da2b6
BLAKE2b-256 18f7940cc3e710aa6c62cf5a881bd2ab68a55458360a5245fcf42ff8671e81fb

See more details on using hashes here.

Provenance

The following attestation bundles were made for g2p2-0.2.0-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.2.0-cp38-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.

File metadata

File hashes

Hashes for g2p2-0.2.0-cp38-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 23afeda591fa530510bb5e33d5ed7d3e81b2c73d3dd2bdd5f668ac779f485391
MD5 029e3dff46fa7b6fd4002c87bd0b05a2
BLAKE2b-256 266ed6329eac1d2a0944dec1740e9eb2f8f301c6e04f08895901a30290064ed3

See more details on using hashes here.

Provenance

The following attestation bundles were made for g2p2-0.2.0-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.2.0-cp38-abi3-macosx_11_0_arm64.whl.

File metadata

  • Download URL: g2p2-0.2.0-cp38-abi3-macosx_11_0_arm64.whl
  • Upload date:
  • Size: 260.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.2.0-cp38-abi3-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 2c9bb9d6a609e3c7d5b604ae135f8ee3ef8710a724c0353578f514ee8eabc787
MD5 fb1e147d67869e8fad0dd558baafe973
BLAKE2b-256 604e54556506a1d72b890ae3992de23099329242623d0ed3ca58b62e5cc3c318

See more details on using hashes here.

Provenance

The following attestation bundles were made for g2p2-0.2.0-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.2.0-cp38-abi3-macosx_10_12_x86_64.whl.

File metadata

  • Download URL: g2p2-0.2.0-cp38-abi3-macosx_10_12_x86_64.whl
  • Upload date:
  • Size: 264.6 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.2.0-cp38-abi3-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 d5863a4ed349c6fd689685894d0e6e3958efd34e2ef7055e7a8707e24ac929a4
MD5 876953279ba94503a50359d88d43666f
BLAKE2b-256 5c5115ad771fdbf8fa6b4a90adb5841a989dd925c11483e7bcbc9d3f7704d4fb

See more details on using hashes here.

Provenance

The following attestation bundles were made for g2p2-0.2.0-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