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.1.tar.gz (19.7 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.1-cp38-abi3-win_amd64.whl (165.8 kB view details)

Uploaded CPython 3.8+Windows x86-64

g2p2-0.2.1-cp38-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (301.1 kB view details)

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

g2p2-0.2.1-cp38-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (297.6 kB view details)

Uploaded CPython 3.8+manylinux: glibc 2.17+ ARM64

g2p2-0.2.1-cp38-abi3-macosx_11_0_arm64.whl (261.4 kB view details)

Uploaded CPython 3.8+macOS 11.0+ ARM64

g2p2-0.2.1-cp38-abi3-macosx_10_12_x86_64.whl (265.0 kB view details)

Uploaded CPython 3.8+macOS 10.12+ x86-64

File details

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

File metadata

  • Download URL: g2p2-0.2.1.tar.gz
  • Upload date:
  • Size: 19.7 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.1.tar.gz
Algorithm Hash digest
SHA256 1b89ec5d23188fdfd682b2ca69fcdc3fbca650c2d6039823c9b010a360af858e
MD5 9e2967f990a9a3dbd51e0f20e34f3bec
BLAKE2b-256 4c32a29fd63e14d0caeec1acfa3a53127250a35cbf9c6fefe8bb8a498814e7eb

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: g2p2-0.2.1-cp38-abi3-win_amd64.whl
  • Upload date:
  • Size: 165.8 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.1-cp38-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 96b7dc17a7c99692f54ba0f5d704ac384e6f74a4afe3fdbf1b28ca7057cd6de9
MD5 8c9ebb7affe56e3d39bd73c1cb82f3e6
BLAKE2b-256 e67049e4512268079a039e121a989ed4fa087a219c2a00d484e719cbe5545fee

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for g2p2-0.2.1-cp38-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 32eefcaf8e499f3128ef68e09c8eeeae2d0be14a5e9a48136e96d357ab0e10c7
MD5 00258d63347209786bab158baf9769cb
BLAKE2b-256 cad967dfbb904b238e65f9bd42ba9202679437d57d7b2ba6b3c87341bac8c44a

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for g2p2-0.2.1-cp38-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 052e3d0c81ec3f3636b1ddef88396e7b71da7fc2c06be5db4b1c543307ee5e14
MD5 02ecb20586aba057268ae90013e25777
BLAKE2b-256 4f0c4d5df205d8923992c361bf71b1706979ffb2dc90d0e850e770a961690787

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: g2p2-0.2.1-cp38-abi3-macosx_11_0_arm64.whl
  • Upload date:
  • Size: 261.4 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.1-cp38-abi3-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 c5f9bd0f0a595850f595f266d422b3f629d8c615ad60edba145ab4ec57eedae7
MD5 b31be947c5e91c5566271f50a64b6f54
BLAKE2b-256 e0a1d1ccb6d6bfee96aff5b79b972e6219eda0207eb90852eadae678f369c2cc

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: g2p2-0.2.1-cp38-abi3-macosx_10_12_x86_64.whl
  • Upload date:
  • Size: 265.0 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.1-cp38-abi3-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 c7dbf6f1ecea85afd5cdb744674b3a2403179a8bb50fd7d7eabed6196645182c
MD5 09bd03d2fee4df96db1ce5c79eedefcc
BLAKE2b-256 4bd4e50c38b2eb383727535358a3b5cdec5c8fd9f41fc4e395a682a9021f1bf5

See more details on using hashes here.

Provenance

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