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.0.tar.gz (12.9 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.0-cp38-abi3-win_amd64.whl (154.5 kB view details)

Uploaded CPython 3.8+Windows x86-64

g2p2-0.1.0-cp38-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (291.1 kB view details)

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

g2p2-0.1.0-cp38-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (286.8 kB view details)

Uploaded CPython 3.8+manylinux: glibc 2.17+ ARM64

g2p2-0.1.0-cp38-abi3-macosx_11_0_arm64.whl (250.0 kB view details)

Uploaded CPython 3.8+macOS 11.0+ ARM64

g2p2-0.1.0-cp38-abi3-macosx_10_12_x86_64.whl (253.9 kB view details)

Uploaded CPython 3.8+macOS 10.12+ x86-64

File details

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

File metadata

  • Download URL: g2p2-0.1.0.tar.gz
  • Upload date:
  • Size: 12.9 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.0.tar.gz
Algorithm Hash digest
SHA256 4d5fa89592ec25bd1f7ad9aa591b830533b9ab489b5469094341db81f6b43395
MD5 15a839035d63fe253092cbe15953c95b
BLAKE2b-256 e3d9ce218982c3949a5b012a67e8e71bbce0a9f4d8405966fdb76716cf530a97

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: g2p2-0.1.0-cp38-abi3-win_amd64.whl
  • Upload date:
  • Size: 154.5 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.0-cp38-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 83c67b0fda777a89f2ea06d40c706984282890a8763b3a64826f8cb1e9bbcad5
MD5 e08af36d7a259390bae159cc54674e4b
BLAKE2b-256 ffbd56c3f9a1622e0600a3ee895061ef5f36571e49da1d02325223414c327abb

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for g2p2-0.1.0-cp38-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 38d5a8222a60020326d3e8ec49a08d9c306cdf9c98192f88c990e8dd28c16d91
MD5 e1820dee591ccddf0aa264f27b4d0f06
BLAKE2b-256 cfeb93a065b581a593bffc5b785c35e6a55c6109792eb513bf1940266868573b

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for g2p2-0.1.0-cp38-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 cab1b9bc58ab49e601cdb78251ed5e58a08b1a48448d520028df7880926a513d
MD5 0ac0bc1dcdf4e80b9e6fc4582f477fd2
BLAKE2b-256 cd0fb37ed93041a5f049739ab39e7842ec0929725163fbb77e0dab3f382f718c

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: g2p2-0.1.0-cp38-abi3-macosx_11_0_arm64.whl
  • Upload date:
  • Size: 250.0 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.0-cp38-abi3-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 6a8360b455f864d001c531a9a78362b16e35ea8a49ba5dc82745ca33e623f3e3
MD5 cbfd3b16d09cc402aa3815abf7f4e93c
BLAKE2b-256 4f4f10df6695914d40c954083cbbd6abd12e53a380f610a6a72905c4ec3a82be

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: g2p2-0.1.0-cp38-abi3-macosx_10_12_x86_64.whl
  • Upload date:
  • Size: 253.9 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.0-cp38-abi3-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 bd0dcf1b75b92c0937ff28c66f107ac579fcf590ad9cb01c6cfc8c4192515431
MD5 bc6c5aace77d1a6e4b85bbcc0d112bc9
BLAKE2b-256 39db3030815f2a89788fc8a4837552279e6591e1e4d6adbb3d3d161d8c4d9361

See more details on using hashes here.

Provenance

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