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

Uploaded CPython 3.8+Windows x86-64

g2p2-0.2.2-cp38-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (3.2 MB view details)

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

g2p2-0.2.2-cp38-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (3.2 MB view details)

Uploaded CPython 3.8+manylinux: glibc 2.17+ ARM64

g2p2-0.2.2-cp38-abi3-macosx_11_0_arm64.whl (2.9 MB view details)

Uploaded CPython 3.8+macOS 11.0+ ARM64

g2p2-0.2.2-cp38-abi3-macosx_10_12_x86_64.whl (3.0 MB view details)

Uploaded CPython 3.8+macOS 10.12+ x86-64

File details

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

File metadata

  • Download URL: g2p2-0.2.2.tar.gz
  • Upload date:
  • Size: 25.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.2.tar.gz
Algorithm Hash digest
SHA256 abb5d146659664a469d8844cbaf9a5d353f16c2bd1503551390b54002ee1db1f
MD5 d4a94bc3b5b1ed8149730869dd7c0c39
BLAKE2b-256 20e6e07ac58134910558ba1d88a47f4e64921bec5b444777f7c84dd7b431bb75

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: g2p2-0.2.2-cp38-abi3-win_amd64.whl
  • Upload date:
  • Size: 2.9 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.2.2-cp38-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 01e193a272c63ec302dcbf8f498add4ee8d1f6968a3d7e5a6fe56a1e23a27786
MD5 0943c52569fe42536c2553a1caa7496a
BLAKE2b-256 412f309d4a49a4a4e34a1eb05ac1a54f36832a9d9f49dba63fcba81fdff2798f

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for g2p2-0.2.2-cp38-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 505756de2fe4e49c68c75254f960a5638cc4417408ef1ecf8c37924070adc3d6
MD5 2255e438b96faf47be7e0871e359f5bf
BLAKE2b-256 fd351907304f5714d6321af2830ef86ccdf7151cf3fa82f23cb29465eeeabb8b

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for g2p2-0.2.2-cp38-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 aab0f6505569bb58ebaed21f03059a84aae9f2a632b532999258dd1f86f10e8d
MD5 38dc32ef87e17ea77cdfa94bc9170a88
BLAKE2b-256 853c7a33384dddacd4443a293c3ba46b523d4f3ff0906e269982f7a20e60888f

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: g2p2-0.2.2-cp38-abi3-macosx_11_0_arm64.whl
  • Upload date:
  • Size: 2.9 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.2.2-cp38-abi3-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 d5d6d5b3f29151f84a77a30100c20f8a5e4fac86e92f3bafe36f4dac918faf87
MD5 68d4bccc1a9f95d9f1cc6c3555753738
BLAKE2b-256 63a61411b0a7413483fa3070f68b00b08c0f861ac57f5981261eaadac3eb69d4

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: g2p2-0.2.2-cp38-abi3-macosx_10_12_x86_64.whl
  • Upload date:
  • Size: 3.0 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.2.2-cp38-abi3-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 a558bf91b80e47e072b32d5be917ef7301d4f0bd228de108b13b6e146a550d02
MD5 f0dc420b2a32114decf51a0145c6d3f0
BLAKE2b-256 8af0bd90428dc4007d18b66232196a4733065e5d8e9dc8aeef7dee83292c3019

See more details on using hashes here.

Provenance

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