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.2.tar.gz (17.6 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.2-cp38-abi3-win_amd64.whl (85.0 MB view details)

Uploaded CPython 3.8+Windows x86-64

g2p2-0.1.2-cp38-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (85.2 MB view details)

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

g2p2-0.1.2-cp38-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (85.2 MB view details)

Uploaded CPython 3.8+manylinux: glibc 2.17+ ARM64

g2p2-0.1.2-cp38-abi3-macosx_11_0_arm64.whl (85.1 MB view details)

Uploaded CPython 3.8+macOS 11.0+ ARM64

g2p2-0.1.2-cp38-abi3-macosx_10_12_x86_64.whl (85.1 MB view details)

Uploaded CPython 3.8+macOS 10.12+ x86-64

File details

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

File metadata

  • Download URL: g2p2-0.1.2.tar.gz
  • Upload date:
  • Size: 17.6 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.2.tar.gz
Algorithm Hash digest
SHA256 9884759eb6dd412f6db102a7237b2406351d95354c9ee4c0d28742b82dc9eea4
MD5 4e1589987390bfb5e077796208bb2040
BLAKE2b-256 4eb23b734816e72570d2e79f40f1d8f1674a477f5ce87c340032830f595099b2

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: g2p2-0.1.2-cp38-abi3-win_amd64.whl
  • Upload date:
  • Size: 85.0 MB
  • 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.2-cp38-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 d74d8e4b388d4515d70f49aaac022b7a8283ec8a78261f9cabe3db262698a5e5
MD5 e867064ce48e320eb9f111a8c57ef42b
BLAKE2b-256 f24ea880c17a388c44dbe7fff399254b813f30fdaf4a16a2009bb164de08c2cb

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for g2p2-0.1.2-cp38-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 e11b58c69bf9d65a385bb8c9270e846cf0ae03d2f1baf3d4715df228c1282904
MD5 e893df1501ddf02763812343ca4eceec
BLAKE2b-256 1e59ae4182e1076fb1cdbb245a81c0efaf9b6f746a018e5c0e3b05c8da89f9bc

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for g2p2-0.1.2-cp38-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 689001eb5f2cc84b365a107370ff890958a8649442a154df33375186a9d96b08
MD5 5cb12a5618f0e6e263c1b9348b1d1f22
BLAKE2b-256 ebfa59697106cd4701d788f09aa2d8a7cccf71947ead42fdc68b70ccac2a659a

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: g2p2-0.1.2-cp38-abi3-macosx_11_0_arm64.whl
  • Upload date:
  • Size: 85.1 MB
  • 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.2-cp38-abi3-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 e5a59de44f90b0fa0aa76f36fe9210ff69efe41baf967558cef39c53402d5090
MD5 47b5051ad72e29384194e5c6a9727b62
BLAKE2b-256 b62083a7a98188618ac0adc45bd712a5669292441338e0c508cdad90382252c4

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: g2p2-0.1.2-cp38-abi3-macosx_10_12_x86_64.whl
  • Upload date:
  • Size: 85.1 MB
  • 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.2-cp38-abi3-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 e634128e9ae95f00f648d5685d676572ab5ed87044dc9a174f16094436602d85
MD5 67f174e11b9f67638b006569dcfd376f
BLAKE2b-256 52235bc41ffb3d90efea5b9f544482666bf2763d9045afaf8da494782503157e

See more details on using hashes here.

Provenance

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